/* MASTER only. The existing shell owns drawer width and viewport adaptation. */
#adminApp.admin-shell:has(.master-dashboard) .admin-content{padding:8px 16px 16px!important}
#adminApp.admin-shell:has(.master-dashboard) .admin-workspace-topbar{min-height:44px!important;margin:0!important}
#adminApp.admin-shell:has(.master-dashboard) .admin-top{height:0!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden!important}
#adminApp.admin-shell:has(.master-dashboard) #pageBody{margin-top:0!important;padding-top:16px!important;min-width:0}
.master-dashboard{--md-green:#00895b;--md-line:#d9e5df;color:#101d2c;width:100%;min-width:0;display:grid;gap:14px;font-family:inherit}
.master-dashboard *{box-sizing:border-box}
.master-dashboard h2,.master-dashboard h3,.master-dashboard p{margin:0}
.master-dashboard button{font:inherit;cursor:pointer}
.master-dashboard button:disabled{opacity:.5;cursor:not-allowed}
.master-dashboard button:focus-visible{outline:3px solid #38b889;outline-offset:3px}
.master-dashboard h3{font-size:15px;font-weight:700;line-height:1.35;color:#101d2c}
.md-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 18px;border:1px solid var(--md-line);border-radius:14px;background:#fff;min-height:clamp(76px,4.5vw,86px)}
.md-title{display:flex;align-items:center;gap:14px;min-width:0}
.md-title-icon{display:grid;place-items:center;width:42px;height:42px;border:1px solid #cfe9dc;border-radius:9px;color:var(--md-green);background:#f0faf5;flex-shrink:0}
.md-kicker{display:block;color:var(--md-green);font-size:10px;line-height:1.1;letter-spacing:.8px;font-weight:650;margin-bottom:4px}
.master-dashboard h2{font-size:22px;font-weight:650;line-height:1.2}
.md-title p,.md-panel-head p,.md-ranking>p{font-size:12px;line-height:1.5;color:#64758a;margin-top:4px}
.md-header-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.md-month,.md-refresh{display:flex;align-items:center;justify-content:center;gap:12px;background:white;border:1px solid var(--md-line);border-radius:8px;min-height:40px;padding:0 14px;font-size:12px;font-weight:600}
.md-month span::first-letter{text-transform:uppercase}.md-month svg,.md-refresh{color:var(--md-green)}
.md-refresh{width:42px;padding:0}
.md-scope{display:flex;align-items:center;gap:12px;min-height:24px;font-size:11px;color:#64758a;flex-wrap:wrap}
.md-scope>span{background:#dff3ea;color:#007f53;border-radius:24px;padding:6px 15px;font-weight:700;letter-spacing:.3px;font-size:10px}
.md-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.md-kpi{display:flex;flex-direction:column;align-items:flex-start;gap:8px;background:#fff;border:1px solid var(--md-line);border-radius:8px;padding:16px;min-height:clamp(170px,10vw,192px);min-width:0}
.md-kpi-head{display:flex;align-items:center;gap:12px;width:100%;min-height:40px}
.md-icon{width:40px;height:40px;display:grid;place-items:center;background:#dff3e9;color:var(--md-green);border-radius:50%;flex-shrink:0}
.md-icon.amber{color:#ee9800;background:#fff1d6}
.md-value{font-size:clamp(25px,2.05vw,36px);line-height:1.15;font-weight:700;letter-spacing:-.6px;white-space:nowrap}
.md-value.md-value-long{font-size:24px;white-space:normal;overflow-wrap:anywhere;max-width:100%}
.md-kpi>p{font-size:12px;color:#485c71;line-height:1.45;min-height:18px}
.md-link{border:0;background:none;padding:0;display:inline-flex;align-items:center;gap:8px;color:var(--md-green);font-size:12px!important;font-weight:650!important;text-align:left;line-height:1.5}
.md-kpi>.md-link{margin-top:auto}.md-link:hover{text-decoration:underline}
.md-main{display:grid;grid-template-columns:minmax(0,1.82fr) minmax(0,1fr);gap:14px}
.md-panel{border:1px solid var(--md-line);background:#fff;border-radius:8px;padding:18px;min-width:0}
.md-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}
.md-panel-head>.md-link{flex-shrink:0}
.md-attention{display:flex;flex-direction:column;min-height:clamp(270px,16vw,304px)}
.md-table-scroll{overflow:auto;width:100%;min-width:0}
.md-attention table{border-collapse:collapse;width:100%;font-size:12px;table-layout:fixed;min-width:650px}
.md-attention th{text-align:left;background:#f5f8f7;color:#52657a;font-size:11px;font-weight:650;padding:9px 12px}
.md-attention td{border-bottom:1px solid #edf1ee;padding:5px 12px;line-height:1.45;overflow:hidden;text-overflow:ellipsis}
.md-attention th:nth-child(1){width:20%}.md-attention th:nth-child(2){width:15%}.md-attention th:nth-child(3){width:29%}.md-attention th:nth-child(4){width:16%}.md-attention th:nth-child(5){width:20%}
.md-attention td:first-child{white-space:nowrap}.md-amount{font-variant-numeric:tabular-nums;white-space:nowrap}
.md-badge{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border-radius:20px;white-space:nowrap;font-size:11px}
.md-badge svg{flex-shrink:0}.md-badge.red{color:#bd202d;background:#ffe7e9}.md-badge.amber{color:#996011;background:#fff0d9}
.md-note{font-size:10px!important;line-height:1.5;color:#6c7d8e;margin-top:10px!important}
.md-attention>.md-note{margin-top:auto!important;padding-top:10px}
.md-attention-pager{display:flex;gap:10px;justify-content:flex-end;align-items:center;font-size:11px;color:#63788a;margin-top:8px}.md-attention-pager:has(>span:only-child){display:none}.md-attention-pager>button:first-child{margin-right:auto}
.md-plans{display:flex;flex-direction:column;gap:14px}
.md-plans-body{display:flex;align-items:center;gap:24px;flex:1;min-width:0}
.md-donut{width:clamp(145px,11vw,202px);aspect-ratio:1;border-radius:50%;background:var(--md-donut);display:grid;place-items:center;flex-shrink:0}
.md-donut>div{display:flex;flex-direction:column;align-items:center;justify-content:center;width:67%;height:67%;border-radius:50%;background:#fff}
.md-donut strong{font-size:30px;line-height:1.2}.md-donut span{font-size:12px;margin-top:3px}
.md-legend{flex:1;min-width:0;max-height:194px;overflow:auto;display:grid;gap:20px}
.md-legend>div,.md-statuses>div{display:flex;align-items:center;gap:12px;font-size:12px;min-width:0}
.md-legend i,.md-statuses i{width:13px;height:13px;flex:0 0 13px;border-radius:50%}
.md-legend span{overflow-wrap:anywhere}.md-legend b,.md-statuses b{margin-left:auto}
.md-bottom{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,.85fr) minmax(0,1fr);gap:14px}
.md-bottom>.md-panel{min-height:clamp(198px,11.6vw,224px);display:flex;flex-direction:column}
.md-bars{display:grid;gap:15px;margin:18px 0;flex:1;align-content:start}
.md-bars>div{display:grid;grid-template-columns:minmax(85px,.85fr) minmax(55px,1.5fr) auto;align-items:center;gap:12px;font-size:12px}
.md-bars span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.md-bars strong{font-variant-numeric:tabular-nums;font-size:12px}
.md-bars i{height:16px}.md-bars b{display:block;height:100%;border-radius:3px}
.md-statuses{display:grid;gap:12px;margin:18px 0 8px;flex:1}
.md-statuses .connected{background:#00895b}.md-statuses .pending{background:#f5aa00}.md-statuses .error{background:#eb2535}.md-statuses .unknown,.md-statuses .disabled{background:#98a5a8}
.md-actions>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px;flex:1}
.md-actions button{border:1px solid var(--md-line);border-radius:7px;background:#fff;padding:10px 6px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;font-size:12px;min-width:0;color:#102332}
.md-actions button svg{color:var(--md-green)}.md-actions button:hover{background:#f1faf5;border-color:#a5d7bf}
.md-footnote{font-size:10px;color:#718293;line-height:1.5}.md-empty{font-size:12px;color:#718293;text-align:center;padding:22px!important;line-height:1.5}
.md-error{display:flex;align-items:center;gap:12px;background:#fff1f1;border:1px solid #efd0d0;border-radius:8px;padding:12px;color:#992d34;font-size:13px}.md-error span{flex:1}
@media(max-width:1450px){.md-kpi{padding:14px;min-height:185px}.md-kpi-head{gap:8px}.md-kpi h3{font-size:13px}.md-icon{width:36px;height:36px}.md-main{grid-template-columns:minmax(0,1.65fr) minmax(0,1fr)}.md-plans-body{gap:14px}.md-donut{width:140px}.md-bottom{grid-template-columns:minmax(0,1.2fr) minmax(0,.85fr) minmax(0,1fr)}.md-panel{padding:15px}.md-bars>div{gap:8px;grid-template-columns:minmax(70px,1fr) minmax(40px,1fr) auto}.md-value{font-size:27px}}
@media(max-width:1200px){.md-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.md-main{grid-template-columns:1fr}.md-plans-body{justify-content:flex-start}.md-legend{max-width:400px}.md-bottom{grid-template-columns:1fr 1fr}.md-actions{grid-column:1/-1}.md-actions>div{grid-template-columns:repeat(6,minmax(0,1fr))}.md-bottom>.md-actions{min-height:140px}}
@media(max-width:900px){.md-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.md-header{align-items:flex-start;flex-wrap:wrap}.md-header-actions{margin-left:56px}.md-bottom{grid-template-columns:1fr}.md-actions{grid-column:auto}.md-actions>div{grid-template-columns:repeat(3,minmax(0,1fr))}.md-panel-head{align-items:flex-start;flex-wrap:wrap}.md-value{font-size:29px}}
@media(max-width:520px){.md-kpis{grid-template-columns:1fr}.md-kpi{min-height:164px}.md-header{padding:14px}.md-title{gap:10px}.md-title-icon{width:36px;height:36px}.master-dashboard h2{font-size:20px}.md-header-actions{margin-left:0;width:100%;justify-content:space-between}.md-title p{font-size:11px}.md-plans-body{gap:15px}.md-donut{width:126px}.md-legend>div{gap:8px}.md-panel{padding:14px}.md-error{flex-wrap:wrap}}
