.analytics-page { --chart-blue: #3278cf; --chart-green: #28856b; --chart-red: #c85850; letter-spacing: 0; }
.analytics-page h1, .analytics-page h2, .analytics-page h3 { letter-spacing: 0; }
.analytics-page .heading { align-items: flex-start; gap: 16px; }
.analytics-page .heading > div { min-width: 0; }
.analytics-page .heading p { font-size: 13px; overflow-wrap: anywhere; }
.analytics-page .primary img { filter: brightness(0) invert(1); }
.analytics-page button:active:not(:disabled) { transform: translateY(1px); }
.analytics-page button:disabled { cursor: not-allowed; }
.analytics-icon { width: 36px; height: 36px; min-height: 36px; padding: 8px; flex: 0 0 36px; }
.analytics-icon img { width: 18px; height: 18px; }
.analytics-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.analytics-metric { min-width: 0; min-height: 140px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.analytics-metric > span { color: var(--muted); font-size: 13px; }
.analytics-metric > strong { display: block; color: #225993; font-size: 32px; line-height: 1.3; font-weight: 650; margin: 12px 0 9px; font-variant-numeric: tabular-nums; }
.analytics-metric > small { font-size: 12px; display: block; overflow-wrap: anywhere; }
.analytics-metric.metric-good > strong, .analytics-metric.metric-good > small { color: var(--chart-green); }
.analytics-metric.metric-alert > strong { color: var(--chart-red); }
.analytics-section { min-width: 0; padding: 24px; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.analytics-section > :last-child { margin-bottom: 0; }
.analytics-section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 18px; margin-bottom: 24px; }
.analytics-section-head > div { min-width: 0; }
.analytics-section-head h2 { margin: 0; font-size: 18px; line-height: 1.5; }
.analytics-section-head p { margin: 5px 0 0; font-size: 12px; }
.analytics-section-head .muted { font-size: 12px; }
.analytics-two { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1px; border-block: 1px solid var(--line); background: var(--line); margin-bottom: 24px; }
.analytics-two > .analytics-section { margin: 0; border: 0; }
.chart-key { display: flex; gap: 20px; color: var(--muted); font-size: 12px; margin-bottom: 15px; }
.chart-key > span { display: inline-flex; align-items: center; gap: 7px; }
.chart-key i, .legend-row i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.intent-swatch { background: #9cc8f6; }
.settled-swatch { background: #285b98; }
.comparison-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 84px; align-items: center; gap: 12px; width: 100%; min-height: 43px; padding: 10px 0; border: 0; border-radius: 0; background: transparent; text-align: left; font-size: 13px; font-weight: 500; }
.comparison-row:hover { background: #f7f9fc; }
.comparison-value { text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.comparison-track { position: relative; display: block; height: 11px; border-radius: 5px; background: #edf1f6; overflow: hidden; }
.comparison-track > span { position: absolute; left: 0; top: 0; height: 100%; border-radius: 5px; }
.intent-bar { background: #9cc8f6; }
.settled-bar { background: #285b98; }
.donut-layout { display: grid; grid-template-columns: minmax(150px, 210px) minmax(155px, 1fr); align-items: center; justify-content: center; gap: 18px; min-height: 280px; }
.donut-chart { position: relative; width: 100%; max-width: 240px; aspect-ratio: 1; justify-self: center; }
.donut-chart canvas { display: block; width: 100%; height: 100%; }
.donut-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; pointer-events: none; }
.donut-center strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.donut-center span { font-size: 14px; color: var(--muted); }
.donut-legend { display: grid; gap: 3px; min-width: 0; }
.legend-row { display: grid; grid-template-columns: 10px 28px minmax(54px, 1fr) 40px; align-items: center; gap: 8px; min-height: 34px; padding: 6px 0; width: 100%; border: 0; border-radius: 0; font-size: 12px; font-weight: 400; text-align: left; background: transparent; }
.legend-row strong { text-align: right; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.legend-row small { text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
.legend-row:hover { color: var(--chart-blue); }
.analytics-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.analytics-tabs button { min-width: 60px; min-height: 34px; border: 0; border-radius: 5px; padding: 5px 12px; background: #f1f4f7; color: var(--muted); font-weight: 500; font-size: 12px; }
.analytics-tabs button[aria-pressed="true"] { background: #e6f0fb; color: #285b98; font-weight: 650; }
.analytics-section-head .analytics-tabs { margin: 0; }
.recent-students { min-width: 0; }
.recent-student { width: 100%; display: grid; grid-template-columns: 38px minmax(150px, 1.2fr) minmax(100px, .8fr) auto 18px; gap: 16px; padding: 18px 0; min-height: 82px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; font-weight: 400; }
.recent-student:hover { background: #f8fafc; }
.student-initial { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #eaf2fb; color: #4b76a9; font-size: 16px; font-weight: 600; }
.student-identity, .student-stage { min-width: 0; overflow-wrap: anywhere; }
.student-identity strong { display: block; font-size: 14px; }
.student-identity small { display: block; font-size: 12px; margin-top: 3px; }
.student-stage { font-size: 13px; color: var(--chart-blue); }
.student-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.focus-students { list-style: none; padding: 0; margin: 0; }
.focus-students > li { padding: 14px 0; border-top: 1px solid var(--line); }
.focus-students > li:first-child { padding-top: 0; border-top: 0; }
.focus-students > li:last-child { padding-bottom: 0; }
.focus-student-head { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px; align-items: center; gap: 8px; }
.student-name { display: inline; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; text-align: left; color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
.student-name:hover { color: var(--chart-blue); text-decoration: underline; }
.focus-student-head > .student-name { font-size: 15px; }
.focus-student-head .analytics-icon { border-color: transparent; }
.focus-student-meta { font-size: 12px; color: var(--muted); margin: 3px 0 0; overflow-wrap: anywhere; }
.support-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; border-left: 2px solid #bed6ee; margin: 9px 0 0; padding: 4px 0 4px 10px; color: #426e9b; font-size: 12px; line-height: 1.7; }
.progress-pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 8px 0 10px; margin: 0; gap: 0; }
.progress-pipeline > li { position: relative; min-width: 0; }
.progress-pipeline > li:not(:last-child)::after { content: ""; position: absolute; height: 3px; top: 33px; left: calc(50% + 46px); right: calc(-50% + 46px); background: #d5e4f5; }
.progress-node { display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: 12px; width: 100%; min-height: 108px; padding: 0 8px; border: 0; border-radius: 0; background: transparent; font-weight: 500; text-align: center; }
.progress-node strong { display: grid; place-items: center; width: 66px; height: 66px; flex: 0 0 66px; border-radius: 50%; background: #eaf2fc; color: #2d629b; font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
.progress-node > span { font-size: 13px; color: #54697f; overflow-wrap: anywhere; }
.progress-final .progress-node strong { color: #278369; background: #e7f4ed; }
.progress-node[aria-pressed="true"] strong { outline: 2px solid var(--chart-blue); outline-offset: 4px; }
.progress-node:hover strong { box-shadow: inset 0 0 0 2px #b1cce9; }
.followup-two { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.breakdown-chart { display: grid; gap: 18px; }
.breakdown-row { display: block; border: 0; background: transparent; width: 100%; padding: 4px 0; border-radius: 0; text-align: left; font-weight: 400; }
.breakdown-label { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin-bottom: 9px; color: #596a7e; }
.breakdown-label > span { min-width: 0; overflow-wrap: anywhere; }
.breakdown-label > strong { white-space: nowrap; font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 600; }
.breakdown-track { display: block; width: 100%; height: 12px; border-radius: 6px; background: #edf1f6; overflow: hidden; }
.breakdown-track > span { display: block; height: 100%; border-radius: 6px; }
.breakdown-row:hover .breakdown-label, .breakdown-row[aria-pressed="true"] .breakdown-label { color: #285b98; }
.breakdown-row[aria-pressed="true"] .breakdown-track { outline: 2px solid #8db7dd; outline-offset: 3px; }
.analytics-search { width: 248px; max-width: 100%; min-width: 0; font-size: 13px; }
.analytics-status { width: 128px; max-width: 100%; font-size: 13px; }
.analytics-student-table { min-width: 0; }
.analytics-student-table table { min-width: 660px; }
.analytics-student-table th { background: transparent; }
.analytics-student-table th, .analytics-student-table td { padding: 15px 12px; }
.analytics-student-table td { overflow-wrap: anywhere; max-width: 260px; }
.analytics-student-table .student-name { min-height: 0; padding: 0; font-size: 13px; }
.analytics-student-table td small { margin-top: 4px; font-variant-numeric: tabular-nums; }
.analytics-student-table td .analytics-icon { width: 34px; height: 34px; min-height: 34px; padding: 8px; }
.active-chart-filter { display: flex; align-items: center; gap: 12px; color: #285b98; font-size: 12px; margin-bottom: 12px; overflow-wrap: anywhere; }
.active-chart-filter:empty { display: none; }
.active-chart-filter .analytics-icon { width: 28px; height: 28px; min-height: 28px; padding: 6px; flex-basis: 28px; }
.analytics-placeholder { border-radius: 6px; background: #e5eaf0; }
.skeleton-heading { width: 240px; max-width: 100%; height: 54px; margin-bottom: 24px; }
.skeleton-metric { height: 140px; }
.skeleton-chart { height: 360px; }
@media (max-width: 1200px) {
  .analytics-two { grid-template-columns: 1fr; }
  .donut-layout { grid-template-columns: minmax(150px, 230px) minmax(155px, 210px); gap: 24px; min-height: 250px; }
  .analytics-metric { padding: 16px; }
  .analytics-metric > strong { font-size: 29px; }
}
@media (max-width: 900px) {
  .analytics-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .recent-student { grid-template-columns: 38px minmax(0, 1fr) 18px; gap: 10px 14px; }
  .recent-student > img { grid-column: 3; grid-row: 1; }
  .recent-student .student-stage { grid-column: 2; }
  .recent-student .student-badges { grid-column: 2; }
}
@media (max-width: 600px) {
  .analytics-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .analytics-metric { min-height: 130px; padding: 16px; }
  .analytics-metric:last-child { grid-column: 1 / -1; }
  .analytics-metric > strong { font-size: 28px; }
  .analytics-section { padding: 20px 16px; }
  .analytics-section-head { gap: 12px; margin-bottom: 22px; }
  .analytics-section-head h2 { font-size: 16px; }
  .analytics-section-head > .actions { width: 100%; }
  .donut-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .donut-chart { width: 210px; max-width: 100%; }
  .donut-legend { width: 100%; max-width: 260px; justify-self: center; }
  .legend-row { grid-template-columns: 10px 40px minmax(54px, 1fr) 42px; }
  .comparison-row { grid-template-columns: 32px minmax(0, 1fr) 70px; gap: 8px; }
  .progress-pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 0; }
  .progress-pipeline > li:nth-child(2)::after { display: none; }
  .progress-node { min-height: 102px; padding: 0 5px; }
  .progress-node > span { font-size: 12px; }
  .analytics-search { width: 100%; }
  .analytics-status { flex: 1; }
  .focus-student-head { grid-template-columns: minmax(0, 1fr) auto 32px; gap: 5px; }
  .focus-student-head .analytics-icon { width: 32px; height: 32px; min-height: 32px; padding: 7px; }
  .focus-student-head .student-badges { max-width: 120px; }
}
@media (prefers-reduced-motion: no-preference) {
  .analytics-loading .analytics-placeholder { animation: analytics-loading 1.6s ease-in-out infinite alternate; }
  @keyframes analytics-loading { to { opacity: .45; } }
}
