/*
 * NCATS ERP Mobile UX 4.1
 * Responsive presentation layer only. No business/data logic is changed here.
 */
body.ncats-ui{
  --ncats-mobile-gap:14px;
  --ncats-touch:44px;
  --ncats-mobile-radius:14px;
  --ncats-safe-top:env(safe-area-inset-top,0px);
  --ncats-safe-right:env(safe-area-inset-right,0px);
  --ncats-safe-bottom:env(safe-area-inset-bottom,0px);
  --ncats-safe-left:env(safe-area-inset-left,0px);
  overflow-x:hidden;
}
body.ncats-ui :where(.content,.ncats-admin-content,.client-area-container,.ncats-admin-app,.ncats-content-panel){min-width:0;max-width:100%}
body.ncats-ui :where(p,li,dd,td,th,label,small,strong,a,button){overflow-wrap:anywhere}
body.ncats-ui img,body.ncats-ui svg,body.ncats-ui canvas{max-width:100%}
body.ncats-ui input[type="file"]{max-width:100%}
body.ncats-ui .ncats-mobile-only{display:none!important}

/* Reliable touch targets without disturbing compact desktop screens. */
@media(max-width:980px){
  body.ncats-ui :where(button,.button,.btn,.ncats-btn,.ncats-ui-btn,input[type=submit],input[type=button],input[type=reset]){min-height:var(--ncats-touch)}
  body.ncats-ui :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){max-width:100%}
  body.ncats-ui :where(.ncats-topbar,.ncats-admin-topbar){padding-left:max(12px,var(--ncats-safe-left));padding-right:max(12px,var(--ncats-safe-right))}
  body.ncats-ui .sidebar,body.ncats-ui .ncats-sidebar{padding-bottom:max(24px,calc(16px + var(--ncats-safe-bottom)))}
  body.ncats-ui .ncats-mobile-only{display:initial!important}
}

/* -------------------------------------------------------------------------
   Mobile application shell
   ------------------------------------------------------------------------- */
@media(max-width:980px){
  body.ncats-ui.ncats-nav-open,body.ncats-ui.sidebar-open{overflow:hidden}
  body.ncats-ui .ncats-admin-topbar{
    position:sticky!important;top:0;z-index:1250;
    min-height:64px!important;height:auto!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    padding-top:max(8px,var(--ncats-safe-top));padding-bottom:8px;
  }
  body.ncats-ui .ncats-admin-topbar .ncats-topbar-brand{min-width:0}
  body.ncats-ui .ncats-admin-topbar .ncats-brand-copy{min-width:0}
  body.ncats-ui .ncats-admin-topbar .ncats-brand-copy strong{
    display:block;max-width:44vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  body.ncats-ui .ncats-admin-topbar .ncats-topbar-actions{gap:6px}
  body.ncats-ui .ncats-admin-topbar .ncats-user-trigger{min-width:var(--ncats-touch);padding:5px 7px}
  body.ncats-ui .ncats-admin-topbar .ncats-session-timer{display:none!important}
  body.ncats-ui .ncats-admin-topbar .ncats-header-search{display:none!important}
  body.ncats-ui .ncats-sidebar,body.ncats-ui .sidebar{
    top:0!important;height:100dvh!important;max-height:100dvh!important;
    width:min(330px,90vw)!important;
    padding-top:max(18px,calc(12px + var(--ncats-safe-top)))!important;
    padding-left:max(14px,var(--ncats-safe-left))!important;
    overscroll-behavior:contain;
  }
  body.ncats-ui .ncats-sidebar-overlay,body.ncats-ui .sidebar-backdrop{
    position:fixed!important;inset:0!important;z-index:1290!important;
    background:rgba(15,23,42,.52)!important;backdrop-filter:blur(2px);
  }
  body.ncats-ui .ncats-admin-content,body.ncats-ui .client-area-container>.content{
    width:100%!important;margin-left:0!important;
    padding-left:max(16px,var(--ncats-safe-left))!important;
    padding-right:max(16px,var(--ncats-safe-right))!important;
    padding-bottom:max(44px,calc(28px + var(--ncats-safe-bottom)))!important;
  }
  body.ncats-ui .ncats-topbar{
    position:sticky!important;top:0!important;left:0!important;z-index:1250!important;
    min-height:64px!important;height:auto!important;
    padding-top:max(8px,var(--ncats-safe-top))!important;padding-bottom:8px!important;
  }
  body.ncats-ui .ncats-topbar__identity{min-width:0;flex:1}
  body.ncats-ui .ncats-topbar__title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:42vw}
  body.ncats-ui .ncats-topbar__actions{flex:0 0 auto}
  body.ncats-ui .ncats-ann-panel,body.ncats-ui .ncats-session-panel,body.ncats-ui .user-options,body.ncats-ui .ncats-user-dropdown{
    max-width:calc(100vw - 24px)!important;
  }
}

