/* Selected ivory/forest concept. Scope all overrides to course statistics. */
.course-statistics-intro { display:none; }
.portal-body #finance:has([data-course-statistics-dashboard]:not([hidden])) { --course-ink:#214f40; --course-muted:#738880; --course-line:#e2e8e1; --course-paper:#fffefa; background:#fffefa; }
.portal-body #finance:has([data-course-statistics-dashboard]:not([hidden])) .analytics-controls { position:relative; padding:18px 0 22px!important; min-height:88px; border:0!important; border-radius:0!important; background:transparent!important; box-shadow:none!important; gap:24px; }
.portal-body #finance:has([data-course-statistics-dashboard]:not([hidden])) .analytics-controls::after { content:""; position:absolute; z-index:0; pointer-events:none; width:240px; height:180px; right:-26px; top:-20px; background:url('../images/pricing-botanical-leaf.png') center/cover no-repeat; opacity:.14; transform:rotate(180deg); mix-blend-mode:multiply; }
.portal-body #finance:has([data-course-statistics-dashboard]:not([hidden])) .analytics-controls > * { position:relative; z-index:1; }
.portal-body #finance:has([data-course-statistics-dashboard]:not([hidden])) .analytics-current-view { display:grid; gap:5px; border-left:6px solid var(--course-ink); padding-left:18px; }
.portal-body #finance:has([data-course-statistics-dashboard]:not([hidden])) .analytics-current-view > span { display:none; }
.portal-body #finance:has([data-course-statistics-dashboard]:not([hidden])) .analytics-current-view strong { color:var(--course-ink)!important; font-size:27px!important; font-weight:750; line-height:1.2; }
.portal-body #finance:has([data-course-statistics-dashboard]:not([hidden])) .course-statistics-intro { display:block; color:var(--course-muted); font-size:14px; font-weight:400; }
.portal-body #finance:has([data-course-statistics-dashboard]:not([hidden])) .analytics-period-controls { gap:12px; }
.portal-body #finance:has([data-course-statistics-dashboard]:not([hidden])) .analytics-period-controls select,
.portal-body #finance:has([data-course-statistics-dashboard]:not([hidden])) .analytics-date-range { min-height:44px!important; border:1px solid var(--course-line)!important; border-radius:9px!important; background:#fffefa!important; color:#254739!important; font-size:15px!important; padding:10px 18px!important; }
.portal-body #finance:has([data-course-statistics-dashboard]:not([hidden])) .analytics-export { min-height:44px!important; padding:10px 22px!important; color:#fffefa!important; background:#214f40!important; border:1px solid #214f40!important; border-radius:9px!important; font-size:16px!important; box-shadow:none!important; }
.portal-body .course-statistics-dashboard { gap:24px; color:#214f40; min-width:0; }
.portal-body .course-statistics-section-tabs { border:0; border-radius:0; padding:0; gap:0; grid-template-columns:repeat(3,minmax(0,23%)); background:#f1f4ee; }
.portal-body .course-statistics-section-tabs button { border:0; border-bottom:3px solid transparent; border-radius:0; box-shadow:none; background:transparent; min-height:80px; padding:16px 24px; gap:20px; }
.portal-body .course-statistics-section-tabs button > i { color:#285641; font-size:28px; }
.portal-body .course-statistics-section-tabs button b { color:#214f40; font-size:17px; font-weight:650; }
.portal-body .course-statistics-section-tabs button small { color:#738880; font-size:13px; }
.portal-body .course-statistics-section-tabs button.is-active { background:#e8eee5; border-bottom-color:#285641; color:#214f40; box-shadow:none; }
.portal-body .course-statistics-section-tabs button.is-active > i,
.portal-body .course-statistics-section-tabs button.is-active b { color:#214f40; }
.portal-body .course-statistics-section-tabs button:hover { background:#e9eee7; }
.portal-body .course-statistics-section { display:grid; gap:22px; min-width:0; }
.portal-body .course-statistics-section[hidden], .portal-body .course-statistics-dashboard[hidden] { display:none; }
.portal-body .course-consumption-toolbar { border:0; border-radius:0; background:transparent; padding:0; min-height:72px; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:20px; }
.portal-body .course-consumption-toolbar h3 { color:#214f40; font-size:30px; font-weight:750; line-height:1.25; margin:0 0 8px; }
.portal-body .course-consumption-toolbar p { font-size:15px; color:#658074; }
.portal-body .course-consumption-periods { background:#f0f3ed; border-radius:24px; gap:8px; padding:6px; }
.portal-body .course-consumption-periods:last-child { justify-self:end; min-width:248px; justify-content:space-between; }
.portal-body .course-consumption-periods button { border:0; box-shadow:none; min-height:40px; min-width:68px; padding:8px 18px; border-radius:16px; color:#365848; background:#fffefa; font-size:15px; font-weight:500; }
.portal-body .course-consumption-periods:last-child button { background:transparent; }
.portal-body .course-consumption-periods button.is-active { color:#fffefa; background:#285641; font-weight:650; }
.portal-body .course-consumption-periods button:hover:not(.is-active) { background:#e2e9df; }
.portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary { border:0; padding:0; border-radius:0; background:transparent; display:grid; grid-template-columns:32% repeat(3,minmax(0,1fr)); gap:0; overflow:visible; }
.portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary article { display:grid; grid-template-columns:60px minmax(0,1fr); grid-template-rows:auto auto auto; align-content:center; align-items:center; column-gap:22px; row-gap:14px; min-height:180px; padding:24px; background:#fffefa; border:1px solid #e2e8e1; border-left:0; }
.portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary article:nth-child(2) { border-left:1px solid #e2e8e1; border-radius:16px 0 0 16px; }
.portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary article:last-child { border-radius:0 16px 16px 0; }
.portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary article:first-child { grid-template-columns:32px minmax(0,1fr); margin-right:16px; border:1px solid #285641; border-radius:16px; padding:28px 32px; column-gap:14px; background:#214f40 url('../images/consumption-metric-texture.png') center/cover no-repeat; }
.portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary .consumption-metric-icon { grid-column:1; grid-row:1 / 3; align-self:start; color:#285641; font-size:28px; background:#f0f3ed; width:60px; height:60px; border-radius:50%; display:grid; place-items:center; }
.portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary article:first-child .consumption-metric-icon { width:auto; height:auto; border-radius:0; background:transparent; grid-row:1; color:#e9ce79; font-size:26px; }
.portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary span { grid-column:2; color:#285641; font-size:16px; }
.portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary strong { grid-column:2; display:block; margin:0; color:#214f40; font-size:34px; font-weight:750; line-height:1.2; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary small { grid-column:2; display:block; margin:0; color:#738880; font-size:14px; line-height:1.6; }
.portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary article:first-child span { color:#edd388; font-size:20px; }
.portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary article:first-child strong { color:#fffefa; font-size:44px; }
.portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary article:first-child small { color:#c0d2c6; }
.portal-body .course-statistics-table-panel { border:1px solid #e2e8e1!important; border-radius:16px!important; background:#fffefa!important; padding:22px!important; box-shadow:none!important; min-height:306px!important; }
.portal-body .course-statistics-table-panel header { margin:0 0 12px; align-items:start; }
.portal-body .course-statistics-table-panel header h3 { margin:0 0 8px; color:#214f40!important; font-size:21px!important; }
.portal-body .course-statistics-table-panel header p { color:#738880!important; font-size:14px!important; line-height:1.6; }
.portal-body .course-statistics-table-panel header > span { color:#214f40!important; font-size:16px!important; }
.portal-body .course-statistics-table th { padding:14px 20px!important; background:#f1f4ee!important; color:#597064!important; font-size:14px!important; border:0!important; }
.portal-body .course-statistics-table th:first-child { border-radius:10px 0 0 0; }
.portal-body .course-statistics-table th:last-child { border-radius:0 10px 0 0; }
.portal-body .course-statistics-table td { padding:18px 20px!important; border-bottom:1px solid #e2e8e1!important; color:#365848; font-size:15px; }
.portal-body .course-statistics-table td[colspan] { height:130px; text-align:center; border-bottom:0!important; padding-block:12px!important; }
.portal-body .course-statistics-table .analytics-empty { color:#738880; font-size:14px; padding:12px 0; }
.portal-body .consumption-empty-icon { display:block; font-size:48px; line-height:1.2; color:#a8bdb0; margin:12px 0; }
.portal-body .course-statistics-table .is-normal { color:#236b4d; }
.portal-body .course-statistics-table .is-anomaly { color:#9c612c; }
.portal-body .course-statistics-dashboard :focus-visible { outline:2px solid #285641; outline-offset:3px; }
@media(max-width:1200px) {
  .portal-body .course-statistics-section-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .portal-body .course-consumption-toolbar { grid-template-columns:1fr auto; }
  .portal-body .course-consumption-toolbar > div:first-child { grid-column:1 / -1; }
  .portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary article { column-gap:12px; padding:20px 16px; grid-template-columns:42px minmax(0,1fr); }
  .portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary .consumption-metric-icon { width:42px; height:42px; font-size:23px; }
}
@media(max-width:760px) {
  .portal-body .course-statistics-section-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .portal-body .course-statistics-section-tabs button { min-width:0; flex-direction:column; align-items:flex-start; padding:12px 10px; gap:8px; }
  .portal-body .course-statistics-section-tabs button b { font-size:13px; line-height:1.6; }
  .portal-body .course-statistics-section-tabs button small { display:none; }
  .portal-body .course-statistics-table-panel { min-width:0; }
  .portal-body .course-consumption-toolbar { display:flex; flex-direction:column; align-items:stretch; gap:16px; }
  .portal-body .course-consumption-toolbar h3 { font-size:26px; }
  .portal-body .course-consumption-periods { justify-content:space-between; gap:3px; padding:4px; }
  .portal-body .course-consumption-periods button { flex:1; min-width:0; padding:9px 10px; font-size:14px; }
  .portal-body .course-consumption-periods:last-child { min-width:0; align-self:flex-end; width:200px; }
  .portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary article:first-child { grid-column:1 / -1; margin:0 0 14px; min-height:170px; }
  .portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary article:not(:first-child) { display:flex; flex-direction:column; align-items:flex-start; min-height:170px; gap:12px; padding:16px 12px; }
  .portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary article:not(:first-child) span { font-size:13px; }
  .portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary article:not(:first-child) strong { font-size:24px; }
  .portal-body [data-course-statistics-panel="consumption"] .course-statistics-summary article:not(:first-child) small { font-size:12px; }
  .portal-body .course-statistics-table-panel { padding:16px!important; }
  .portal-body .course-statistics-table { min-width:680px; }
  .portal-body .course-statistics-table td[colspan] { text-align:left; }
  .portal-body .course-statistics-table td[colspan] > * { width:240px; text-align:center; }
}

.portal-body .course-statistics-section-tabs { grid-template-columns:repeat(4,minmax(0,1fr)); }
.portal-body .stored-balance-pagination { display:flex; justify-content:flex-end; align-items:center; gap:16px; margin-top:20px; }
.portal-body [data-stored-balance-search] { padding:10px; margin:12px 0; border:1px solid #dce5df; border-radius:8px; max-width:100%; }
@media(max-width:760px) { .portal-body .course-statistics-section-tabs { grid-template-columns:repeat(2,minmax(0,1fr))!important; } }
