.mobile-menu-close{display:none}
@media screen and (max-width:900px){
 html:not(.ui-popup-embedded) body.app-shell:not(.schedule-settings-embed)>.app-main>.topbar{display:flex;height:48px;min-height:48px;padding:0 10px;gap:8px}
 .app-shell .topbar #mobileMenu{display:inline-grid;place-items:center;flex:0 0 44px;min-height:44px;padding:0;font-size:21px}
 .app-shell .topbar>div:first-of-type{min-width:0}
 .app-shell .topbar>div:first-of-type>b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .app-shell .topbar .user-tools{gap:4px;flex:none;white-space:nowrap}
 .app-shell .topbar .user-tools .link{font-size:12px;padding-inline:4px}
 .app-shell .sidebar{visibility:hidden;z-index:41;transition:transform .2s}
 .app-shell.sidebar-open .sidebar{visibility:visible}
 .app-shell.sidebar-open .sidebar-overlay{z-index:40}
 .app-shell .side-nav{overscroll-behavior:contain}
 .app-shell #sidebarCollapse{display:none}
 .app-shell .sidebar-brand{padding-right:68px}
 .app-shell .mobile-menu-close{display:block;position:absolute;top:4px;right:8px;min-height:40px;padding:4px 10px;font-size:13px}
}
@media screen and (max-width:900px) and (prefers-reduced-motion:reduce){
 .app-shell .sidebar{transition:none}
}
@media screen{
 html.workspace-top-level body.app-shell{overflow-x:clip}
 html.workspace-top-level body.app-shell>.app-main>.topbar{position:sticky;top:0;z-index:20}
 html.workspace-top-level body.app-shell:not(.schedule-settings-embed) .list-workspace-head,
 html.workspace-top-level body.compact-workspace:not(.dashboard-workspace-mode,.dashboard-today-mode,.schedule-settings-embed)>.app-main>main>.page-head{position:sticky;top:var(--workspace-topbar-height,48px);z-index:12;background:var(--workspace-background,#fff9f5);padding-top:4px;padding-bottom:4px}
 html.workspace-top-level body.app-shell:not(.schedule-settings-embed) .list-workspace-head{padding-top:0;padding-bottom:0}
}
html body dialog.ui-popup.child-information-drawer:modal{position:fixed;inset:0 auto 0 calc(100vw - min(1040px,96vw))!important;margin:0!important;width:min(1040px,96vw);max-width:100vw;height:100dvh;max-height:100dvh!important;padding:16px;display:flex;flex-direction:column;gap:0;border-radius:var(--ui-field-radius) 0 0 var(--ui-field-radius)!important;animation:workspace-drawer-in 180ms ease-out}
.child-information-drawer>header{flex:none}
.child-information-drawer>header>h2{flex:1;min-width:0;margin:0;overflow-wrap:anywhere}
html body .child-information-drawer .child-drawer-actions{flex:none;flex-wrap:nowrap;gap:var(--ui-gap)}
html body .child-information-drawer .child-drawer-actions>button:not(.ui-popup-close){height:var(--ui-control-height);min-height:var(--ui-control-height);padding:8px 10px;font-size:var(--ui-control-size);white-space:nowrap}
.child-header-actions-bound [data-child-header-action],.child-header-actions-bound .intake-bottom-bar:has([data-child-header-action]){display:none!important}
.child-header-actions-bound .child-information-navigation>.child-list-actions{display:none!important}
.child-header-actions-bound .child-information-save{display:none!important}
html body .child-information-drawer .child-drawer-actions>[hidden]{display:none!important}
.child-information-drawer>iframe{flex:1;min-height:0;width:100%;height:100%!important;border:0}
html:has(.child-information-embedded),body:has(.child-information-embedded){background:#fff}
body:has(.child-information-embedded) .app-main>main{background:transparent}
.child-information-navigation{display:flex;align-items:center;justify-content:space-between;gap:var(--ui-gap);flex-wrap:wrap;margin-bottom:12px}
.child-information-embedded .child-information-navigation{padding-bottom:12px;border-bottom:1px solid var(--ui-field-border)}
.child-information-embedded #intakeWorkspace .intake-panel{padding:12px;border-radius:var(--ui-field-radius);border-color:var(--ui-field-border)}
.child-information-embedded #intakeWorkspace .intake-panel-head h2{font-size:var(--ui-body-size);font-weight:700}
[data-child-information] #intakeWorkspace .field:has(#id_name){flex:0 1 140px}
[data-child-information] #intakeWorkspace .field:has(#id_phone),[data-child-information] #intakeWorkspace .field:has(#id_phone2){flex:0 1 150px}
html body [data-child-information] #intakeWorkspace :is(#id_name,#id_phone,#id_phone2){width:100%}
html body [data-child-information] #intakeWorkspace #id_postal_code{width:100px}
html body [data-child-information] #intakeWorkspace .field:has(#id_road_address){flex:0 1 360px;max-width:520px}
[data-child-information] .consultation-meta{display:flex;align-items:end;flex-wrap:wrap;gap:var(--ui-field-gap)}
[data-child-information] .consultation-meta .field{flex:none;width:auto;max-width:100%;margin:0}
[data-child-information] .consultation-meta :is(input,select){width:160px;max-width:100%}
[data-child-information] .consultation-meta #id_result{width:240px}
[data-child-information] .consultation-columns{max-width:100%;grid-template-columns:repeat(2,minmax(0,360px))}
[data-child-information] .consultation-columns .field{min-width:0}
[data-child-information] .child-payment-summary{display:flex;flex-wrap:wrap;gap:8px 24px}
[data-child-information] .child-payment-records :is(th,td):nth-child(-n+3){white-space:nowrap}
[data-child-information] .child-payment-records :is(th,td):nth-child(3){text-align:right}
[data-child-information] .consultation-columns .field:first-child>label{display:flex;align-items:center;min-height:var(--ui-control-height);margin:0 0 5px}
@media(max-width:650px){[data-child-information] .consultation-columns{grid-template-columns:minmax(0,1fr)}html body .child-information-drawer .child-drawer-actions{gap:6px}html body .child-information-drawer .child-drawer-actions>button{padding:8px}.child-information-drawer>header{flex-wrap:nowrap!important;gap:8px}}
.child-information-embedded .intake-bottom-bar{position:static;box-shadow:none;background:transparent;border-top:1px solid var(--ui-field-border);padding:12px 0 0;justify-content:flex-end}
[data-child-information] .child-information-filter{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin:12px 0;max-width:100%}
[data-child-information] .child-information-filter>label,[data-child-information] .child-month-lookup{display:inline-flex;flex:none;align-items:center;flex-direction:row;gap:8px;margin:0;font-size:var(--ui-label-size);font-weight:600;color:var(--ui-label);white-space:nowrap}
[data-child-information] .child-information-filter select{width:112px;max-width:112px;min-width:0;flex:none}
html body [data-child-information].ui-detail-panel .child-information-filter :is(input,select,button){box-sizing:border-box;height:var(--ui-control-height);min-height:var(--ui-control-height);font-family:inherit;font-size:var(--ui-control-size);line-height:20px}
html:has(.child-information-drawer[open]),html.workspace-top-level body.app-shell:has(.child-information-drawer[open]){overflow:hidden}
.workspace-snackbars{position:fixed;inset:auto 18px 18px auto;margin:0;padding:0;border:0;background:transparent;overflow:visible;max-width:min(480px,calc(100vw - 32px));z-index:10000;pointer-events:none}
.workspace-snackbar{display:flex;align-items:center;gap:12px;padding:12px 16px;margin-top:8px;border-radius:var(--ui-field-radius);background:#302c2b;color:#fff;box-shadow:0 6px 24px #0003;font-size:13px;line-height:1.5;pointer-events:auto;overflow-wrap:anywhere}
.workspace-snackbar[data-level=error]{border-left:4px solid var(--ui-selected,#f48e7c)}
.workspace-snackbar button{flex:none;min-height:30px;background:transparent;border:1px solid #ffffff80;color:#fff;font:inherit;padding:4px 8px}
.workspace-snackbars[data-placement=center]{inset:50% auto auto 50%;transform:translate(-50%,-50%);width:max-content;max-width:min(480px,calc(100vw - 32px))}
.workspace-snackbars[data-placement=center] .workspace-snackbar{margin:0;border-radius:var(--ui-field-radius,10px)}
[data-save-feedback][hidden]{display:none!important}
@keyframes workspace-drawer-in{from{transform:translateX(32px);opacity:0}to{transform:translateX(0);opacity:1}}
@media(max-width:650px){html body dialog.ui-popup.child-information-drawer:modal{inset:0 auto 0 0!important;width:100vw;border-radius:0!important;padding:12px}.workspace-snackbars:not([data-placement=center]){inset:auto 12px 12px 12px;max-width:none}}

/* Compact desktop toolbars can use another row on phones. Keep wide data
   inside the table/chart scrollport, not behind the edge of the page. */
@media screen and (max-width:700px){
 html body.app-shell>.app-main>main :is(.list-header-title,.list-header-tabs,.list-header-filters,.list-header-tools,.accounting-head-line,.expense-title-row){height:auto;flex-wrap:wrap!important;min-width:0}
 html body.app-shell>.app-main>main :is(.list-header-title>.page-head,.list-header-filters>form,.compact-filter-toolbar,.compact-period-buttons,.expense-month-navigation,.billing-child-search,.list-tab-options,.list-title-actions,.accounting-head-actions){flex-wrap:wrap!important;height:auto!important;min-width:0;max-width:100%!important;overflow:visible!important}
 html body.app-shell>.app-main>main .list-header-filters>form{flex:1 1 100%}
 html body.app-shell>.app-main>main :is(.list-inline-tool-layout .list-header-filters>.list-header-tools,.list-title-actions>:is(.actions,.head-actions)){flex-wrap:wrap!important;max-width:100%;height:auto}
 html body.app-shell>.app-main>main :is(.intake-compact-filters .period-buttons,.expense-tabs,.list-header-tabs>nav){flex-wrap:wrap;max-width:100%}
 html body.app-shell>.app-main>main .expense-title-row .expense-month-navigation{flex:1 1 100%;order:3}
 html body.app-shell>.app-main>main .billing-child-search input:not([type=hidden]){flex:1 1 125px;width:125px;min-width:0}
 html body.app-shell>.app-main>main :is(.table-wrap,.monthly-money-scroll){min-width:0;max-width:100%;overflow-x:auto}
 html body.app-shell>.app-main>main .intake-data-grid :is(th,td)[data-key]{position:relative;left:auto;z-index:auto}
 html body.app-shell>.app-main>main :is(.operational-chart-grid,.operational-kpi-grid){grid-template-columns:minmax(0,1fr);min-width:0}
 html body.app-shell>.app-main>main :is(.operational-chart-card,.operational-breakdown-card,.accounting-compact-head,.list-workspace-head){min-width:0;max-width:100%}
 html body.app-shell>.app-main>main .list-workspace-head{position:static}
 html body.app-shell>.app-main>main :is(.list-header-filters,.accounting-compact-head,.expense-title-row) :is(button:not(.ui-help-trigger),a.button,select,input:not([type=hidden],[type=checkbox],[type=radio])){min-height:44px!important;max-height:none}
}
@media(prefers-reduced-motion:reduce){html body dialog.ui-popup.child-information-drawer:modal{animation:none}}
@media print{.workspace-snackbars{display:none!important}}
