/* Customer dashboard accounting summary · actual charges only */

#appView .dashboard-accounting-overview {
  --dashboard-blue: #146ff8;
  --dashboard-blue-soft: #edf5ff;
  --dashboard-green: #087f56;
  --dashboard-green-soft: #eaf8f2;
  --dashboard-slate: #64748b;
  --dashboard-slate-soft: #f1f5f9;
  --dashboard-amber: #b86400;
  --dashboard-amber-soft: #fff7e8;
  container-type: inline-size;
}

#appView .dashboard-accounting-overview .dashboard-period-content {
  display: grid;
  gap: .9rem;
}

#appView .dashboard-accounting-overview .dashboard-simple-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .8rem;
}

#appView .dashboard-accounting-overview .dashboard-simple-stat {
  --stat-accent: var(--dashboard-blue);
  --stat-soft: var(--dashboard-blue-soft);
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: initial;
  gap: .8rem;
  min-width: 0;
  min-height: 8.6rem;
  padding: 1.05rem 1.1rem 1rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: .9rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025), 0 .75rem 1.75rem rgba(15, 23, 42, .035);
}

#appView .dashboard-accounting-overview .dashboard-stat-success {
  --stat-accent: var(--dashboard-green);
  --stat-soft: var(--dashboard-green-soft);
}

#appView .dashboard-accounting-overview .dashboard-stat-cancelled {
  --stat-accent: var(--dashboard-slate);
  --stat-soft: var(--dashboard-slate-soft);
}

#appView .dashboard-accounting-overview .dashboard-stat-spend {
  --stat-accent: var(--dashboard-amber);
  --stat-soft: var(--dashboard-amber-soft);
  background: #fffdfa;
}

#appView .dashboard-accounting-overview .dashboard-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

#appView .dashboard-accounting-overview .dashboard-stat-head > span:first-child {
  color: #475569;
  font-size: .76rem;
  font-weight: 760;
  letter-spacing: .01em;
}

#appView .dashboard-accounting-overview .dashboard-stat-symbol {
  display: grid;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--stat-accent) 20%, transparent);
  border-radius: .6rem;
  background: var(--stat-soft);
  color: var(--stat-accent);
}

#appView .dashboard-accounting-overview .dashboard-stat-symbol svg,
#appView .dashboard-accounting-overview .dashboard-accounting-note-icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#appView .dashboard-accounting-overview .dashboard-simple-stat > strong {
  align-self: end;
  color: #0f172a;
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5cqi, 2.8rem);
  font-weight: 680;
  line-height: .95;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
}

#appView .dashboard-accounting-overview .dashboard-stat-spend > strong {
  color: #8b4c00;
}

#appView .dashboard-accounting-overview .dashboard-simple-stat > small {
  color: #64748b;
  font-size: .7rem;
  line-height: 1.45;
}

#appView .dashboard-accounting-overview .dashboard-accounting-note {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
  padding: .9rem 1rem;
  border: 1px solid rgba(20, 111, 248, .2);
  border-radius: .85rem;
  background: #f5f9ff;
  color: #1e3a5f;
}

#appView .dashboard-accounting-overview .dashboard-accounting-note-icon {
  display: grid;
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border-radius: .65rem;
  background: #e3efff;
  color: #0b63dc;
}

#appView .dashboard-accounting-overview .dashboard-accounting-note > div {
  display: grid;
  min-width: 0;
  gap: .15rem;
}

#appView .dashboard-accounting-overview .dashboard-accounting-note strong {
  overflow-wrap: anywhere;
  color: #102a4c;
  font-size: .8rem;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

#appView .dashboard-accounting-overview .dashboard-accounting-note span:last-child {
  color: #5a6f89;
  font-size: .7rem;
  line-height: 1.45;
}

#appView .dashboard-accounting-overview .dashboard-period-content.is-changing .dashboard-simple-stat,
#appView .dashboard-accounting-overview .dashboard-period-content.is-changing .dashboard-accounting-note {
  animation: dashboard-accounting-in .28s cubic-bezier(.22, 1, .36, 1) both;
}

#appView .dashboard-accounting-overview .dashboard-period-content.is-changing .dashboard-simple-stat:nth-child(2) { animation-delay: 30ms; }
#appView .dashboard-accounting-overview .dashboard-period-content.is-changing .dashboard-simple-stat:nth-child(3) { animation-delay: 60ms; }
#appView .dashboard-accounting-overview .dashboard-period-content.is-changing .dashboard-simple-stat:nth-child(4) { animation-delay: 90ms; }
#appView .dashboard-accounting-overview .dashboard-period-content.is-changing .dashboard-accounting-note { animation-delay: 120ms; }

@keyframes dashboard-accounting-in {
  from { opacity: 0; transform: translateY(.3rem); }
  to { opacity: 1; transform: translateY(0); }
}

@container (min-width: 18rem) {
  #appView .dashboard-accounting-overview .dashboard-simple-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@container (min-width: 58rem) {
  #appView .dashboard-accounting-overview .dashboard-simple-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@container (min-width: 78rem) {
  #appView .dashboard-accounting-overview .dashboard-simple-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #appView .dashboard-accounting-overview .dashboard-simple-stat {
    grid-column: auto;
  }
}

@media (max-width: 29.99rem) {
  #appView .dashboard-accounting-overview .dashboard-simple-stat {
    min-height: 7.7rem;
    padding: .95rem;
  }

  #appView .dashboard-accounting-overview .dashboard-accounting-note {
    align-items: flex-start;
  }
}

@media (min-width: 23rem) and (max-width: 47.99rem) {
  #appView .dashboard-accounting-overview .dashboard-simple-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #appView .dashboard-accounting-overview .dashboard-simple-stat > strong {
    font-size: clamp(1.7rem, 9vw, 2.2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  #appView .dashboard-accounting-overview .dashboard-period-content.is-changing .dashboard-simple-stat,
  #appView .dashboard-accounting-overview .dashboard-period-content.is-changing .dashboard-accounting-note {
    animation: none;
  }
}
