.rp-panel {
  --rp-surface: #fff;
  --rp-subtle: #f5f7f5;
  --rp-line: #e5e9e5;
  --rp-ink: #182622;
  --rp-muted: #5e6e67;
  --rp-accent: #00796e;
  --rp-accent-dark: #00695f;
  --rp-accent-soft: #e5f4ee;
  --rp-radius: 16px;
  display: grid;
  min-width: 0;
  gap: 22px;
  color: var(--rp-ink);
}

.rp-panel *, .rp-panel *::before, .rp-panel *::after { box-sizing: border-box; }
.rp-panel h3, .rp-panel p, .rp-panel ul { margin: 0; }
.rp-panel ul { padding: 0; list-style: none; }
.rp-panel button { font: inherit; }
.rp-panel button:focus-visible { outline: 2px solid var(--rp-accent); outline-offset: 3px; }
.rp-panel svg { width: 17px; height: 17px; flex: none; }

.rp-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.rp-task-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--rp-line);
  border-radius: 11px;
  background: var(--rp-subtle);
}

.rp-task-filters button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 6px 11px;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  color: var(--rp-muted);
  cursor: pointer;
}

.rp-task-filters button:hover { background: #fff; color: var(--rp-ink); }
.rp-task-filters button[aria-pressed="true"] {
  background: var(--rp-surface);
  color: var(--rp-accent-dark);
  box-shadow: 0 1px 4px #20362e17;
}

.rp-task-filters button span {
  min-width: 19px;
  border-radius: 10px;
  padding: 2px 4px;
  background: #e9eeea;
  text-align: center;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.rp-task-filters button[aria-pressed="true"] span { background: var(--rp-accent-soft); }

.rp-task-group { min-width: 0; }
.rp-task-group h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 2px 8px;
  font-size: 14px;
  font-weight: 700;
}

.rp-task-group h3 span {
  padding: 2px 6px;
  border-radius: 12px;
  background: var(--rp-subtle);
  color: var(--rp-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.rp-task-list {
  border: 1px solid var(--rp-line);
  border-radius: var(--rp-radius);
  background: var(--rp-surface);
}

.rp-task {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 4px 12px;
}

.rp-task:hover { background: #f8fbf9; }
.rp-task:first-child { border-radius: calc(var(--rp-radius) - 1px) calc(var(--rp-radius) - 1px) 0 0; }
.rp-task:last-child { border-radius: 0 0 calc(var(--rp-radius) - 1px) calc(var(--rp-radius) - 1px); }
.rp-task:only-child { border-radius: calc(var(--rp-radius) - 1px); }
.rp-task + .rp-task { border-top: 1px solid var(--rp-line); }

.rp-task-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1.5px solid #a8b6af;
  border-radius: 7px;
  background: var(--rp-surface);
  color: #fff;
  cursor: pointer;
}

.rp-task-check:hover { border-color: var(--rp-accent); background: var(--rp-accent-soft); }
.rp-task-check[aria-pressed="true"] { border-color: var(--rp-accent); background: var(--rp-accent); }
.rp-task-check svg { width: 14px; height: 14px; }

.rp-task-name {
  display: flex;
  min-width: 0;
  min-height: 48px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 14px;
  padding: 7px 0;
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--rp-ink);
  text-align: start;
  cursor: pointer;
}

.rp-task-copy {
  display: grid;
  min-width: 0;
  flex: 1 1 155px;
  gap: 3px;
}

.rp-task-title, .rp-task-notes {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-task-title { font-size: 14px; font-weight: 650; }
.rp-task-notes { font-size: 12px; color: var(--rp-muted); }
.rp-task--done .rp-task-title { text-decoration: line-through; color: var(--rp-muted); }

.rp-task-details {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.rp-task-priority, .rp-task-late, .rp-task-category, .rp-task-calendar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.rp-task-priority { background: var(--rp-subtle); color: var(--rp-muted); }
.rp-task-priority--high { background: #fff0dc; color: #8c4b0d; }
.rp-task-late { background: #fbe8e7; color: #9b3937; }
.rp-task-category { background: var(--rp-subtle); color: var(--rp-ink); }
.rp-task-calendar {
  min-width: 0;
  max-width: min(100%, 150px);
  box-shadow: inset 0 0 0 1px var(--rp-line);
  color: var(--rp-muted);
}
.rp-task-calendar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-task-more { display: flex; color: var(--rp-muted); }
.rp-task-more svg { width: 15px; height: 15px; }

.rp-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--rp-item-color, var(--rp-accent));
}

.rp-empty {
  display: grid;
  min-height: 220px;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 22px;
  border: 1px dashed #cdd8d0;
  border-radius: var(--rp-radius);
  background: var(--rp-surface);
  color: var(--rp-muted);
  text-align: center;
  font-size: 13px;
}

.rp-empty strong { margin-top: 3px; color: var(--rp-ink); font-size: 15px; }
.rp-empty svg { width: 24px; height: 24px; color: var(--rp-accent); }

.rp-stats { gap: 16px; }
.rp-stats-summary, .rp-stats-details { display: grid; gap: 16px; }
.rp-stats-summary { grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); }
.rp-stats-details { grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); }

.rp-stat-card {
  min-width: 0;
  padding: 19px;
  border: 1px solid var(--rp-line);
  border-radius: var(--rp-radius);
  background: var(--rp-surface);
}

.rp-stat-head { display: flex; align-items: center; gap: 9px; }
.rp-stat-head h3 { font-size: 13px; line-height: 1.3; font-weight: 650; }
.rp-stat-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--rp-accent-soft);
  color: var(--rp-accent-dark);
}