@media(max-width:560px){
  body.ncats-ui .ncats-admin-content,body.ncats-ui .client-area-container>.content{
    padding-left:max(12px,var(--ncats-safe-left))!important;
    padding-right:max(12px,var(--ncats-safe-right))!important;
  }
  body.ncats-ui .ncats-admin-topbar .ncats-brand-copy small,
  body.ncats-ui .ncats-topbar__eyebrow{display:none!important}
  body.ncats-ui .ncats-admin-topbar .ncats-brand-mark.ncats-brand-mark--logo{width:38px!important;height:46px!important}
  body.ncats-ui .ncats-topbar .ncats-topbar-button,
  body.ncats-ui .ncats-topbar .user-menu-btn,
  body.ncats-ui .ncats-admin-topbar .ncats-icon-button,
  body.ncats-ui .ncats-admin-topbar .ncats-user-trigger{min-width:44px!important;width:44px;padding:0!important;justify-content:center}
  body.ncats-ui .ncats-topbar .ncats-session{display:none!important}
}

/* -------------------------------------------------------------------------
   Page hierarchy, cards and dashboard density
   ------------------------------------------------------------------------- */
@media(max-width:760px){
  body.ncats-ui .content>h1,body.ncats-ui .content>h2,body.ncats-ui .ncats-page-heading h1{
    font-size:clamp(22px,7vw,28px)!important;line-height:1.18;margin-bottom:12px;
  }
  body.ncats-ui .erp-page-context{margin-bottom:16px}
  body.ncats-ui .erp-page-context nav{font-size:11px}
  body.ncats-ui .erp-page-context p,body.ncats-ui .erp-page-help{font-size:12px;line-height:1.55}
  body.ncats-ui :where(.dashboard-hero,.ncats-dashboard-hero,.ncats-home__hero,.ncats-guide__hero){border-radius:16px!important}
  body.ncats-ui :where(.dashboard-cards,.dashboard-stats,.ncats-kpi-grid,.ncats-quick-grid,.graph-row){gap:10px!important}
  body.ncats-ui .dashboard-stats,body.ncats-ui .ncats-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.ncats-ui .dashboard-cards,body.ncats-ui .ncats-quick-grid{grid-template-columns:1fr!important}
  body.ncats-ui :where(.stat-card,.ncats-kpi-card){min-height:0!important;padding:15px!important;border-radius:13px!important}
  body.ncats-ui :where(.stat-card strong,.ncats-kpi-value){font-size:24px!important}
  body.ncats-ui :where(.ncats-admin-card,.ncats-form-card,.payment-card,.ticket-card,.nc-ledger-card,.ns-panel,.nc-cert-card,.review-participants-section){
    border-radius:var(--ncats-mobile-radius)!important;padding:16px!important;
  }
}
@media(max-width:380px){
  body.ncats-ui .dashboard-stats,body.ncats-ui .ncats-kpi-grid{grid-template-columns:1fr!important}
}

/* -------------------------------------------------------------------------
   Forms: one clear vertical flow on phones
   ------------------------------------------------------------------------- */
