/* Usage analytics extend the console's existing night-harbour system. */
#dashboard{min-width:0;margin:0}
.dashboard-toolbar{padding:22px;border:1px solid var(--line);border-radius:12px;background:var(--deck);margin-bottom:18px}
@media(max-width:900px){#app[data-console-page="dashboard"]>.main{margin-bottom:calc(82px + env(safe-area-inset-bottom));padding-bottom:24px}}
.dashboard-heading,.dashboard-balance,.dashboard-filters,.dashboard-panel-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.dashboard-heading{margin-bottom:22px;flex-wrap:wrap}
.dashboard-heading h2{margin:0;font-size:20px;font-weight:600}
.dashboard-heading p{margin:7px 0 0;color:var(--muted);font-size:12px}
.dashboard-balance{gap:18px;padding-left:22px;border-left:1px solid var(--line)}
.dashboard-balance span,.dashboard-balance small{color:var(--muted);font-size:11px}
.dashboard-balance strong{display:block;margin-top:4px;font-size:21px;font-weight:600;font-variant-numeric:tabular-nums}
#dashboard .button,#dashboard button{min-height:36px;padding:8px 12px;border-radius:8px;font-size:12px}
.dashboard-filters{padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);flex-wrap:wrap}
.dashboard-filter-fields,.dashboard-filter-actions{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.dashboard-filters label{display:grid;gap:6px;color:var(--muted);font-size:11px}
.dashboard-filters select{width:180px;min-height:38px;padding:8px 30px 8px 10px;border-radius:8px;background:var(--deck);color:var(--text);font-size:12px}
.dashboard-filters label:first-child select{width:130px}
.dashboard-status{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;min-height:20px;margin:12px 0 0;color:var(--muted);font-size:11px;line-height:1.6}
.dashboard-status [role=status]{color:var(--text)}
.dashboard-status [data-error=true]{color:var(--bad)}
.dashboard-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);border-radius:12px;background:var(--deck);overflow:hidden}
.dashboard-metric{min-width:0;padding:21px 22px;border-right:1px solid var(--line)}
.dashboard-metric:nth-child(3n){border-right:0}
.dashboard-metric:nth-child(-n+3){border-bottom:1px solid var(--line)}
.dashboard-metric>span{color:var(--muted);font-size:12px}
.dashboard-metric strong{display:block;margin:10px 0 7px;font-size:26px;font-weight:600;line-height:1.25;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.dashboard-metric small{display:block;color:var(--muted);font-size:11px;line-height:1.6}
.dashboard-metric small.dashboard-note{color:var(--mint);text-shadow:0 0 12px color-mix(in srgb,var(--mint) 70%,transparent)}
.dashboard-metric strong small{display:inline;font-size:12px;font-weight:400}
.dashboard-charts{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:16px;margin:18px 0}
.dashboard-panel{min-width:0;padding:22px;border:1px solid var(--line);border-radius:12px;background:var(--deck)}
.dashboard-panel-head{align-items:flex-start;flex-wrap:wrap;gap:12px;margin-bottom:18px}
.dashboard-panel-head h3{margin:0;font-size:15px;font-weight:600}
.dashboard-panel-head p{margin:6px 0 0;color:var(--muted);font-size:11px;line-height:1.6}
.dashboard-segment{display:inline-flex;flex-wrap:wrap;gap:2px;padding:3px;border:1px solid var(--line);border-radius:8px}
#dashboard .dashboard-segment button{min-height:30px;padding:6px 10px;background:transparent;color:var(--muted);font-weight:500}
#dashboard .dashboard-segment button[aria-pressed=true]{background:var(--deck2);color:var(--text);box-shadow:inset 0 0 0 1px var(--line)}
#dashboard button:hover{filter:none;background:var(--deck2);color:var(--text)}
#dashboard :is(button,a,select):focus-visible{outline:2px solid var(--mint);outline-offset:3px}
.dashboard-chart{position:relative;min-height:258px}
.dashboard-chart svg{display:block;width:100%;height:auto;min-height:210px;overflow:visible}
.dashboard-chart text{fill:var(--muted);font:11px "Avenir Next","PingFang SC",sans-serif;font-variant-numeric:tabular-nums}
.dashboard-chart .chart-grid{stroke:var(--line);stroke-width:1}
.dashboard-chart .chart-bar{fill:var(--mint);opacity:.78;transition:opacity .15s ease}
.dashboard-chart .chart-bar:hover,.dashboard-chart .chart-bar:focus{opacity:1;outline:2px solid var(--text);outline-offset:2px}
.dashboard-chart-tip{position:absolute;z-index:2;top:0;right:0;max-width:80%;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--deck2);color:var(--text);font-size:12px;pointer-events:none}
.dashboard-chart-caption{margin:5px 0 0;color:var(--muted);font-size:11px;line-height:1.6}
.dashboard-rank{display:grid;gap:20px;list-style:none;margin:0;padding:0}
.dashboard-rank-label{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:12px}
.dashboard-rank-label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dashboard-rank-label b{flex:none;font-weight:500;font-variant-numeric:tabular-nums}
.dashboard-rank-track{height:5px;margin:8px 0 5px;border-radius:3px;background:var(--deck2);overflow:hidden}
.dashboard-rank-track i{display:block;height:100%;background:var(--mint);opacity:.75;border-radius:3px}
.dashboard-rank small{color:var(--muted);font-size:10px}
.dashboard-empty{display:grid;align-content:center;justify-items:center;gap:9px;min-height:230px;text-align:center;color:var(--muted);font-size:12px;line-height:1.7}
.dashboard-empty strong{color:var(--text);font-size:14px;font-weight:500}
.dashboard-empty a{color:var(--mint);text-underline-offset:3px}
.dashboard-table-wrap{max-width:100%;overflow-x:auto}
.dashboard-table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px;font-variant-numeric:tabular-nums}
.dashboard-table th{padding:0 12px 12px;text-align:right;color:var(--muted);font-weight:500;font-size:11px}
.dashboard-table td{padding:16px 12px;border-top:1px solid var(--line);text-align:right}
.dashboard-table th:first-child,.dashboard-table td:first-child{text-align:left;padding-left:0}
.dashboard-table th:last-child,.dashboard-table td:last-child{padding-right:0}
.dashboard-table a{color:var(--text);text-decoration:none;text-underline-offset:3px}
.dashboard-table a:hover{color:var(--mint);text-decoration:underline}
.dashboard-table td small{display:block;margin-top:4px;color:var(--muted);font-size:10px}
.dashboard-table-note{margin:18px 0 0;color:var(--muted);font-size:11px;line-height:1.7}
#dashboard[aria-busy=true] .dashboard-metrics strong{opacity:.4}
@media(max-width:1180px){.dashboard-charts{grid-template-columns:minmax(0,1fr)}.dashboard-rank{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-metric{padding:18px 16px}.dashboard-metric strong{font-size:23px}}
@media(max-width:900px){.rail nav{grid-template-columns:repeat(8,minmax(0,1fr))}#app[data-console-page="dashboard"] .rail-foot{display:none!important}#app[data-console-page="dashboard"] #mobile-account-summary{display:flex!important;align-items:center;gap:8px;flex-basis:100%;min-height:30px;padding:4px 8px}#app[data-console-page="dashboard"] #mobile-account-summary small{display:none}#app[data-console-page="dashboard"] .account-kind{font-size:10px}.dashboard-toolbar{padding:18px}.dashboard-balance{padding-left:0;border:0}.dashboard-filter-fields{flex:1}.dashboard-filters label{flex:1;min-width:120px}.dashboard-filters select,.dashboard-filters label:first-child select{width:100%}.dashboard-filter-actions{margin-left:auto}.dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-metric:nth-child(3){border-right:1px solid var(--line)}.dashboard-metric:nth-child(2n){border-right:0}.dashboard-metric:nth-child(-n+4){border-bottom:1px solid var(--line)}.dashboard-panel{padding:18px}.dashboard-chart{min-height:230px}}
@media(max-width:520px){.dashboard-heading{gap:20px}.dashboard-heading h2{font-size:18px}.dashboard-balance{width:100%;justify-content:space-between}.dashboard-filter-fields{width:100%;display:grid;grid-template-columns:1fr 1fr}.dashboard-filters label:first-child{grid-column:1/-1}.dashboard-filter-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.dashboard-metric{padding:17px 14px}.dashboard-metric strong{font-size:22px}.dashboard-rank{grid-template-columns:minmax(0,1fr)}.dashboard-panel-head{gap:14px}.dashboard-chart{min-height:0}.dashboard-chart svg{min-height:190px}.dashboard-segment{max-width:100%}#dashboard .dashboard-segment button{font-size:11px;padding:6px 9px}.dashboard-table-note{font-size:10px}}
@media(prefers-reduced-motion:reduce){.dashboard-chart .chart-bar{transition:none}}