.rp-stat-value {
  margin: 12px 0 4px;
  font-size: clamp(23px, 3vw, 33px);
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  line-height: 1.2;
}

.rp-stat-card p { color: var(--rp-muted); font-size: 12px; }
.rp-stats-chart > h3 { margin-bottom: 18px; font-size: 15px; font-weight: 700; }

.rp-times-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(4px, 1.3vw, 12px);
}

.rp-times-day {
  display: grid;
  grid-template-rows: 30px 116px 20px;
  justify-items: center;
  align-items: end;
  gap: 5px;
  min-width: 0;
  text-align: center;
}

.rp-times-value {
  font-size: 10px;
  line-height: 1.22;
  color: var(--rp-muted);
  font-variant-numeric: tabular-nums;
}

.rp-times-track {
  display: flex;
  align-items: end;
  width: min(100%, 32px);
  height: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: var(--rp-subtle);
}

.rp-times-track div {
  width: 100%;
  height: var(--rp-fill);
  border-radius: 6px;
  background: #91c7b8;
}

.rp-times-day--today .rp-times-track div { background: var(--rp-accent); }
.rp-times-label { color: var(--rp-muted); font-size: 12px; font-weight: 650; }
.rp-times-day--today .rp-times-label { color: var(--rp-accent-dark); }

.rp-category-chart { display: grid; min-width: 0; gap: 13px; }
.rp-category-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px 12px;
  margin-bottom: 6px;
  font-size: 12px;
}

.rp-category-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; }
.rp-category-events { color: var(--rp-muted); }
.rp-category-line strong { min-width: 44px; text-align: end; font-variant-numeric: tabular-nums; }
.rp-category-track { height: 7px; overflow: hidden; border-radius: 7px; background: var(--rp-subtle); }
.rp-category-track span { display: block; width: var(--rp-fill); height: 100%; border-radius: inherit; background: var(--rp-item-color); }
.rp-category-empty { padding: 10px 0; }

@media (max-width: 420px) {
  .rp-panel { gap: 14px; }
  .rp-task-filters button { gap: 4px; min-height: 32px; padding-inline: 6px; font-size: 12px; }
  .rp-task-filters button span { min-width: 16px; }
  .rp-task { gap: 8px; padding-inline: 9px; }
  .rp-task-title { font-size: 13px; }
  .rp-stat-card { padding: 14px; }
  .rp-category-line { gap: 6px; }
}
