.analytics-page { max-width: 1440px; min-width: 0; }
.analytics-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.analytics-heading h1 { font-size: 36px; line-height: 1.4; letter-spacing: -1.6px; margin: 0 0 3px; }
.analytics-heading h1 span { color: #98b767; }
.analytics-heading > div > p { color: #627365; font-size: 14px; }
.analytics-heading > .button { flex-shrink: 0; }
.analytics-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 22px; }
.analytics-toolbar label,.analytics-panel-heading label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 600; }
.analytics-page select { background: white; color: var(--ink); border: 1px solid #ccd6cb; border-radius: 10px; padding: 11px 34px 11px 12px; max-width: 100%; min-height: 44px; font-size: 13px; }
.analytics-status { color: #627365; font-size: 12px; flex: 1 1 220px; padding-bottom: 12px; }
.analytics-error { margin: 16px 0; }
.analytics-period { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; color: #405746; font-size: 13px; font-weight: 600; line-height: 1.6; margin-bottom: 16px; }
.analytics-period-context { display: block; color: #627365; font-size: 11px; font-weight: 400; }
.analytics-period > small { color: #627365; font-size: 11px; font-weight: 400; text-align: right; }
.analytics-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.analytics-metric-card { background: white; border: 1px solid var(--line); border-radius: 17px; padding: 20px; min-width: 0; }
.analytics-metric-card h2 { font-family: var(--font); color: #536b5a; font-size: 13px; line-height: 1.4; font-weight: 500; }
.analytics-metric-value { display: block; font-family: var(--heading); font-size: 34px; line-height: 1.4; font-weight: 750; margin: 8px 0 4px; letter-spacing: -.7px; overflow-wrap: anywhere; }
.analytics-comparison { color: #657167; font-size: 11px; line-height: 1.55; }
.analytics-comparison > span { color: #405746; font-weight: 600; }
.analytics-metric-hint { color: #657167; font-size: 11px; line-height: 1.55; margin-top: 6px; }
.analytics-panel { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin-bottom: 22px; min-width: 0; }
.analytics-panel-heading { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.analytics-panel-heading h2 { font-size: 17px; letter-spacing: -.3px; line-height: 1.4; }
.analytics-panel-heading p { font-size: 12px; line-height: 1.6; color: #657167; margin-top: 6px; }
.analytics-scope { flex-shrink: 0; align-self: start; border: 1px solid #e6ebe1; border-radius: 20px; background: #f7f9f3; padding: 3px 8px; color: #536b5a; font-size: 10px; font-weight: 600; line-height: 1.5; }
.analytics-chart-summary { font-size: 12px; color: #536b5a; line-height: 1.6; margin-bottom: 14px; }
.analytics-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.analytics-chart text { font-family: var(--font); fill: #627365; font-size: 11px; }
.analytics-chart .analytics-grid-line { stroke: #e7eae4; stroke-width: 1; }
.analytics-chart .analytics-trend-line { stroke: var(--forest); stroke-width: 2.5; fill: none; stroke-linejoin: round; }
.analytics-chart .analytics-trend-fill { fill: #d9ef8a; opacity: .32; }
.analytics-chart .analytics-today-marker { fill: var(--forest); stroke: white; stroke-width: 2; }
.analytics-chart-data { margin-top: 14px; font-size: 12px; }
.analytics-page summary { cursor: pointer; font-weight: 600; line-height: 1.6; min-height: 35px; padding: 8px 0; }
.analytics-page summary:focus-visible { outline: 2px solid #426f47; outline-offset: 5px; }
.analytics-two-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.analytics-totals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 16px; margin: 0; }
.analytics-totals div { min-width: 0; }
.analytics-totals dt { color: #657167; font-size: 12px; line-height: 1.5; }
.analytics-totals dd { font-size: 25px; font-weight: 700; margin: 5px 0 0; overflow-wrap: anywhere; }
.analytics-totals small { display: block; font-size: 11px; font-weight: 400; color: #657167; line-height: 1.6; margin-top: 4px; }
.analytics-backlog { display: flex; flex-direction: column; }
.analytics-backlog-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; text-align: left; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.analytics-backlog-row:first-child { padding-top: 0; }
.analytics-backlog-row:last-child { border-bottom: 0; padding-bottom: 0; }
.analytics-backlog-row span { display: block; }
.analytics-backlog-row small { display: block; margin-top: 4px; color: #657167; font-size: 11px; }
.analytics-backlog-row strong { min-width: 30px; text-align: center; background: #f1f5ed; border-radius: 8px; padding: 5px 8px; }
.analytics-backlog-row.has-queue strong { background: #fff1cf; color: #765823; }
.analytics-table-scroll { overflow-x: auto; max-width: 100%; }
.analytics-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.analytics-table th { color: #657167; font-weight: 500; font-size: 11px; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.analytics-table th:last-child,.analytics-table td:last-child { text-align: right; padding-left: 14px; white-space: nowrap; }
.analytics-table td { border-bottom: 1px solid var(--line); padding: 13px 0; line-height: 1.5; overflow-wrap: anywhere; }
.analytics-table tbody tr:last-child td { border-bottom: 0; }
.analytics-table td:first-child { width: 75%; }
.analytics-table small { display: block; color: #657167; font-size: 10px; margin-top: 3px; }
.analytics-table td:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.analytics-empty { border: 1px dashed #d9e1d6; border-radius: 12px; padding: 25px 16px; text-align: center; color: #657167; font-size: 13px; line-height: 1.7; }
.analytics-breakdown { display: flex; flex-direction: column; gap: 16px; }
.analytics-breakdown-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px 15px; font-size: 12px; }
.analytics-breakdown-row strong { font-variant-numeric: tabular-nums; }
.analytics-bar { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: #f0f4ec; overflow: hidden; }
.analytics-bar > span { display: block; height: 100%; background: #9fbe6d; border-radius: inherit; }
.analytics-memberships { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 18px; margin: 0; }
.analytics-memberships dt { color: #657167; font-size: 12px; }
.analytics-memberships dd { font-size: 24px; font-weight: 700; margin: 6px 0 0; overflow-wrap: anywhere; }
.analytics-definitions { color: #536b5a; font-size: 12px; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.analytics-definitions dl { display: grid; grid-template-columns: minmax(140px,1fr) 3fr; gap: 12px 24px; line-height: 1.7; margin: 16px 0; }
.analytics-definitions dt { font-weight: 600; }
.analytics-definitions dd { margin: 0; }
.analytics-definitions > p { line-height: 1.7; }
.analytics-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width:1100px) {
    .analytics-two-columns { gap: 16px; }
    .analytics-panel { padding: 20px; }
    .analytics-panel-heading { gap: 12px; }
}
@media (max-width:740px) {
    .analytics-heading { align-items: start; }
    .analytics-heading h1 { font-size: 31px; }
    .analytics-heading > .button { padding: 10px 13px; font-size: 12px; }
    .analytics-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
    .analytics-two-columns { grid-template-columns: minmax(0,1fr); gap: 0; }
    .analytics-metric-card { padding: 17px; }
    .analytics-period { align-items: start; flex-direction: column; gap: 4px; }
    .analytics-period > small { text-align: left; }
    .analytics-memberships { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px 16px; }
}
@media (max-width:420px) {
    .analytics-heading { flex-direction: column; gap: 16px; }
    .analytics-panel { padding: 17px; border-radius: 14px; }
    .analytics-metric-card { padding: 15px 12px; border-radius: 14px; }
    .analytics-metric-value { font-size: 29px; }
    .analytics-metric-card h2 { font-size: 12px; }
    .analytics-panel-heading > label { width: 100%; }
    .analytics-panel-heading select { width: 100%; }
    .analytics-definitions dl { grid-template-columns: minmax(0,1fr); gap: 4px; }
    .analytics-definitions dd { margin-bottom: 12px; }
    .analytics-memberships { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
