/* Twelve-column sizing restores the calendar's intended wide default. */
#content.dashboard-customized .custom-dashboard{grid-template-columns:repeat(12,minmax(0,1fr))!important;align-items:start}
#content.dashboard-customized .custom-dashboard>.dashboard-widget,#content.dashboard-customized .custom-dashboard>.dashboard-goals{grid-column:span var(--dash-span,4)!important;min-width:0;margin-top:0;overflow:auto;scrollbar-width:thin}
#content.dashboard-customized .custom-dashboard>.dashboard-fixed-height{height:var(--dash-height)!important;overflow:auto;overscroll-behavior:auto;scrollbar-width:thin;display:flex;flex-direction:column}
.dashboard-fixed-height>.calendar-grid{flex:1 0 auto;min-height:min-content}.dashboard-fixed-height>.chart{flex:1;min-height:140px}.dashboard-fixed-height>.calendar-total{flex-shrink:0}
#ds-resize-dashboard{margin:0 0 18px;font-size:11px}
.dashboard-sizing-bar{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);width:min(900px,calc(100vw - 36px));max-height:calc(100dvh - 100px);overflow:auto;z-index:20;display:flex;flex-wrap:wrap;align-items:center;gap:14px;padding:16px;margin:0 0 20px;border:1px solid var(--accent);border-radius:12px;background:var(--panel);box-shadow:0 8px 30px #0004}
.dashboard-sizing-bar>div:first-child{flex:1;min-width:180px}.dashboard-sizing-bar strong{font-size:13px}.dashboard-sizing-bar p{font-size:11px;line-height:1.6;margin:6px 0;color:var(--muted)}.dashboard-sizing-bar small,.dashboard-sizing-status{font-size:10px;color:var(--muted)}.dashboard-sizing-status{flex-basis:100%}.dashboard-sizing-bar .actions{flex-wrap:wrap}.dashboard-sizing-bar button{font-size:11px;padding:8px 12px}
#content.dashboard-sizing .custom-dashboard>.card{position:relative;outline:1px dashed color-mix(in srgb,var(--accent) 55%,transparent);outline-offset:2px}
.dashboard-size-controls{flex-shrink:0;margin:0;padding:0;border:0;text-align:left;color:var(--text)}.dashboard-size-controls>strong{display:none;font-size:10px;margin-bottom:8px}.dashboard-size-controls>div{display:flex;gap:6px;flex-wrap:wrap;align-items:end}.dashboard-size-controls label{font-size:9px;color:var(--muted);display:block;flex:1;min-width:64px}.dashboard-size-controls :is(input,select){display:block;width:100%;min-width:0;font-size:10px!important;padding:6px!important;margin-top:4px}.dashboard-size-controls button{font-size:9px;padding:6px;align-self:end}.dashboard-size-controls output{font-size:9px;color:var(--muted);flex-basis:100%}
.dashboard-size-handle{position:absolute;right:5px;bottom:5px;width:30px;height:30px;padding:0!important;font-size:20px;line-height:1;display:grid;place-items:center;cursor:nwse-resize;touch-action:none;z-index:2;border-radius:7px;background:var(--panel2);color:var(--accent)}.dashboard-size-handle:focus-visible{outline:2px solid var(--accent)}.is-sizing{transition:none!important;user-select:none}
@media(max-width:1000px){#content.dashboard-customized .custom-dashboard>.dashboard-widget{grid-column:span 6!important}#content.dashboard-customized .custom-dashboard>[data-widget=calendar],#content.dashboard-customized .custom-dashboard>.dashboard-goals{grid-column:1/-1!important}.dashboard-size-handle{display:none}}
@media(max-width:640px){#content.dashboard-customized .custom-dashboard>.dashboard-widget{grid-column:1/-1!important}.dashboard-sizing-bar{bottom:10px;width:calc(100vw - 20px);padding:12px}.dashboard-size-controls>div{gap:8px}}

/* Editing chrome lives outside the grid, so it cannot change a card's measured size. */
#content.dashboard-sizing{padding-bottom:260px!important}
.dashboard-sizing-inspector{flex-basis:100%;display:grid;grid-template-columns:minmax(140px,1fr) minmax(220px,2fr);gap:15px;border-top:1px solid var(--line);padding-top:10px;align-items:start}
.dashboard-sizing-picker{font-size:10px;color:var(--muted)}.dashboard-sizing-picker select{display:block;font-size:11px;padding:7px;margin-top:5px;width:100%}
#content.dashboard-sizing .custom-dashboard>.dashboard-size-selected{outline:2px solid var(--accent)}
.dashboard-sizing-inspector [hidden]{display:none!important}
@media(max-width:640px){.dashboard-sizing-inspector{grid-template-columns:1fr}.dashboard-sizing-bar p{display:none}.dashboard-sizing-bar .actions{gap:5px}.dashboard-sizing-bar button{padding:6px 9px}}

/* Handles must stay out of the widget grid, including the goals row. */
#content.dashboard-sizing .custom-dashboard .dashboard-size-handle{position:absolute!important}