@media(max-width:760px){
  body.ncats-ui :where(.content,.ncats-admin-content) :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){
    width:100%;min-width:0!important;min-height:46px;font-size:16px!important;line-height:1.35;
  }
  body.ncats-ui :where(.content,.ncats-admin-content) textarea{min-height:110px;resize:vertical}
  body.ncats-ui :where(.content,.ncats-admin-content) input[type=file]{height:auto;min-height:46px;padding:9px}
  body.ncats-ui :where(.content,.ncats-admin-content) :where(label,.form-label){max-width:100%}
  body.ncats-ui :where(.content,.ncats-admin-content) :where(.ncats-form-grid,.ncats-grid,.ncats-staff-fields,.ncats-permission-grid,.ncats-school-form,.ncats-invoice-form,.ncats-workspace-form){
    grid-template-columns:1fr!important;
  }
  body.ncats-ui :where(.content,.ncats-admin-content) :where(.full,[style*="grid-column"]){grid-column:auto!important}
  body.ncats-ui :where(.content,.ncats-admin-content) form[style*="display:flex"]{
    align-items:stretch!important;
  }
  body.ncats-ui :where(.content,.ncats-admin-content) form[style*="display:flex"]>label,
  body.ncats-ui :where(.content,.ncats-admin-content) form[style*="display:flex"]>div{min-width:0!important;max-width:100%}
  body.ncats-ui :where(.action-buttons,.ncats-form-actions,.ncats-filter-actions,.nc-table-export-actions){
    display:grid!important;grid-template-columns:1fr!important;width:100%;gap:9px!important;
  }
  body.ncats-ui :where(.action-buttons,.ncats-form-actions,.ncats-filter-actions,.nc-table-export-actions) :where(button,.button,.btn,a.ncats-btn,a.ncats-ui-btn){
    width:100%;justify-content:center;text-align:center;
  }
  body.ncats-ui .ncats-v250-filters,body.ncats-ui .ncats-filter-form,body.ncats-ui #filterForm,body.ncats-ui #filterFormSchool,body.ncats-ui #filterFormCoordinators{
    display:grid!important;grid-template-columns:1fr!important;align-items:stretch!important;gap:10px!important;
  }
  body.ncats-ui .ncats-v250-filters :where(input,select,button),
  body.ncats-ui .ncats-filter-form :where(input,select,button){width:100%!important;min-width:0!important}
  body.ncats-ui .ncats-settings{max-width:100%!important}
  body.ncats-ui .ncats-settings-table{width:100%!important}
}

/* Checkboxes/radios need room and a useful tap target. */
@media(max-width:760px){
  body.ncats-ui :where(label,.ncats-school-check,.check){touch-action:manipulation}
  body.ncats-ui input[type=checkbox],body.ncats-ui input[type=radio]{width:20px;height:20px;min-width:20px;accent-color:var(--erp-orange)}
}

/* -------------------------------------------------------------------------
   Mobile table/card switch
   ------------------------------------------------------------------------- */
