.rd-workspace {
  --chart-1: #75b6ff; --chart-2: #c59afa; --chart-3: #67d6c3; --chart-4: #ffb77d;
  --chart-5: #f69cba; --chart-6: #a6aafa; --chart-7: #94d9a8; --chart-8: #f5a395;
  display: grid; grid-template-columns: 192px minmax(0, 1fr); min-height: 390px;
  background: #141414; color: #eee; border: 1px solid #444; border-radius: 17px; overflow: hidden;
  font-size: 14px; color-scheme: dark;
}
.rd-side { padding: 16px 12px; background: #222; border-right: 1px solid #404040; }
.rd-brand { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; font-size: 23px; font-weight: 800; letter-spacing: -.055em; }
.rd-brand > span { background: #f2f2f2; color: #171717; border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center; font-size: 18px; }
.rd-side nav { display: grid; gap: 4px; }
.rd-side nav button, .rd-button {
  display: inline-flex; gap: 8px; align-items: center; background: transparent; color: #eee;
  font: inherit; border: 1px solid transparent; border-radius: 8px; padding: 8px 9px; cursor: pointer; text-align: left;
}
.rd-side nav button > svg { flex: 0 0 17px; }
.rd-side nav button[aria-pressed="true"], .rd-side nav button:hover, .rd-button:hover { background: #3a3a3a; }
.rd-workspace button:focus-visible, .rd-workspace :is(select, input, summary):focus-visible { outline: 2px solid #a6d2ff; outline-offset: 2px; }
.rd-main { padding: clamp(13px, 3vw, 25px); display: grid; gap: 13px; align-content: start; min-width: 0; }
.rd-top { display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: space-between; align-items: flex-end; }
.rd-top h3 { margin: 0; font-size: clamp(22px, 3.5vw, 32px); letter-spacing: -.04em; line-height: 1.1; }
.rd-top p, .rd-card > span, .rd-card > p, .rd-workspace small { color: #c5c5c5; }
.rd-top p { margin: 0 0 4px; font-size: 12px; }
.rd-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 143px), 1fr)); gap: 9px; }
.rd-card { min-width: 0; border: 1px solid #414141; border-radius: 12px; background: #212121; padding: 13px; }
.rd-card h4 { margin: 0 0 8px; font-size: 16px; }
.rd-card > strong { display: block; margin-top: 3px; font-size: clamp(17px, 2vw, 24px); }
.rd-card > p { margin: 4px 0; }
.rd-card small { display: block; }
.rd-income { color: #86e8ab; }
.rd-expense { color: #ff9eab; }
.rd-bars { display: grid; gap: 10px; }
.rd-bar { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; }
.rd-bar small { grid-column: 1 / -1; }
.rd-track { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: #4a4a4a; overflow: hidden; }
.rd-track i { display: block; height: 100%; border-radius: inherit; }
.rd-filters { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.rd-workspace label { display: grid; gap: 3px; font-size: 12px; min-width: 0; color: #ddd; }
.rd-workspace select, .rd-workspace input { min-width: 0; width: 100%; color: #f0f0f0; background: #2d2d2d; border: 1px solid #555; padding: 7px 8px; border-radius: 7px; font: inherit; }
.rd-table-wrap { overflow-x: auto; }
.rd-workspace table { border-collapse: collapse; width: 100%; min-width: 455px; text-align: left; }
.rd-workspace th, .rd-workspace td { border-bottom: 1px solid #444; padding: 7px 8px; }
.rd-workspace td:last-child { white-space: nowrap; font-weight: 700; }
.rd-workspace table small { font-weight: 400; }
.rd-button { background: #2c2c2c; border-color: #535353; margin-top: 6px; }
.rd-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-card progress { width: 100%; height: 10px; accent-color: #8ad9b0; }
.rd-answer { white-space: pre-line; }
.rd-answer:empty { margin: 0; }
.rd-workspace summary { cursor: pointer; }
.rd-section-description { color: #d6d6d6; margin-bottom: 16px; }
@media (max-width: 740px) {
  .rd-workspace { grid-template-columns: 1fr; }
  .rd-side { border-right: 0; border-bottom: 1px solid #404040; }
  .rd-side nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-filters { grid-template-columns: 1fr 1fr; }
  .rd-filters > label:first-child { grid-column: 1 / -1; }
}
#ritmo-demo-root { margin-top: 22px; }

@media (prefers-reduced-motion: no-preference) {
  .rd-track i { transform-origin: left; animation: rd-bar-grow .6s ease-out both; transition: width .3s ease-out; }
  .rd-side nav button, .rd-button { transition: background-color .18s ease-out, border-color .18s ease-out; }
}
@keyframes rd-bar-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
