/* Mobile app surface; desktop presentation is kept in app.css. */
.mobile-tabbar,.mobile-sidebar-close,.mobile-brand{display:none}
.report-filter-toolbar{display:none}
@media(max-width:760px){
 .report-filter-panel{background:var(--theme-surface-ffffff,#fff);border:1px solid var(--theme-edge-e3e8f2,#e3e8f2);border-radius:16px;margin-bottom:22px;overflow:hidden}
 .report-filter-toolbar{display:flex;align-items:center;gap:8px;padding:8px 10px;min-width:0}
 .report-filter-toolbar button{border:0;cursor:pointer;font:inherit;touch-action:manipulation}
 .report-filter-toggle{flex:1;text-align:left;background:transparent;color:var(--theme-text-17243b,#17243b);font-size:13px!important;font-weight:650!important;min-height:44px;padding:0 4px}
 .report-filter-shortcuts{display:flex;gap:4px;flex-shrink:0}
 .report-filter-shortcuts button{min-height:36px;padding:0 10px;border-radius:10px;background:var(--theme-surface-f5f6fb,#f5f6fb);color:var(--theme-text-63718c,#63718c);font-size:12px}
 .report-filter-shortcuts button[aria-pressed=true]{background:var(--theme-surface-eeebff,#eeebff);color:#6250ed;font-weight:650}
 .report-filter-chevron{width:32px;min-height:44px;padding:0;background:transparent;color:var(--theme-text-63718c,#63718c);flex-shrink:0}
 .report-filter-chevron span{display:block;transition:transform .18s ease}
 .report-filter-panel.is-expanded .report-filter-chevron span{transform:rotate(180deg)}
 .report-filter-toolbar button:focus-visible{outline:2px solid #7665ff;outline-offset:2px}
 .report-filter-panel:not(.is-expanded) .filter-bar{display:none}
 .report-filter-panel .filter-bar{border:0;border-top:1px solid var(--theme-edge-edf0f6,#edf0f6);border-radius:0;margin-bottom:0;box-shadow:none}
 body{--mobile-nav-space:calc(88px + env(safe-area-inset-bottom,0px));-webkit-tap-highlight-color:transparent}
 .workspace{min-width:0;padding-bottom:var(--mobile-nav-space)}
 .workspace>main{padding:20px 14px 16px;min-width:0}
 .topbar{position:sticky;top:0;z-index:30;min-height:64px;height:auto;padding:calc(10px + env(safe-area-inset-top,0px)) 14px 10px;background:var(--theme-surface-fffffff2,#fffffff2);backdrop-filter:blur(16px)}
 .topbar .mobile-menu{display:none}
 .topbar .breadcrumb{display:none}
 .topbar-actions{width:100%;gap:8px;justify-content:flex-end}
 .topbar-actions>.mobile-brand{display:flex;align-items:center;justify-content:center;flex:none;width:36px;height:44px;margin-right:2px}
 .mobile-brand img{display:block;width:34px;height:34px;object-fit:contain;border-radius:10px}
 .topbar .project-picker{flex:1;min-width:0;margin-right:auto;padding:0;border:0}
 .topbar .project-picker>select{width:100%;max-width:none;min-width:0;height:44px;font-size:16px;padding:8px 26px 8px 8px;background:var(--theme-surface-f5f7fb,#f5f7fb);border-radius:12px}
 .topbar-actions .icon-button,.topbar-actions .avatar{min-width:40px;width:40px;height:44px}
 .topbar-actions>.privacy-open{display:inline-flex}
 .mobile-tabbar{position:fixed;z-index:70;bottom:calc(12px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);width:calc(100% - 40px);max-width:400px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;gap:3px;padding:5px;border:1px solid var(--line);border-radius:36px;background:var(--card);backdrop-filter:blur(24px);box-shadow:0 6px 22px #1c274412;transition:width .25s ease,padding .25s ease}
 .mobile-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:50px;min-width:0;border:0;border-radius:28px;background:transparent;color:var(--theme-text-65738b,#65738b);text-decoration:none;font:inherit;font-size:10px;font-weight:600;cursor:pointer;transition:min-height .25s,gap .25s}
 .mobile-tab .icon{width:21px;height:21px;flex:none}
 .mobile-tab>span{max-height:18px;opacity:1;overflow:hidden;white-space:nowrap;transition:max-height .25s,opacity .2s}
 .mobile-tab.active,.mobile-tab[aria-expanded=true]{background:var(--theme-surface-f0efff,#f0efff);color:var(--indigo)}
 .mobile-tab:focus-visible{outline:2px solid var(--cyan);outline-offset:1px}
 .mobile-nav-compact .mobile-tabbar{width:min(270px,calc(100% - 40px));padding:4px}
 .mobile-nav-compact .mobile-tab{min-height:44px;gap:0}
 .mobile-nav-compact .mobile-tab>span{max-height:0;opacity:0}
 .sidebar{z-index:80;top:auto;bottom:var(--mobile-nav-space);left:12px;right:12px;width:auto;max-height:calc(var(--mobile-viewport-height,100dvh) - 150px - env(safe-area-inset-top,0px));padding:22px;border-radius:24px;transform:translateY(calc(100% + 130px));transition:transform .2s;box-shadow:0 20px 70px #10182e35;overflow:auto;overscroll-behavior:contain}
 .menu-open .sidebar{transform:translateY(0)}
 .menu-open{overflow:hidden}
 body:has(dialog[open]){overflow:hidden}
 .menu-open .meta-assistant{visibility:hidden;pointer-events:none}
 .sidebar-scrim{z-index:75}
 .mobile-sidebar-close{display:flex;position:absolute;right:14px;top:16px;color:#f0f6fc;border-color:#ffffff30;background:#ffffff12;width:44px;height:44px}
 .sidebar .brand{margin:0 0 18px;padding-right:40px}
 .sidebar-caption{display:none}
 .sidebar nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .sidebar .nav-item{min-height:48px;padding:10px;gap:9px;font-size:13px}
 .sidebar .nav-item .icon{flex:none;width:20px;height:20px}
 .sidebar .nav-dot{display:none}
 .sidebar-bottom{padding-top:16px}
 .sidebar-bottom .plan-summary{margin-top:12px}
 .filter-bar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--field-row-gap,18px) 12px;padding:14px;border-radius:18px}
 .filter-bar>label,.filter-bar .date-filter{min-width:0;max-width:100%;margin:0;display:flex;flex-direction:column;gap:7px;font-size:12px}
 .filter-bar .date-filter{grid-column:1/-1}
 .filter-bar input,.filter-bar select{width:100%;min-width:0;max-width:100%;height:44px;box-sizing:border-box;font-size:16px;margin:0;padding:8px;border-radius:10px}
 .filter-bar input[type=date]{width:100%;min-width:0;max-width:100%;overflow:hidden;appearance:none;-webkit-appearance:none}
 .filter-bar input::-webkit-date-and-time-value{text-align:left;min-width:0}
 .filter-bar .button-filter{grid-column:1;height:44px;min-width:0;width:100%;font-size:13px}
 .filter-bar #refresh-data{grid-column:2;justify-self:end;width:44px;height:44px}
 .filter-bar .filter-advanced{grid-column:1/-1;min-width:0}
 .advanced-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--field-row-gap,18px) 12px}
 .advanced-filter-grid label{min-width:0;margin:0}
 .card{border-radius:18px;min-width:0}
 .card-header{gap:12px;flex-direction:column;align-items:flex-start;padding:18px 16px}
 .card-header>:first-child{width:100%;min-width:0}
 .card-header>div,.card-header .inline-actions{min-width:0;max-width:100%}
 .card-header .inline-actions{display:flex;width:100%;gap:8px;flex-wrap:wrap;justify-content:flex-start}
 .card-header select,.card-header .inline-actions select{max-width:100%;min-width:0}
 .page-heading h1{font-size:26px}
 .page-heading p{font-size:13px;line-height:1.5}
 .heading-actions .button,.inline-actions .button{min-height:44px;font-size:12px}
 .workspace input:not([type=checkbox]):not([type=radio]),.workspace select,.workspace textarea,.modal input:not([type=checkbox]):not([type=radio]),.modal select,.modal textarea{font-size:16px;max-width:100%;min-width:0}
 .workspace input:not([type=checkbox]):not([type=radio]),.workspace select,.modal input:not([type=checkbox]):not([type=radio]),.modal select{min-height:44px}
 .auth-body input:not([type=checkbox]):not([type=radio]),.auth-body select{font-size:16px;min-height:44px}
 .auth-body .button{min-height:44px}
 .form-row{gap:14px;margin-bottom:18px}
 .form-row>label{flex-basis:calc(50% - 7px);min-width:0}
 .modal{width:calc(100% - 16px);max-width:calc(100% - 16px);max-height:calc(var(--mobile-viewport-height,100dvh) - 16px);border-radius:22px}
 .modal[open]{display:flex;flex-direction:column}
 .modal>form{display:flex;flex-direction:column;min-height:0;max-height:inherit}
 .modal .modal-header,.modal .modal-footer{flex-shrink:0;padding:16px;gap:10px}
 .modal .modal-body{flex:1;min-height:0;max-height:none;overflow:auto;padding:18px 16px;overscroll-behavior:contain}
 .modal .modal-footer{flex-wrap:wrap;padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))}
 .modal .modal-footer .button{min-height:44px;flex:1;white-space:normal}
 .modal.mapping-modal,.modal.import-modal{width:calc(100% - 16px);height:calc(var(--mobile-viewport-height,100dvh) - 16px);max-height:calc(var(--mobile-viewport-height,100dvh) - 16px)}
 .modal .form-row{flex-direction:column;gap:16px}
 .modal .form-row>label{flex-basis:auto}
 .modal .privacy-types,.modal .detail-grid{grid-template-columns:1fr}
 .notification-dropdown{position:fixed;left:12px;right:12px;top:calc(76px + env(safe-area-inset-top,0px));width:auto;max-width:none;max-height:calc(var(--mobile-viewport-height,100dvh) - 190px);display:flex;flex-direction:column}
 .notification-dropdown-list{min-height:0;max-height:none;overflow:auto;flex:1}
 .notification-dropdown>header,.notification-dropdown>footer{flex-shrink:0}
 .user-dropdown{max-width:calc(100vw - 24px)}
 .orders-search-bar{padding:16px;gap:10px}
 .orders-search-bar label{flex-basis:100%;max-width:none;min-width:0}
 .orders-search-bar .hint{font-size:12px;margin:0}
 .table-wrap{max-width:100%;min-width:0;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;overscroll-behavior-y:auto}
 .meta-structure .structure-table-wrap{max-height:none;overflow:auto;scrollbar-gutter:auto;overscroll-behavior-y:auto}
 .meta-structure .structure-table .structure-name,.meta-structure.structure-with-selection .structure-table .structure-name,.meta-structure .structure-table .structure-switch-column,.meta-structure.structure-with-selection .structure-table .structure-switch-column,.meta-structure .structure-table .structure-select,.meta-structure .structure-table thead th{position:static;left:auto;top:auto;box-shadow:none}
 .meta-structure .structure-table .structure-name{min-width:180px;max-width:230px}
 .structure-tabs{padding:0 10px}
 .structure-tabs>button{min-height:48px}
 .structure-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px}
 .structure-toolbar>label{min-width:0;font-size:12px}
 .structure-toolbar>.structure-search,.structure-toolbar>button{grid-column:1/-1;max-width:none;width:100%;min-width:0}
 .structure-toolbar input,.structure-toolbar select,.structure-toolbar .button{height:44px;min-height:44px;min-width:0}
 .structure-footer{align-items:flex-start;gap:12px;flex-wrap:wrap;padding:14px 16px}
 .structure-pagination{gap:8px;flex-wrap:wrap}
 .table-pagination .button,.structure-pagination .button{min-height:44px;min-width:44px}
 .meta-assistant{right:16px;bottom:calc(var(--mobile-nav-space) + 10px)}
 body:has(.meta-ai-panel:not([hidden])){overflow:hidden}
 .meta-ai-panel{width:100vw;max-width:none;height:var(--mobile-viewport-height,100dvh);max-height:none;border:0;border-radius:0;box-shadow:none;overscroll-behavior:contain}
 .meta-ai-panel>.meta-ai-header{padding-top:calc(14px + env(safe-area-inset-top,0px))}
 .meta-ai-panel>footer{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
 .meta-ai-panel>.meta-ai-header,.meta-ai-panel>.meta-ai-context,.meta-ai-panel>.meta-ai-status,.meta-ai-panel>.meta-ai-questions,.meta-ai-panel>.meta-ai-compose,.meta-ai-panel>footer{flex-shrink:0}
 .meta-ai-messages{min-height:0;overflow-x:hidden;-webkit-overflow-scrolling:touch}
 .meta-ai-drag{cursor:default;touch-action:auto}
 .meta-ai-compose textarea{font-size:16px}
 .meta-ai-panel .meta-ai-header>button,.meta-ai-compose button{min-width:44px;min-height:44px}
 .mobile-keyboard-open .mobile-tabbar{display:none}
 .mobile-keyboard-open .meta-ai-panel{height:calc(var(--mobile-viewport-height,100dvh) - 24px)}
 .toasts{top:calc(12px + env(safe-area-inset-top,0px))}
 .app-footer{font-size:12px;padding:12px 16px 20px}
}
@media(max-width:380px){
 .topbar-actions{gap:4px}.topbar-actions .icon-button,.topbar-actions .avatar{width:36px;min-width:36px}
 .sidebar nav{grid-template-columns:1fr}
 .metrics-grid{grid-template-columns:1fr}
 .advanced-filter-grid{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.sidebar,.mobile-tabbar,.mobile-tab,.mobile-tab>span{transition:none}}

/* Light glass shell with a static page selection. */
@media(max-width:760px){
 .mobile-tabbar{background:var(--theme-surface-ffffffd9,#ffffffd9);border-color:var(--theme-edge-ffffffd9,#ffffffd9);backdrop-filter:blur(22px) saturate(1.2);-webkit-backdrop-filter:blur(22px) saturate(1.2);isolation:isolate;touch-action:none}
 .mobile-tabbar .mobile-tab{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
}