body.ncats-ui .ncats-mobile-table-tools{
  display:none;align-items:center;justify-content:space-between;gap:10px;
  margin:8px 0 6px;padding:8px 9px;border:1px solid #e4e6eb;border-radius:11px;background:#fff;
}
body.ncats-ui .ncats-mobile-table-tools__label{font-size:11px;font-weight:750;color:#6a6f78}
body.ncats-ui .ncats-mobile-table-tools__buttons{display:flex;gap:4px;padding:3px;border-radius:9px;background:#f2f3f6}
body.ncats-ui .ncats-mobile-table-tools button{
  min-height:34px!important;padding:6px 10px;border:0;border-radius:7px;background:transparent;color:#59606b;font:700 11px/1.2 inherit;cursor:pointer;
}
body.ncats-ui .ncats-mobile-table-tools button[aria-pressed="true"]{background:#fff;color:#8f3e08;box-shadow:0 1px 4px rgba(15,23,42,.1)}

@media(max-width:680px){
  body.ncats-ui .ncats-mobile-table-tools{display:flex}
  body.ncats-ui .erp-table-hint{margin:6px 2px;color:#747985}

  body.ncats-ui .erp-table-region.ncats-mobile-cards{
    overflow:visible!important;border:0!important;background:transparent!important;border-radius:0!important;
  }
  body.ncats-ui .erp-table-region.ncats-mobile-cards table{
    display:block!important;width:100%!important;min-width:0!important;background:transparent!important;
  }
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>thead{
    position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;
  }
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>tbody{
    display:grid!important;gap:11px!important;width:100%!important;
  }
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>tbody>tr{
    display:block!important;width:100%!important;padding:8px 13px!important;
    background:#fff!important;border:1px solid #e3e5ea!important;border-radius:13px!important;
    box-shadow:0 2px 8px rgba(15,23,42,.035)!important;
  }
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>tbody>tr[hidden]{display:none!important}
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>tbody>tr>td{
    display:grid!important;grid-template-columns:minmax(92px,34%) minmax(0,1fr)!important;
    gap:10px!important;align-items:start!important;width:100%!important;min-width:0!important;max-width:100%!important;
    padding:9px 0!important;border:0!important;border-bottom:1px solid #eff0f3!important;background:transparent!important;
    white-space:normal!important;text-align:left!important;overflow:visible!important;
  }
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>tbody>tr>td:last-child{border-bottom:0!important}
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>tbody>tr>td::before{
    content:attr(data-erp-label);display:block;color:#737985;font-size:10px;line-height:1.35;font-weight:800;letter-spacing:.035em;text-transform:uppercase;
  }
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>tbody>tr>td[colspan]{display:block!important}
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>tbody>tr>td[colspan]::before{display:none!important}
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>tbody>tr>td :where(input:not([type=checkbox]):not([type=radio]),select,textarea){
    width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important;
  }
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>tbody>tr>td :where(button,.button,.btn,a){max-width:100%}
  body.ncats-ui .erp-table-region.ncats-mobile-cards .ncats-status-badge{justify-self:start}

  /* Table mode stays compact and intentionally scrollable. */
  body.ncats-ui .erp-table-region:not(.ncats-mobile-cards){
    max-width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;
  }
  body.ncats-ui .erp-table-region:not(.ncats-mobile-cards) table{min-width:max(680px,100%)!important}
  body.ncats-ui .erp-table-region:not(.ncats-mobile-cards) th,
  body.ncats-ui .erp-table-region:not(.ncats-mobile-cards) td{padding:11px 12px!important}

  /* Portal design automatically cardises simple tables below 600px. The explicit
     Table button must be able to restore a real scrollable table. */
  body.ncats-ui .erp-table-region:not(.ncats-mobile-cards) .erp-card-table{display:table!important;min-width:max(680px,100%)!important}
  body.ncats-ui .erp-table-region:not(.ncats-mobile-cards) .erp-card-table thead{position:static!important;width:auto!important;height:auto!important;overflow:visible!important;clip:auto!important;display:table-header-group!important}
  body.ncats-ui .erp-table-region:not(.ncats-mobile-cards) .erp-card-table tbody{display:table-row-group!important}
  body.ncats-ui .erp-table-region:not(.ncats-mobile-cards) .erp-card-table tbody tr{display:table-row!important;border:0!important;padding:0!important;box-shadow:none!important}
  body.ncats-ui .erp-table-region:not(.ncats-mobile-cards) .erp-card-table tbody td{display:table-cell!important;min-width:0!important;border-bottom:1px solid #ededf1!important;padding:11px 12px!important}
  body.ncats-ui .erp-table-region:not(.ncats-mobile-cards) .erp-card-table tbody td::before{display:none!important}
}

/* Don't cardise print/document tables even if JavaScript adds a generic region. */
@media(max-width:680px){
  body.ncats-ui :where(.invoice-container,.inv-wrap,#invoice,#invoicePrintArea,[data-erp-document]) .ncats-mobile-table-tools{display:none!important}
  body.ncats-ui :where(.invoice-container,.inv-wrap,#invoice,#invoicePrintArea,[data-erp-document]) .erp-table-region{overflow-x:auto!important;border:0!important}
}

/* -------------------------------------------------------------------------
   Modals / dropdowns become phone-friendly sheets
   ------------------------------------------------------------------------- */
@media(max-width:600px){
  body.ncats-ui .ncats-modal{padding:0!important;align-items:flex-end!important}
  body.ncats-ui .ncats-modal__box{
    width:100%!important;max-width:none!important;max-height:min(82dvh,760px)!important;margin:0!important;
    border-radius:18px 18px 0 0!important;padding-bottom:var(--ncats-safe-bottom)!important;overflow:auto!important;
  }
  body.ncats-ui .ncats-modal__header{position:sticky;top:0;z-index:2;background:#fff}
  body.ncats-ui .ncats-modal__footer{position:sticky;bottom:0;background:#fff;padding-bottom:max(12px,var(--ncats-safe-bottom))}
  body.ncats-ui #ncats-session-modal{
    top:auto!important;bottom:0!important;left:0!important;transform:none!important;width:100%!important;max-width:none!important;
    max-height:82dvh;overflow:auto;border-radius:18px 18px 0 0!important;padding-bottom:var(--ncats-safe-bottom);
  }
  body.ncats-ui #resultPopup>div{width:calc(100% - 24px)!important;max-width:none!important;max-height:80dvh;overflow:auto}
  body.ncats-ui .ncats-ann-panel,body.ncats-ui .ncats-session-panel{
    position:fixed!important;left:10px!important;right:10px!important;top:70px!important;width:auto!important;max-height:calc(100dvh - 84px)!important;overflow:auto!important;
  }
  body.ncats-ui .user-options,body.ncats-ui .ncats-user-dropdown{position:fixed!important;left:10px!important;right:10px!important;top:70px!important;width:auto!important;max-height:calc(100dvh - 84px)!important;overflow:auto!important}
}

/* -------------------------------------------------------------------------
   Invoice / finance views: readable screen layout, print untouched
   ------------------------------------------------------------------------- */
@media screen and (max-width:760px){
  body.ncats-ui .invoice-container,body.ncats-ui .inv-wrap{width:100%!important;max-width:100%!important;margin:10px auto!important;padding:12px!important;box-shadow:none!important}
  body.ncats-ui :where(.invoice-header,.details-row){flex-direction:column!important;gap:12px!important}
  body.ncats-ui :where(.invoice-header .left-box,.invoice-header .right-box,.details-row .left-box,.details-row .right-box){width:100%!important;max-width:100%!important}
  body.ncats-ui .nc-ledger .nc-ledger-row{align-items:stretch!important;flex-direction:column!important}
  body.ncats-ui .nc-ledger .nc-ledger-stat{display:block!important;width:100%!important;margin:5px 0!important}
  body.ncats-ui .payment-form__form{display:grid!important;grid-template-columns:1fr!important}
}

/* -------------------------------------------------------------------------
   Student editor and high-density workspaces
   ------------------------------------------------------------------------- */
@media(max-width:680px){
  body.ncats-ui #seEditForm .erp-table-region,
  body.ncats-ui #addStudentForm .erp-table-region,
  body.ncats-ui #ncDraftForm .erp-table-region{margin-top:8px}
  body.ncats-ui #seEditForm .erp-table-region.ncats-mobile-cards table>tbody>tr,
  body.ncats-ui #addStudentForm .erp-table-region.ncats-mobile-cards table>tbody>tr,
  body.ncats-ui #ncDraftForm .erp-table-region.ncats-mobile-cards table>tbody>tr{padding:11px 13px!important}
  body.ncats-ui #seEditForm .erp-table-region.ncats-mobile-cards td,
  body.ncats-ui #addStudentForm .erp-table-region.ncats-mobile-cards td,
  body.ncats-ui #ncDraftForm .erp-table-region.ncats-mobile-cards td{grid-template-columns:1fr!important;gap:5px!important}
  body.ncats-ui #seEditForm .erp-table-region.ncats-mobile-cards td::before,
  body.ncats-ui #addStudentForm .erp-table-region.ncats-mobile-cards td::before,
  body.ncats-ui #ncDraftForm .erp-table-region.ncats-mobile-cards td::before{font-size:10px}
}

/* -------------------------------------------------------------------------
   Auth/registration/support screens
   ------------------------------------------------------------------------- */
@media(max-width:600px){
  body.ncats-ui-login .pro-login{padding:24px 18px!important;border-radius:14px!important}
  body.ncats-ui-login .login-head h1{font-size:26px!important}
  body.ncats-ui-login :where(input,button){font-size:16px}
  body.ncats-ui .ncats-reg-page{width:100%!important;padding-inline:max(10px,var(--ncats-safe-left))!important}
  body.ncats-ui .ncats-reg-card{padding:18px 14px 22px!important}
  body.ncats-ui .ncats-actions{display:grid!important;grid-template-columns:1fr!important}
  body.ncats-ui .ncats-actions .ncats-btn{width:100%!important}
  body.ncats-ui .erp-support-page{padding-left:max(12px,var(--ncats-safe-left))!important;padding-right:max(12px,var(--ncats-safe-right))!important}
}

/* Device orientation should not leave a stale overlay/sidebar state visually. */
@media(orientation:landscape) and (max-height:520px) and (max-width:980px){
  body.ncats-ui .sidebar,body.ncats-ui .ncats-sidebar{width:min(360px,66vw)!important}
  body.ncats-ui .sidebar-brand{padding-bottom:12px!important;margin-bottom:8px!important}
  body.ncats-ui .sidebar-footer{display:none!important}
}

@media(prefers-reduced-motion:reduce){
  body.ncats-ui .ncats-mobile-table-tools *,body.ncats-ui .sidebar,body.ncats-ui .ncats-sidebar{transition:none!important;scroll-behavior:auto!important}
}

@media print{
  body.ncats-ui .ncats-mobile-table-tools{display:none!important}
  body.ncats-ui .erp-table-region.ncats-mobile-cards{overflow:visible!important;border:0!important}
  body.ncats-ui .erp-table-region.ncats-mobile-cards table{display:table!important;min-width:0!important}
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>thead{position:static!important;width:auto!important;height:auto!important;overflow:visible!important;clip:auto!important;display:table-header-group!important}
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>tbody{display:table-row-group!important}
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>tbody>tr{display:table-row!important;border:0!important;padding:0!important;box-shadow:none!important}
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>tbody>tr>td{display:table-cell!important;border-bottom:1px solid #ddd!important;padding:8px!important}
  body.ncats-ui .erp-table-region.ncats-mobile-cards table>tbody>tr>td::before{display:none!important}
}


/* -------------------------------------------------------------------------
   4.1.1 mobile navigation stacking hotfix
   The backdrop must sit above page content but BELOW the open drawer. Keeping
   the topbar above both preserves the menu toggle/close controls.
   ------------------------------------------------------------------------- */
@media(max-width:980px){
  body.ncats-ui .ncats-admin-topbar,
  body.ncats-ui .ncats-topbar{
    z-index:1500!important;
  }

  body.ncats-ui .ncats-sidebar,
  body.ncats-ui .sidebar{
    z-index:1450!important;
    pointer-events:auto!important;
  }

  body.ncats-ui .ncats-sidebar :where(a,button,input,select,textarea,label),
  body.ncats-ui .sidebar :where(a,button,input,select,textarea,label){
    pointer-events:auto!important;
    touch-action:manipulation;
  }

  body.ncats-ui .ncats-sidebar-overlay,
  body.ncats-ui .sidebar-backdrop{
    z-index:1400!important;
  }

  /* Admin drawer belongs below the fixed admin top bar. */
  body.ncats-ui .ncats-admin-app .sidebar.ncats-sidebar{
    top:var(--ncats-topbar-height,64px)!important;
    height:calc(100dvh - var(--ncats-topbar-height,64px))!important;
  }

  /* The client drawer is intentionally full-height; its topbar stays above it. */
  body.ncats-ui.ncats-ui-client .sidebar:not(.ncats-sidebar){
    top:0!important;
    height:100dvh!important;
  }
}
