:root {
  --color-bg: #F6F8FC;
  --color-surface: #FFFFFF;
  --color-border: #E6EAF2;

  --color-text: #111827;
  --color-text-muted: #6B7280;

  --color-brand: #4F6EF7;
  --color-brand-light: #EEF2FF;

  --color-danger: #DC2626;
  --color-danger-light: #FEE2E2;

  --font-base: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 20px;
  --text-xl: 28px;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 999px;

  --shadow-sm: 0 6px 18px rgba(0,0,0,.03);
  --shadow-md: 0 10px 28px rgba(0,0,0,.06);

  --transition: all .2s ease;
}

body { background: var(--color-bg); font-family: var(--font-base); color: var(--color-text); }
h1 { font-size: var(--text-xl); font-weight: var(--weight-bold); margin: 0; }
h2 { font-size: var(--text-lg); font-weight: var(--weight-bold); margin: 0; }
p  { color: var(--color-text-muted); margin: 0; }

/* Card */
.ds-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-lg);
}
.ds-card-hover { transition: var(--transition); }
.ds-card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Chip */
.ds-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-brand-light);
  color: var(--color-brand);
  padding: 6px 14px;
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border: 1px solid #E0E7FF;
}

/* Badge danger */
.ds-badge-danger {
  display: inline-flex;
  align-items: center;
  background: var(--color-danger-light);
  color: var(--color-danger);
  padding: 6px 12px;
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

/* Button primary */
.ds-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--color-brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  padding: 10px 18px;
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.ds-btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ds-btn-primary:focus { outline: 2px solid var(--color-brand-light); outline-offset: 2px; }

/* Select */
.ds-select {
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: var(--text-sm);
  transition: var(--transition);
  appearance: none;
}
.ds-select:focus { outline: 2px solid var(--color-brand-light); outline-offset: 2px; }

/* Table */
.ds-table-wrap {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.ds-table { width: 100%; border-collapse: collapse; }
.ds-table thead { background: #F9FAFB; }
.ds-table th {
  padding: 18px;
  text-align: left;
  font-weight: var(--weight-semibold);
  color: #374151;
  font-size: var(--text-sm);
}
.ds-table td {
  padding: 18px;
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: #111827;
}
.ds-table tbody tr:hover { background: #F9FAFB; }

/* Sidebar items */
.ds-sidebar-item {
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: var(--weight-medium);
  color: #374151;
  transition: var(--transition);
}
.ds-sidebar-item:hover { background: var(--color-brand-light); }
.ds-sidebar-item.active {
  background: var(--color-brand-light);
  color: var(--color-brand);
  font-weight: var(--weight-semibold);
  border: 1px solid #C7D2FE;
}

/* Titles helpers */
.ds-page-title { font-size: 26px; font-weight: var(--weight-bold); }
.ds-page-subtitle { margin-top: 6px; font-size: var(--text-sm); color: var(--color-text-muted); }
.ds-section-title { font-size: 22px; font-weight: var(--weight-bold); }

/* Spacing helpers (usar so onde fizer sentido) */
.ds-mt-24 { margin-top: 24px; }
.ds-mt-32 { margin-top: 32px; }
.ds-mb-24 { margin-bottom: 24px; }
.ds-gap-24 { gap: 24px; }

/* Home + Extratos aplicacoes */
.home-intro.ds-mb-24 { margin-bottom: 32px; }
.home-metrics.ds-gap-24 { gap: 24px; }
#page-extratos .panel.ds-mt-32 { margin-top: 32px; }
