.charts-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .7fr); gap: 14px; margin-top: 16px; }
.chart-box { min-height: 280px; }
.chart-box canvas { width: 100% !important; max-height: 260px; }
.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.chart-head h3 { font-size: 14px; font-weight: 650; letter-spacing: -0.02em; margin: 0; }
.chart-head p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.chart-head .go { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.chart-head .go::after { content: " →"; }
a.card:hover .go, .card:hover > .chart-head .go { color: var(--accent); }

a.card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
a.card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); transform: translateY(-1px); }
a.kpi-link { min-height: 76px; }
a.insight {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, background .15s ease;
}
a.insight:hover { border-color: var(--accent); background: var(--accent-dim); }
.insights { display: grid; gap: 8px; }

.dash-main {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .78fr);
  gap: 14px;
  margin-top: 14px;
}
.dash-side { display: grid; gap: 14px; align-content: start; }
.dash-hero { min-height: 0; padding-bottom: 14px; }
.dash-hero-plot { position: relative; height: 210px; }
.dash-hero-plot canvas { width: 100% !important; height: 100% !important; }
.chart-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 13px; color: var(--muted); pointer-events: none;
}
.dash-mid, .dash-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.dash-bottom { grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, .9fr); }
.dash-rhythm .rhythm-days { max-width: none; margin-bottom: 16px; }
.dash-rhythm a.rhythm-day { text-decoration: none; color: inherit; }
.dash-empty { font-size: 13px; margin: 8px 0 0; }

.mix-bar {
  display: flex; height: 14px; overflow: hidden; background: var(--surface-3); gap: 2px;
}
.mix-seg { display: block; min-width: 0; }
.mix-seg:hover { filter: brightness(1.08); }
.tone-ok { background: var(--ok); }
.tone-warn { background: var(--warning); }
.tone-mute { background: var(--faint); }
.tone-info { background: var(--info); }
.mix-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-top: 12px;
}
.mix-legend a {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-2); text-decoration: none;
}
.mix-legend a:hover { color: var(--text); }
.mix-legend i { width: 8px; height: 8px; display: block; flex-shrink: 0; }
.mix-legend strong { font-variant-numeric: tabular-nums; }

.hbar-list { display: grid; gap: 10px; }
a.hbar { display: grid; gap: 5px; text-decoration: none; color: inherit; }
.hbar-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.hbar-meta strong { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); font-weight: 650; }
.hbar-track { display: block; height: 8px; background: var(--surface-3); overflow: hidden; }
.hbar-fill {
  display: block; height: 100%; background: var(--accent);
  transform-origin: left; animation: barGrow .45s ease both;
}
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hour-bars {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  height: 140px;
}
a.hour-col {
  display: grid; justify-items: center; align-content: end; gap: 6px;
  height: 100%; text-decoration: none; color: inherit;
}
.hour-fill {
  width: 100%; max-width: 18px; background: var(--accent);
  min-height: 2px; transform-origin: bottom; animation: rhythmRise .45s ease both;
}
.hour-lab { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }

.spark-card { display: flex; flex-direction: column; min-height: 168px; }
.spark-val { font-size: 28px; font-weight: 750; letter-spacing: -0.05em; margin: 2px 0 12px; }
.spark {
  display: flex; align-items: flex-end; gap: 3px; height: 72px; margin-top: auto;
}
.spark span {
  flex: 1; background: var(--accent); min-width: 2px; opacity: .85;
  transform-origin: bottom; animation: rhythmRise .4s ease both;
}

@media (max-width: 1300px) {
  .dash-bottom { grid-template-columns: 1fr 1fr; }
  .dash-bottom .card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .charts-grid, .dash-main, .dash-mid, .dash-bottom { grid-template-columns: 1fr; }
  .dash-bottom .card:first-child { grid-column: auto; }
  .dash-hero-plot { height: 180px; }
}

.today-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 980px) { .today-grid { grid-template-columns: 1fr; } }
.appt-row {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border-subtle);
}
.appt-row:last-child { border-bottom: 0; }
.appt-time { font-weight: 700; font-size: 15px; letter-spacing: -0.03em; }
.appt-row .actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 700px) {
  .appt-row { grid-template-columns: 56px 1fr; }
  .appt-row .actions { grid-column: 1 / -1; }
}

