/* pages/analyse.css – Analyse (Monatschart) */

/* ── INSIGHTS CHART ── */
.insights-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  height: 200px;
  margin-top: var(--sp-md);
}
.insights-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  cursor: pointer;
}
.insights-bar-track {
  position: relative;
  width: 100%;
  height: 150px;
}
.insights-bar-zero-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}
.insights-bar-value {
  font-size: .64rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
  white-space: nowrap;
}
.insights-bar-value.active {
  color: var(--primary-dark);
  font-weight: 700;
}
.insights-bar-value.negative {
  color: var(--danger);
}
.insights-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  min-width: 10px;
  background: var(--primary-light);
  border-radius: 6px 6px 2px 2px;
  transition: top .4s ease, height .4s ease, background .2s ease;
}
.insights-bar.active {
  background: var(--primary);
}
.insights-bar.negative {
  border-radius: 2px 2px 6px 6px;
  background: var(--danger-light);
}
.insights-bar.negative.active {
  background: var(--danger);
}
.insights-bar-label {
  margin-top: 8px;
  font-size: .68rem;
  font-weight: 500;
  color: var(--muted);
}
.insights-bar-label.active {
  color: var(--text);
  font-weight: 700;
}

/* ── EINTRÄGE NACH KATEGORIE (aufklappbar) */
.insights-cat-group {
  border-radius: var(--radius);
  background: var(--card-soft);
  margin-bottom: 7px;
}
.insights-cat-group:last-child {
  margin-bottom: 0;
}
.insights-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  cursor: pointer;
  user-select: none;
}
.insights-cat-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: clamp(.84rem, 2.5vw, .9rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.insights-cat-count {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: .68rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}
.insights-cat-total {
  font-weight: 700;
  font-size: clamp(.84rem, 2.5vw, .9rem);
  flex-shrink: 0;
}
.insights-cat-chevron {
  color: var(--muted);
  font-size: 1rem;
  flex-shrink: 0;
  transition: transform .25s;
}
.insights-cat-group.open .insights-cat-chevron {
  transform: rotate(180deg);
}
.insights-cat-body {
  display: none;
  padding: 0 8px 8px;
}
.insights-cat-group.open .insights-cat-body {
  display: block;
}
.insights-cat-body .tx-item {
  background: var(--card);
}

/* ── CALENDAR */
@media (min-width:768px) {
  #analysisView.calendar-main {
      display: block;
      padding: 22px 20px 50px;
    }
  #analysisView.calendar-main .card {
      height: auto;
    }
}
