/* Compact, range-driven Analytics; styling stays within the workspace. */
.da-period-insights{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:14px;margin:0 0 16px}
.da-period-insights>.du-panel{min-width:0;padding:16px}
.da-period-insights h2{font-size:16px;margin:0 0 12px;font-weight:700}
.da-trend svg{width:100%;height:auto;display:block}.da-trend svg text{font:11px system-ui;fill:#687487}
.da-chart-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:15px;font-size:12px}
.da-chart-legend span{display:inline-flex;align-items:center;gap:5px}.da-chart-legend i{width:9px;height:9px;border-radius:3px}
.da-monthly-scroll{max-height:240px;overflow:auto}.da-monthly-scroll .da-table{min-width:490px}
.da-insight-note{font-size:11px;color:var(--muted);line-height:1.5;margin:12px 0 0}
@media(max-width:1150px){.da-period-insights{grid-template-columns:1fr}}
#du-analytics-workspace{min-width:0;color:var(--ink);font-size:13px}
#du-analytics-workspace [hidden]{display:none!important}
#du-analytics-workspace .da-filterbar{display:flex;align-items:end;flex-wrap:wrap;gap:12px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px 16px;margin-bottom:14px}
#du-analytics-workspace label{display:flex;flex-direction:column;gap:5px;min-width:0;color:var(--muted);font-size:12px;font-weight:600}
#du-analytics-workspace input,#du-analytics-workspace select{font:inherit;font-size:13px;color:var(--ink);border:1px solid var(--line);border-radius:6px;background:#fff;padding:7px 10px;height:38px;min-width:0;width:100%;box-sizing:border-box}
#du-analytics-workspace input:focus,#du-analytics-workspace select:focus{outline:2px solid var(--brand);outline-offset:1px}
#du-analytics-workspace #da-period-note{align-self:center;color:var(--muted);margin-left:auto}
#du-analytics-workspace .da-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
#du-analytics-workspace .da-summary article{background:#fff;border:1px solid var(--line);border-radius:10px;padding:13px 15px;display:flex;flex-direction:column;gap:5px}
#du-analytics-workspace .da-summary article>span{font-size:12px;color:var(--muted);font-weight:600}
#du-analytics-workspace .da-summary article>strong{font-size:23px;line-height:1.3;font-variant-numeric:tabular-nums;color:var(--ink)}
#du-analytics-workspace .da-summary article:nth-child(3)>strong,#du-analytics-workspace .da-summary article:nth-child(5)>strong{color:var(--brand)}
#du-analytics-workspace .da-summary small{font-size:11px;color:var(--muted);line-height:1.4}
#du-analytics-workspace .da-coverage{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:10px 0 14px;color:var(--muted);font-size:12px}
#du-analytics-workspace .da-meal-totals{display:flex;flex-wrap:wrap;gap:8px}
#du-analytics-workspace .da-meal-totals span{background:var(--brand-soft);border-radius:5px;padding:4px 8px;color:var(--brand)}
#du-analytics-workspace .da-meal-totals strong{margin-left:5px}
#du-analytics-workspace .da-register-panel{padding:16px;min-width:0;border-radius:10px}
#du-analytics-workspace .da-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:14px}
#du-analytics-workspace .da-section-head h2{font-size:16px;margin:0;line-height:1.4}
#du-analytics-workspace .da-mode-switch{display:flex;background:#eef1f5;border-radius:6px;padding:3px}
#du-analytics-workspace .da-mode-switch button{border:0;background:transparent;border-radius:4px;padding:6px 12px;font-size:12px;color:var(--muted);cursor:pointer}
#du-analytics-workspace .da-mode-switch button.active{background:#fff;color:var(--brand);box-shadow:0 1px 3px #18244312}
#du-analytics-workspace .da-input-row{display:grid;grid-template-columns:minmax(140px,1.25fr) repeat(4,minmax(80px,1fr)) auto;align-items:end;gap:10px}
#du-analytics-workspace .da-input-row .dh-btn{min-height:38px;height:38px;padding:7px 14px;font-size:12px}
#du-analytics-workspace .da-form-footer{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 0 13px;font-size:11px;color:var(--muted);line-height:1.5}
#du-analytics-workspace #da-form-message{color:var(--green)}
#du-analytics-workspace .da-error,#du-analytics-workspace #da-form-message.da-error{color:var(--red)}
#du-analytics-workspace #da-source-choice{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:12px;padding:10px 0;border-top:1px solid var(--line)}
#du-analytics-workspace #da-source-choice select{width:auto;font-size:12px}
#du-analytics-workspace #da-source-choice small{color:var(--muted)}
#du-analytics-workspace .da-register-head{border-top:1px solid var(--line);padding:12px 0 8px;display:flex;justify-content:space-between;align-items:center;gap:10px}
#du-analytics-workspace #da-record-count{color:var(--muted);font-size:12px}
#du-analytics-workspace .da-table-scroll{max-height:380px;overflow:auto}
#du-analytics-workspace .da-table{width:100%;border-collapse:collapse;font-size:13px;text-align:right}
#du-analytics-workspace .da-table th,#du-analytics-workspace .da-table td{padding:10px;border-bottom:1px solid var(--line);white-space:nowrap;font-variant-numeric:tabular-nums}
#du-analytics-workspace .da-table thead th{position:sticky;top:0;background:#f6f7fa;font-size:11px;font-weight:600;color:var(--muted)}
#du-analytics-workspace .da-table th:first-child{text-align:left}
#du-analytics-workspace .da-table th small{display:block;font-size:10px;color:var(--muted);font-weight:400}
#du-analytics-workspace .da-table .da-inactive-row{color:var(--muted)}
#du-analytics-workspace .da-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}
#du-analytics-workspace .dh-btn-link{font-size:12px}
#du-analytics-workspace .da-delete{color:var(--red)}
#du-analytics-workspace .da-empty{text-align:center;color:var(--muted);padding:24px 8px;margin:0;font-size:13px}
#du-analytics-workspace .da-month-record{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:12px 0}
#du-analytics-workspace .da-month-record strong{margin-left:6px}
#du-analytics-workspace .da-method{font-size:11px;color:var(--muted);line-height:1.6;margin:12px 0 0}
#du-analytics-workspace .da-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:1200px){#du-analytics-workspace .da-summary{grid-template-columns:repeat(3,minmax(0,1fr))}#du-analytics-workspace .da-input-row{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){#du-analytics-workspace .da-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#du-analytics-workspace .da-summary article{padding:11px}#du-analytics-workspace .da-summary article>strong{font-size:21px}#du-analytics-workspace .da-filterbar{display:grid;grid-template-columns:1fr 1fr;padding:12px}#du-analytics-workspace .da-filterbar label:first-child{grid-column:1/-1}#du-analytics-workspace .da-input-row{grid-template-columns:repeat(2,minmax(0,1fr))}#du-analytics-workspace .da-register-panel{padding:12px}#du-analytics-workspace .da-summary article:first-child{grid-column:1/-1}}
#du-analytics-workspace .da-metric-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:32px}
#du-analytics-workspace .da-metric-heading .dh-kpi-label{font-size:12px;color:var(--muted);font-weight:600;line-height:1.4;letter-spacing:0;text-transform:none}
#du-analytics-workspace .da-metric-heading .dh-kpi-icon{flex:0 0 30px;width:30px;height:30px;border-radius:8px}
#du-analytics-workspace .da-metric-heading .dh-kpi-icon svg{width:20px;height:20px}
@media(max-width:600px){#du-analytics-workspace .da-metric-heading{gap:5px}#du-analytics-workspace .da-metric-heading .dh-kpi-icon{flex-basis:28px;width:28px;height:28px}}

/* Attendance and meal-cover costs use separate, explicit denominators. */
.da-cost-analyses{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 0 16px}
#du-analytics-workspace .da-cost-card{min-width:0;padding:18px;border-radius:12px;border:1px solid var(--line);background:#fff}
.da-cost-card>header{margin:0 0 16px}
.da-analysis-kicker{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:var(--muted);margin-bottom:8px}
.da-analysis-kicker .dh-kpi-icon{width:28px;height:28px;flex:none;background:#eeebfb;color:#7443b8;border-radius:7px}
.da-analysis-kicker .dh-kpi-icon svg{width:19px;height:19px}
[data-da-analysis="covers"] .da-analysis-kicker .dh-kpi-icon{background:#e4f5f0;color:#008f78}
.da-cost-card h2{font-size:18px;line-height:1.3;margin:0;font-weight:700}
.da-analysis-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:13px 14px;border-radius:9px;background:#f5f2fc}
[data-da-analysis="covers"] .da-analysis-totals{background:#edf8f4}
.da-analysis-totals>div{display:grid;gap:5px;min-width:0}
.da-analysis-totals span{font-size:12px;color:var(--muted);line-height:1.35}
.da-analysis-totals strong{font-size:23px;line-height:1.25;font-variant-numeric:tabular-nums;color:#7443b8;overflow-wrap:anywhere}
[data-da-analysis="covers"] .da-analysis-totals strong{color:#008f78}
.da-analysis-coverage{margin:10px 0 16px;min-height:32px;font-size:12px;line-height:1.5;color:var(--muted)}
.da-analysis-incomplete{padding:8px 10px;border-radius:6px;background:#fff5e6;color:#885a14}
.da-cost-composition{display:grid;grid-template-columns:130px minmax(0,1fr);gap:18px;align-items:center}
.da-cost-donut{width:130px;height:130px;border-radius:50%;display:grid;place-items:center}
.da-cost-donut>span{width:88px;height:88px;display:grid;align-content:center;justify-items:center;border-radius:50%;background:#fff;gap:2px}
.da-cost-donut strong{font-size:23px;line-height:1.2;color:var(--ink)}
.da-cost-donut small{font-size:11px;color:var(--muted)}
.da-cost-legend{display:grid;gap:13px;list-style:none;padding:0;margin:0;min-width:0}
.da-cost-legend li{min-width:0}
.da-cost-legend li>div{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px}
.da-cost-legend li>div>span{display:flex;align-items:center;gap:7px;min-width:0}
.da-cost-legend i{display:block;width:9px;height:9px;border-radius:50%;background:var(--da-cost-color);flex:none}
.da-cost-legend li>div strong{font-size:13px;font-weight:600;overflow-wrap:anywhere}
.da-cost-legend b{font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--da-cost-color)}
.da-cost-legend p{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:3px 8px;margin:4px 0 0 16px;font-size:12px;line-height:1.45;font-variant-numeric:tabular-nums;color:var(--muted)}
.da-cost-legend p>strong{color:var(--ink);font-weight:600}
.da-cost-legend p small{font-size:10px;font-weight:400;color:var(--muted)}
.da-analysis-source{font-size:11px;color:var(--muted);line-height:1.55;margin:18px 0 0;padding-top:12px;border-top:1px solid var(--line)}
@media(min-width:1151px) and (max-width:1350px){.da-cost-composition{grid-template-columns:110px minmax(0,1fr);gap:12px}.da-cost-donut{width:110px;height:110px}.da-cost-donut>span{width:76px;height:76px}.da-analysis-totals strong{font-size:21px}}
@media(max-width:1150px){.da-cost-analyses{grid-template-columns:1fr}.da-cost-composition{grid-template-columns:150px minmax(0,1fr);gap:24px}.da-cost-donut{width:150px;height:150px}.da-cost-donut>span{width:102px;height:102px}.da-analysis-coverage{min-height:0}}
@media(max-width:520px){#du-analytics-workspace .da-cost-card{padding:16px}.da-cost-composition{grid-template-columns:minmax(0,1fr);justify-items:center;gap:18px}.da-cost-legend{width:100%}.da-analysis-totals{padding:12px;gap:10px}.da-analysis-totals strong{font-size:20px}.da-cost-card h2{font-size:17px}.da-cost-legend p small{font-size:11px}.da-analysis-source{font-size:12px}}
@media(prefers-reduced-motion:no-preference){.da-cost-donut{animation:da-cost-reveal .3s ease-out both}}
@keyframes da-cost-reveal{from{opacity:.3;transform:scale(.97)}to{opacity:1;transform:scale(1)}}

/* KPI accents follow the same restrained card treatment as the other workspaces. */
#du-analytics-workspace .da-summary{gap:12px;align-items:stretch}
#du-analytics-workspace .da-summary .da-kpi{--da-kpi-accent:#6253b4;--da-kpi-tint:#f5f3ff;position:relative;min-width:0;min-height:122px;padding:14px 15px;gap:6px;border:1px solid #e2e7f0;border-top:3px solid var(--da-kpi-accent);border-radius:12px;background:linear-gradient(135deg,#fff 64%,var(--da-kpi-tint));box-shadow:0 3px 12px #17305c05}
#du-analytics-workspace .da-summary [data-da-kpi="guests"]{--da-kpi-accent:#315bce;--da-kpi-tint:#eef3ff}
#du-analytics-workspace .da-summary [data-da-kpi="covers"]{--da-kpi-accent:#397d8c;--da-kpi-tint:#eef8fa}
#du-analytics-workspace .da-summary [data-da-kpi="cover-cost"]{--da-kpi-accent:#087d70;--da-kpi-tint:#edf8f4}
#du-analytics-workspace .da-kpi .da-metric-heading{min-height:34px;gap:8px;align-items:center}
#du-analytics-workspace .da-kpi .dh-kpi-label{font-size:12px;line-height:1.4;font-weight:650;color:#4b5a74}
#du-analytics-workspace .da-kpi .dh-kpi-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border:1px solid color-mix(in srgb,var(--da-kpi-accent) 12%,transparent);border-radius:9px;color:var(--da-kpi-accent);background:var(--da-kpi-tint)}
#du-analytics-workspace .da-kpi .dh-kpi-icon svg{width:21px;height:21px}
#du-analytics-workspace .da-summary .da-kpi>strong{font-size:25px;line-height:1.2;font-weight:750;letter-spacing:-.35px;font-variant-numeric:tabular-nums;color:#1d3154;overflow-wrap:anywhere}
#du-analytics-workspace .da-summary .da-kpi[data-da-kpi="guest-cost"]>strong,#du-analytics-workspace .da-summary .da-kpi[data-da-kpi="cover-cost"]>strong{color:var(--da-kpi-accent)}
#du-analytics-workspace .da-summary .da-kpi>small{margin-top:auto;font-size:11px;line-height:1.45;color:#65748c}
@media(max-width:700px){#du-analytics-workspace .da-summary{gap:9px}#du-analytics-workspace .da-summary .da-kpi{min-height:116px;padding:12px;border-radius:11px}#du-analytics-workspace .da-kpi .da-metric-heading{gap:6px;min-height:34px}#du-analytics-workspace .da-kpi .dh-kpi-icon{width:29px;height:29px;flex-basis:29px;border-radius:8px}#du-analytics-workspace .da-kpi .dh-kpi-icon svg{width:19px;height:19px}#du-analytics-workspace .da-summary .da-kpi>strong{font-size:24px}#du-analytics-workspace .da-summary [data-da-kpi="costs"]{min-height:94px;padding-right:55px}#du-analytics-workspace [data-da-kpi="costs"] .da-metric-heading{min-height:0}#du-analytics-workspace [data-da-kpi="costs"] .dh-kpi-icon{position:absolute;right:12px;top:12px}}