.agenda-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.day-slots { display: grid; gap: 4px; }
.slot {
  display: grid; grid-template-columns: 58px 1fr; gap: 10px; min-height: 44px; align-items: stretch;
}
.slot time { color: var(--muted); font-size: 12px; padding-top: 10px; }
.slot .box {
  border: 1px dashed var(--border); border-radius: 10px; padding: 8px 10px; min-height: 42px;
  color: var(--faint); cursor: pointer;
}
.slot .box:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.slot .box.busy {
  border-style: solid; background: var(--surface-2); color: var(--text); cursor: pointer;
}
.week-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week-col { background: var(--surface); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 8px; min-height: 0; }
.week-col.is-empty { min-height: 0; }
.week-col h4 { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.week-free { font-size: 11px; }
.week-item { font-size: 12px; padding: 5px 7px; border-radius: 7px; background: var(--accent-dim); margin-bottom: 4px; cursor: pointer; }
a.week-item { display: grid; gap: 1px; text-decoration: none; color: inherit; }
a.week-item:hover { background: var(--accent-strong); }
a.week-item.is-muted { opacity: .55; }
a.week-item span { font-size: 10px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
a.week-item .badge { padding: 1px 6px; font-size: 10px; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.month-cell { min-height: 88px; background: var(--surface); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 8px; font-size: 12px; }
.month-cell .n { color: var(--muted); }
.month-cell .dot-row { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.month-cell .pdot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
@media (max-width: 1200px) {
  .week-grid { grid-template-columns: repeat(7, minmax(148px, 1fr)); min-width: 1080px; }
}
@media (max-width: 700px) {
  .week-grid { min-width: 980px; }
  .month-cell { min-height: 52px; padding: 6px; }
  .slot { grid-template-columns: 48px 1fr; min-height: 44px; }
  .slot .box { min-height: 40px; padding: 6px 8px; }
  .appt-row .actions .btn { min-height: 40px; }
}

.profile-back { margin: 0; font-size: 13px; }
.profile-back a { color: var(--muted); }
.profile-back a:hover { color: var(--accent); }
.hist-sub { font-size: 12px; color: var(--muted); margin: 14px 0 8px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.hist-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--border-subtle); text-decoration: none; color: inherit;
}
a.hist-row:hover { color: var(--accent); }
.hist-row:last-child { border-bottom: 0; }
.hist-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.hist-row-side .money { font-size: 13px; font-weight: 650; }
.stat-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.stat-pill { background: var(--bg); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 10px 12px; min-width: 120px; }
.stat-pill span { display: block; font-size: 11px; color: var(--muted); }
.stat-pill strong { font-size: 16px; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .75fr); gap: 16px; }
@media (max-width: 900px) {
  .profile-hero, .profile-grid { grid-template-columns: 1fr; }
}

.return-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); }
.return-item:last-child { border-bottom: 0; }
@media (max-width: 700px) { .return-item { grid-template-columns: 1fr; } }

.hours-grid { display: grid; gap: 8px; }
.hours-row { display: grid; grid-template-columns: 90px 1fr 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 600px) { .hours-row { grid-template-columns: 1fr 1fr; } }

.rhythm {
  margin: 4px 0 18px;
  padding: 18px 0 4px;
  border-top: 1px solid var(--border-subtle);
}
.rhythm h2 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
}
.rhythm > p { margin: 0 0 16px; font-size: 13px; max-width: 42ch; }
.rhythm-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
  max-width: 520px;
  margin-bottom: 22px;
}
.rhythm-day {
  display: grid;
  justify-items: center;
  gap: 6px;
}
.rhythm-qty { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rhythm-col {
  width: 100%;
  max-width: 36px;
  height: 72px;
  background: var(--surface-3);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.rhythm-fill {
  width: 100%;
  background: var(--accent);
  min-height: 0;
  transform-origin: bottom;
  animation: rhythmRise .45s ease both;
}
.rhythm-day.is-best .rhythm-fill { background: var(--accent-2); }
.rhythm-day.is-best .rhythm-lab { color: var(--text); font-weight: 650; }
.rhythm-lab { font-size: 11px; color: var(--muted); }
@keyframes rhythmRise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.heat-scroll { overflow-x: auto; padding-bottom: 6px; }
.heat {
  --cell: 11px;
  --gap: 3px;
  --week: calc(var(--cell) + var(--gap));
  min-width: min-content;
}
.heat-months {
  display: grid;
  grid-template-columns: 28px repeat(var(--weeks), var(--week));
  height: 16px;
  margin-bottom: 4px;
  font-size: 10px;
  color: var(--muted);
  text-transform: lowercase;
}
.heat-months span { white-space: nowrap; }
.heat-body { display: flex; gap: 6px; align-items: start; }
.heat-wd {
  display: grid;
  grid-template-rows: repeat(7, var(--cell));
  gap: var(--gap);
  width: 22px;
  font-size: 10px;
  color: var(--muted);
  line-height: var(--cell);
}
.heat-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, var(--cell));
  grid-auto-columns: var(--cell);
  gap: var(--gap);
}
.heat-cell {
  width: var(--cell);
  height: var(--cell);
  background: var(--border-subtle);
  display: block;
  text-decoration: none;
}
.heat-cell[data-l="1"] { background: color-mix(in srgb, var(--accent) 32%, var(--surface)); }
.heat-cell[data-l="2"] { background: color-mix(in srgb, var(--accent) 52%, var(--surface)); }
.heat-cell[data-l="3"] { background: color-mix(in srgb, var(--accent) 78%, var(--surface)); }
.heat-cell[data-l="4"] { background: var(--accent); }
.heat-cell.is-future { opacity: .28; }
.heat-cell:hover { outline: 1px solid var(--text); outline-offset: 0; }
.heat-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}
.heat-legend i {
  width: 11px;
  height: 11px;
  display: block;
  background: var(--border-subtle);
}
.heat-legend i[data-l="1"] { background: color-mix(in srgb, var(--accent) 32%, var(--surface)); }
.heat-legend i[data-l="2"] { background: color-mix(in srgb, var(--accent) 52%, var(--surface)); }
.heat-legend i[data-l="3"] { background: color-mix(in srgb, var(--accent) 78%, var(--surface)); }
.heat-legend i[data-l="4"] { background: var(--accent); }

@media (max-width: 700px) {
  .rhythm-days { gap: 6px; }
  .rhythm-col { height: 56px; max-width: 28px; }
  .heat { --cell: 10px; --gap: 2px; }
}

