/* Unified compact client UI. Admin surfaces are intentionally excluded. */
body.is-authenticated:not(:has(.admin-shell)){--ui-bg:#f4f6f3;--ui-card:#fff;--ui-soft:#f7f8f5;--ui-line:#dde4de;--ui-text:#203a2f;--ui-muted:#748179;--ui-radius:13px;--ui-shadow:0 5px 18px rgba(27,52,39,.045);background:var(--ui-bg);color:var(--ui-text)}
/* Structural reset for legacy modules with fixed intrinsic widths. */
body.is-authenticated:not(:has(.admin-shell)),body.is-authenticated:not(:has(.admin-shell)) *,body.is-authenticated:not(:has(.admin-shell)) *::before,body.is-authenticated:not(:has(.admin-shell)) *::after{box-sizing:border-box}
body.is-authenticated:not(:has(.admin-shell)){overflow-x:hidden}
body.is-authenticated:not(:has(.admin-shell)) :is(main,section,article,aside,header,footer,nav,form,fieldset,div,ul,li){min-width:0}
body.is-authenticated:not(:has(.admin-shell)) :is(img,video,svg){max-width:100%;height:auto}
body.is-authenticated:not(:has(.admin-shell)) :is(h1,h2,h3,h4,p,b,strong,small,span,a,label){overflow-wrap:anywhere}
body.is-authenticated:not(:has(.admin-shell)) :is(input,select,textarea,button){max-width:100%}
body.is-authenticated:not(:has(.admin-shell)) main.with-sidebar{width:auto!important;max-width:none!important;overflow-x:clip;padding:18px clamp(14px,2vw,24px) 28px!important}
body.is-authenticated:not(:has(.admin-shell)) main.with-sidebar>:not(.toast){max-width:100%}
body.is-authenticated:not(:has(.admin-shell)) :is(.table-wrap,.responsive-table,.pipeline-table,.guest-table){max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
body.is-authenticated:not(:has(.admin-shell)) table{max-width:100%;border-collapse:collapse}
body.is-authenticated:not(:has(.admin-shell)) :is(.row-menu>div,.budget-menu>div,.danger-data-card details form,.filter-drawer>div,.mobile-account-menu>div){max-width:min(390px,calc(100vw - 24px))}
body.is-authenticated:not(:has(.admin-shell)) :is(.dash-hero,.pipeline-hero,.settings-premium-hero,.profile-head,.access-head,.commerce-head,.health-hero,.venue-head){min-height:0!important;padding:18px 21px!important;margin-bottom:10px!important;border-radius:15px!important;box-shadow:var(--ui-shadow)!important}
body.is-authenticated:not(:has(.admin-shell)) :is(.budget-hero,.vendor-hero,.task-hero,.timeline-hero,.menu-hero,.venue-head){padding-top:10px!important;padding-bottom:14px!important;margin-bottom:8px!important}
body.is-authenticated:not(:has(.admin-shell)) :is(.dash-hero,.pipeline-hero,.settings-premium-hero,.profile-head,.access-head,.commerce-head,.health-hero,.budget-hero,.vendor-hero,.task-hero,.timeline-hero,.menu-hero,.venue-head) h1{margin:2px 0 5px!important;font-size:clamp(27px,3vw,39px)!important;line-height:1!important}
body.is-authenticated:not(:has(.admin-shell)) :is(.dash-hero,.pipeline-hero,.settings-premium-hero,.profile-head,.access-head,.commerce-head,.health-hero,.budget-hero,.vendor-hero,.task-hero,.timeline-hero,.menu-hero,.venue-head) p:last-child{margin:3px 0 0!important;font-size:10px!important;line-height:1.4!important}
body.is-authenticated:not(:has(.admin-shell)) .eyebrow{font-size:7px!important;letter-spacing:.14em!important}
body.is-authenticated:not(:has(.admin-shell)) :is(.button,button,.mini-action){min-height:34px}
body.is-authenticated:not(:has(.admin-shell)) :is(input,select,textarea){border-radius:8px}

/* App shell */
body.is-authenticated:not(:has(.admin-shell)) .client-sidebar{padding:15px 12px}.client-sidebar .sidebar-event{padding:13px;border-radius:11px}.client-sidebar .sidebar-event h3{margin:3px 0;font-size:17px}.client-sidebar .sidebar-event span,.client-sidebar .sidebar-event a{font-size:9px}.client-sidebar .sidebar-search{height:38px;margin:10px 0;border-radius:9px}.client-sidebar .sidebar-nav{gap:6px}.client-sidebar .sidebar-nav-group{gap:1px;padding:6px}.client-sidebar .sidebar-nav-group>p{margin:1px 6px 4px;font-size:7px}.client-sidebar .sidebar-nav a{min-height:36px;padding:5px 8px;border-radius:8px;font-size:10px}.client-sidebar .sidebar-nav a i{width:26px;height:26px;flex-basis:26px}.client-sidebar .sidebar-nav a i svg{width:14px;height:14px}.client-sidebar .sidebar-help{padding:10px;border-radius:10px}.client-sidebar .sidebar-help b,.client-sidebar .sidebar-help a{font-size:9px}

/* Shared cards and metrics */
body.is-authenticated:not(:has(.admin-shell)) :is(.dash-metrics,.pipeline-summary,.budget-summary,.vendor-stats,.task-stats,.menu-stats,.settings-overview,.event-summary,.security-metrics,.report-summary){gap:8px!important;margin-bottom:12px!important}
body.is-authenticated:not(:has(.admin-shell)) :is(.dash-metrics>a,.pipeline-summary>article,.budget-summary>article,.vendor-stats>article,.task-stats>article,.menu-stats>article,.settings-overview>article,.event-summary>article,.report-summary>article){min-height:82px!important;padding:12px 14px!important;border-radius:var(--ui-radius)!important;border-color:var(--ui-line)!important;box-shadow:var(--ui-shadow)!important}
body.is-authenticated:not(:has(.admin-shell)) :is(.dash-metrics,.pipeline-summary,.budget-summary,.vendor-stats,.task-stats,.menu-stats,.settings-overview,.event-summary) b{font-size:25px!important}
body.is-authenticated:not(:has(.admin-shell)) :is(.dash-metrics,.pipeline-summary,.budget-summary,.vendor-stats,.task-stats,.menu-stats,.settings-overview,.event-summary) small{font-size:7px!important}
body.is-authenticated:not(:has(.admin-shell)) :is(.admin-panel,.ops-panel,.access-panel,.invite-panel,.expense-card,.category-card,.settings-card,.profile-card,.commerce-card){border-radius:var(--ui-radius)!important;border-color:var(--ui-line)!important;box-shadow:var(--ui-shadow)!important}

/* Dashboard */
body.is-authenticated:not(:has(.admin-shell)) .dash-countdown{min-width:130px!important;padding:11px 14px!important}.dash-countdown strong{font-size:31px!important}.dash-grid{gap:10px!important}.dash-panel{padding:15px!important;border-radius:var(--ui-radius)!important;box-shadow:var(--ui-shadow)!important}.dash-panel h2{font-size:19px!important}.dash-shortcuts{gap:7px!important}.dash-shortcuts a{min-height:62px!important;padding:11px!important;border-radius:10px!important}

/* Guest management */
body.is-authenticated:not(:has(.admin-shell)) .guest-action-deck{gap:7px!important;margin:8px 0 11px!important}.guest-action-card{min-height:61px!important;padding:8px 11px!important;border-radius:11px!important;box-shadow:var(--ui-shadow)!important}.guest-action-card>i{width:32px!important;height:32px!important;border-radius:9px!important}.guest-action-card b{font-size:13px!important}.guest-action-card em{font-size:8px!important}.stage-section{padding:14px!important;margin-bottom:10px!important;border-radius:var(--ui-radius)!important;box-shadow:var(--ui-shadow)!important}.stage-section>header{margin-bottom:9px!important}.stage-section>header h2{font-size:18px!important}.stage-card{min-height:61px!important;padding:8px!important;border-radius:10px!important}.pipeline-filters{top:5px!important;margin:8px 0!important;padding:7px!important;border-radius:11px!important}.pipeline-search{height:41px!important}.filter-drawer>summary{height:41px!important}.pipeline-row{gap:8px!important;margin-bottom:6px!important;padding:11px 10px!important;border-radius:12px!important;box-shadow:0 3px 12px rgba(27,52,39,.035)!important}.family-avatar{width:37px!important;height:37px!important;font-size:14px!important}.family-title h3{font-size:14px!important}.row-stage,.people-counts{padding:7px 8px!important;border-radius:9px!important}.pipeline-sidebar{gap:7px!important}.pipeline-sidebar>details{border-radius:12px!important;box-shadow:var(--ui-shadow)!important}.pipeline-sidebar>details>summary{padding:11px 12px!important}.new-family>form{padding:11px!important}

/* Venue */
body.is-authenticated:not(:has(.admin-shell)) .layout-tabs{gap:5px!important;padding-bottom:6px!important}.layout-tabs a,.layout-tabs button{min-height:32px!important;padding:7px 10px!important;border-radius:8px!important}.venue-editor{height:calc(100vh - 210px)!important;min-height:570px!important;border-radius:14px!important;box-shadow:0 9px 28px rgba(27,51,39,.08)!important}.venue-library,.venue-inspector{padding:14px 11px!important}.venue-library>button{margin:2px 0!important;padding:7px!important;border-radius:8px!important}.editor-toolbar{height:44px!important;padding:6px 10px!important}.editor-toolbar button{width:30px!important;height:30px!important;border-radius:7px!important}.seating-panel{padding:17px!important;margin-top:14px!important;border-radius:14px!important;box-shadow:var(--ui-shadow)!important}.seating-overview{gap:7px!important;margin:12px 0!important}.seating-overview article{min-height:82px!important;padding:11px!important;border-radius:10px!important}.seating-command{margin-top:11px!important;padding:10px 12px!important;border-radius:10px!important}

/* Budget, vendors, tasks, menus and timeline */
body.is-authenticated:not(:has(.admin-shell)) :is(.budget-layout,.vendor-layout,.task-layout,.menu-layout,.timeline-layout){gap:12px!important}.budget-summary article{min-height:91px!important}.budget-summary .budget-total>strong{font-size:31px!important}.budget-row,.vendor-card,.task-row,.menu-type-card,.timeline-card{margin-bottom:6px!important;padding:12px!important;border-radius:11px!important;box-shadow:0 3px 12px rgba(27,52,39,.035)!important}.budget-row{padding-left:0!important}.budget-info h3,.vendor-card h3,.task-row h3{font-size:15px!important}.money-columns{gap:13px!important}.money-columns b{font-size:15px!important}.expense-card,.category-card{padding:14px!important}.expense-card>summary,.category-card>summary{font-size:17px!important}.vendor-form,.task-form,.menu-form,.timeline-form{gap:7px!important}.task-filter,.budget-filter,.vendor-filter,.menu-filter{gap:6px!important;margin-bottom:8px!important}

/* Settings, access, profile and commercial */
body.is-authenticated:not(:has(.admin-shell)) :is(.settings-layout,.access-grid,.profile-grid,.commerce-grid){gap:12px!important}.settings-premium-body{padding:15px!important}.settings-section,.settings-danger-zone{padding:16px!important;border-radius:12px!important}.settings-section h2{font-size:20px!important}.access-panel,.invite-panel{padding:15px!important}.member-row{padding:9px 0!important}.profile-card,.commerce-card{padding:15px!important}.invitation-history>article{padding:9px 0!important}

/* Lists, empty states and overlays */
body.is-authenticated:not(:has(.admin-shell)) :is(.pipeline-empty,.budget-empty,.vendor-empty,.task-empty,.menu-empty,.ops-empty){padding:38px 16px!important;border-radius:12px!important}.toast{border-radius:10px!important;box-shadow:0 10px 30px rgba(22,48,35,.15)!important}.pagination{margin-top:10px!important}.site-footer{padding-top:25px!important;padding-bottom:25px!important}

@media(max-width:1050px){body.is-authenticated:not(:has(.admin-shell)) main.with-sidebar{padding:15px 17px 24px!important}.venue-editor{min-height:540px!important}.pipeline-summary,.budget-summary,.vendor-stats,.task-stats,.menu-stats{grid-template-columns:repeat(2,1fr)!important}}
@media(max-width:720px){body.is-authenticated:not(:has(.admin-shell)) main.with-sidebar{padding:10px 10px 78px!important}body.is-authenticated:not(:has(.admin-shell)) :is(.dash-hero,.pipeline-hero,.settings-premium-hero,.profile-head,.access-head,.commerce-head,.health-hero){padding:15px!important;border-radius:12px!important}body.is-authenticated:not(:has(.admin-shell)) :is(.dash-hero,.pipeline-hero,.settings-premium-hero,.profile-head,.access-head,.commerce-head,.health-hero,.budget-hero,.vendor-hero,.task-hero,.timeline-hero,.menu-hero,.venue-head) h1{font-size:27px!important}.mobile-bottom-nav{height:61px!important}.mobile-bottom-nav a{font-size:8px!important}.pipeline-summary,.budget-summary,.vendor-stats,.task-stats,.menu-stats{gap:6px!important}.pipeline-row{padding:10px 8px!important}.venue-editor{height:auto!important;min-height:0!important}.venue-workspace{height:520px!important}.seating-overview{grid-template-columns:1fr 1fr!important}}
@media(max-width:460px){.pipeline-summary,.budget-summary,.vendor-stats,.task-stats,.menu-stats,.settings-overview{grid-template-columns:1fr 1fr!important}.seating-overview{grid-template-columns:1fr!important}.money-columns{gap:8px!important}.money-columns span{min-width:48px!important}}

/* Cross-module fitting and predictable responsive collapse. */
body.is-authenticated:not(:has(.admin-shell)) :is(.dash-grid,.pipeline-workspace,.budget-layout,.vendor-layout,.task-layout,.menu-layout,.timeline-layout,.settings-layout,.access-grid,.profile-grid,.commerce-grid){width:100%;max-width:100%}
body.is-authenticated:not(:has(.admin-shell)) :is(.dash-metrics,.pipeline-summary,.budget-summary,.vendor-stats,.task-stats,.menu-stats,.settings-overview,.event-summary,.security-metrics,.report-summary,.seating-overview){width:100%;grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr))!important}
body.is-authenticated:not(:has(.admin-shell)) :is(.pipeline-filters,.task-filter,.budget-filter,.vendor-filter,.menu-filter,.pipeline-row,.budget-row,.task-row,.vendor-card,.menu-type-card,.timeline-card){width:100%;max-width:100%}
body.is-authenticated:not(:has(.admin-shell)) :is(.pipeline-search,.filter-drawer,.filter-select,.filter-field,.family-title,.budget-info,.task-info,.vendor-info,.menu-info){min-width:0;max-width:100%}
body.is-authenticated:not(:has(.admin-shell)) :is(.family-title h3,.budget-info h3,.task-info h3,.vendor-info h3,.menu-info h3){max-width:100%;white-space:normal}
body.is-authenticated:not(:has(.admin-shell)) .event-settings-form{grid-template-columns:minmax(0,1fr)!important;width:100%!important;max-width:none!important}
body.is-authenticated:not(:has(.admin-shell)) :is(.settings-content,.settings-section,.premium-fields,.data-control-zone){width:100%;max-width:100%}
body.is-authenticated:not(:has(.admin-shell)) .venue-editor{width:100%;max-width:100%;overflow:hidden}
body.is-authenticated:not(:has(.admin-shell)) :is(.venue-workspace,.canvas-scroll,.canvas-viewport){min-width:0;max-width:100%}
@media(max-width:1180px){body.is-authenticated:not(:has(.admin-shell)) :is(.budget-layout,.vendor-layout,.task-layout,.menu-layout,.timeline-layout,.access-grid,.profile-grid,.commerce-grid){grid-template-columns:minmax(0,1fr)!important}body.is-authenticated:not(:has(.admin-shell)) :is(.budget-sidebar,.vendor-sidebar,.task-sidebar,.menu-sidebar,.timeline-sidebar){position:static!important;width:100%!important;max-width:none!important}body.is-authenticated:not(:has(.admin-shell)) .venue-editor{grid-template-columns:170px minmax(0,1fr)!important}}
@media(max-width:900px){body.is-authenticated:not(:has(.admin-shell)) :is(.dash-grid,.pipeline-workspace){grid-template-columns:minmax(0,1fr)!important}body.is-authenticated:not(:has(.admin-shell)) :is(.pipeline-sidebar,.dash-sidebar){position:static!important;width:100%!important;max-width:none!important}body.is-authenticated:not(:has(.admin-shell)) :is(.pipeline-filters,.task-filter,.budget-filter,.vendor-filter,.menu-filter){position:static!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important}body.is-authenticated:not(:has(.admin-shell)) .venue-editor{display:block!important;height:auto!important;min-height:0!important}body.is-authenticated:not(:has(.admin-shell)) .venue-library{display:flex!important;gap:7px;overflow-x:auto;overscroll-behavior-inline:contain}body.is-authenticated:not(:has(.admin-shell)) .venue-library>button{flex:0 0 auto}body.is-authenticated:not(:has(.admin-shell)) .venue-inspector{width:100%!important;max-width:none!important}}
@media(max-width:640px){body.is-authenticated:not(:has(.admin-shell)) :is(.dash-metrics,.pipeline-summary,.budget-summary,.vendor-stats,.task-stats,.menu-stats,.settings-overview,.event-summary,.security-metrics,.report-summary){grid-template-columns:repeat(2,minmax(0,1fr))!important}body.is-authenticated:not(:has(.admin-shell)) :is(.premium-fields,.data-control-grid){grid-template-columns:minmax(0,1fr)!important}body.is-authenticated:not(:has(.admin-shell)) :is(.pipeline-row,.budget-row,.task-row){grid-template-columns:minmax(0,1fr)!important;align-items:start!important}body.is-authenticated:not(:has(.admin-shell)) :is(.row-actions,.money-columns,.task-actions){width:100%;max-width:100%;justify-content:flex-start;flex-wrap:wrap}body.is-authenticated:not(:has(.admin-shell)) .venue-workspace{height:480px!important}body.is-authenticated:not(:has(.admin-shell)) .editor-toolbar{height:auto!important;min-height:44px;flex-wrap:wrap}body.is-authenticated:not(:has(.admin-shell)) .settings-save-bar{right:10px;left:10px;width:auto!important;max-width:calc(100vw - 20px)}}
@media(max-width:380px){body.is-authenticated:not(:has(.admin-shell)) :is(.dash-metrics,.pipeline-summary,.budget-summary,.vendor-stats,.task-stats,.menu-stats,.settings-overview,.event-summary,.security-metrics,.report-summary){grid-template-columns:minmax(0,1fr)!important}body.is-authenticated:not(:has(.admin-shell)) main.with-sidebar{padding-right:8px!important;padding-left:8px!important}}
