.mobile-nav,.mobile-more-layer{display:none}

@media (max-width:820px){
  body.tc-mobile-app{font-size:14px;overflow:hidden}
  body.tc-mobile-app #appView.app{display:block;height:100dvh;min-height:100dvh}
  body.tc-mobile-app #appView .sidebar{display:none!important}
  body.tc-mobile-app #appView .main{height:100dvh;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;background:var(--light)}
  body.tc-mobile-app #appView .topbar{height:56px;padding:0 14px;gap:10px;z-index:40;background:color-mix(in srgb,var(--light) 95%,var(--white));backdrop-filter:blur(12px)}
  body.tc-mobile-app #appView #breadcrumbs{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--muted)}
  body.tc-mobile-app #appView .top-actions{gap:8px;flex:0 0 auto}
  body.tc-mobile-app #appView .top-actions .icon-btn,body.tc-mobile-app #appView .top-actions .avatar{width:36px;height:36px}
  body.tc-mobile-app #appView .content{max-width:none;margin:0;padding:18px 14px calc(94px + env(safe-area-inset-bottom))}

  body.tc-mobile-app .page-head{flex-direction:column;align-items:stretch;gap:14px;margin-bottom:20px}
  body.tc-mobile-app .page-head h1,body.tc-mobile-app .detail-title h1{font-size:28px;line-height:1.08}
  body.tc-mobile-app .page-head p{font-size:13px;line-height:1.45}
  body.tc-mobile-app .page-head .actions,body.tc-mobile-app .detail-title .actions,body.tc-mobile-app .detail-actions{width:100%;gap:7px}
  body.tc-mobile-app .page-head .actions .btn,body.tc-mobile-app .detail-title .actions .btn{min-height:42px}
  body.tc-mobile-app .detail-title{flex-direction:column;gap:14px}
  body.tc-mobile-app .section-title{font-size:20px;margin:22px 0 12px}

  body.tc-mobile-app .cards,body.tc-mobile-app .grid-3,body.tc-mobile-app .analytics-kpis,body.tc-mobile-app .recurring-detail-cards,body.tc-mobile-app .account-home-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.tc-mobile-app .grid-2,body.tc-mobile-app .project-overview-financial{grid-template-columns:1fr}
  body.tc-mobile-app .card,body.tc-mobile-app .panel,body.tc-mobile-app .project-item,body.tc-mobile-app .partner-card,body.tc-mobile-app .account-card{border-radius:14px}
  body.tc-mobile-app .card,body.tc-mobile-app .panel{padding:15px}
  body.tc-mobile-app .stat strong,body.tc-mobile-app .kpi-line strong{font-size:24px}

  body.tc-mobile-app .search-row,body.tc-mobile-app .filter-bar,body.tc-mobile-app .analytics-toolbar{flex-direction:column;align-items:stretch;gap:9px}
  body.tc-mobile-app .search-row input,body.tc-mobile-app .search-row select,body.tc-mobile-app .filter-bar>input,body.tc-mobile-app .filter-bar>.tc-combo,body.tc-mobile-app .filter-bar select,body.tc-mobile-app .analytics-toolbar .filter-bar{width:100%;max-width:none;min-width:0;flex:1 1 auto}
  body.tc-mobile-app .view-toggle{margin-right:0;overflow-x:auto;padding-bottom:2px}
  body.tc-mobile-app .tabs{overflow-x:auto;white-space:nowrap;scrollbar-width:none;margin:16px -14px;padding:0 14px}
  body.tc-mobile-app .tabs::-webkit-scrollbar{display:none}
  body.tc-mobile-app .tab{flex:0 0 auto}

  body.tc-mobile-app .project-list{gap:9px}
  body.tc-mobile-app .project-item{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:11px 14px;padding:15px}
  body.tc-mobile-app .project-item .project-name{grid-column:1/-1}
  body.tc-mobile-app .project-item>*{min-width:0}
  body.tc-mobile-app .project-item .hide-md{display:block}
  body.tc-mobile-app .project-name strong{font-size:14px}

  body.tc-mobile-app .tc-mobile-table-scroll{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:10px}
  body.tc-mobile-app .tc-mobile-table-scroll table{min-width:680px}
  body.tc-mobile-app .tc-mobile-table-scroll::-webkit-scrollbar{height:5px}
  body.tc-mobile-app .tc-mobile-table-scroll::-webkit-scrollbar-thumb{background:var(--line);border-radius:999px}
  body.tc-mobile-app table .btn{min-height:34px}

  body.tc-mobile-app .form-grid{grid-template-columns:1fr;gap:3px}
  body.tc-mobile-app .form-grid .span2{grid-column:auto}
  body.tc-mobile-app .modal-bg,body.tc-mobile-app .tc-submodal-bg{padding:0;align-items:end}
  body.tc-mobile-app .modal,body.tc-mobile-app .tc-submodal{width:100%;max-width:none;max-height:94dvh;border-radius:20px 20px 0 0;padding:20px 16px calc(18px + env(safe-area-inset-bottom))}
  body.tc-mobile-app .modal h3,body.tc-mobile-app .tc-submodal h3{font-size:23px}
  body.tc-mobile-app .modal-actions{position:sticky;bottom:calc(-18px - env(safe-area-inset-bottom));background:var(--white);margin:20px -16px 0;padding:14px 16px calc(14px + env(safe-area-inset-bottom));z-index:2}
  body.tc-mobile-app .modal-actions .btn{min-height:42px}

  body.tc-mobile-app .settings-layout{grid-template-columns:1fr}
  body.tc-mobile-app .settings-menu{display:flex;overflow-x:auto;gap:5px;padding-bottom:5px;scrollbar-width:none}
  body.tc-mobile-app .settings-menu::-webkit-scrollbar{display:none}
  body.tc-mobile-app .settings-menu button{flex:0 0 auto;white-space:nowrap}
  body.tc-mobile-app .info-list{grid-template-columns:105px minmax(0,1fr);gap:8px}
  body.tc-mobile-app .split{align-items:flex-start;flex-direction:column}
  body.tc-mobile-app .doc-summary{align-items:flex-start;gap:8px;flex-direction:column}
  body.tc-mobile-app .partner-head{flex-direction:column}
  body.tc-mobile-app .partner-head-actions{width:100%;flex-wrap:wrap}
  body.tc-mobile-app .finance-row{grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}
  body.tc-mobile-app .finance-label{grid-column:1}
  body.tc-mobile-app .finance-values{grid-column:2;grid-row:1;text-align:right}
  body.tc-mobile-app .finance-track{grid-column:1/-1}
  body.tc-mobile-app .finance-pct{grid-column:1/-1;justify-self:start}
  body.tc-mobile-app .calc-preview{grid-template-columns:1fr}

  body.tc-mobile-app .calendar-shell{overflow-x:auto;-webkit-overflow-scrolling:touch}
  body.tc-mobile-app .calendar-toolbar,body.tc-mobile-app .calendar-month-head,body.tc-mobile-app .calendar-month-grid{min-width:720px}
  body.tc-mobile-app .kanban-board{margin-right:-14px;padding-right:14px}

  body.tc-mobile-app .toast{left:14px;right:14px;bottom:calc(84px + env(safe-area-inset-bottom));text-align:center}
  body.tc-mobile-app .tc-pagination{align-items:flex-start;flex-direction:column}
  body.tc-mobile-app .tc-pagination>div{max-width:100%;overflow-x:auto;padding-bottom:2px}

  body.tc-mobile-app .mobile-nav{position:fixed;left:0;right:0;bottom:0;z-index:900;display:grid;grid-template-columns:repeat(5,1fr);height:calc(68px + env(safe-area-inset-bottom));padding:6px 6px env(safe-area-inset-bottom);background:color-mix(in srgb,var(--white) 96%,transparent);border-top:1px solid var(--line);box-shadow:0 -10px 30px rgba(15,15,15,.06);backdrop-filter:blur(16px)}
  body.tc-mobile-app .mobile-nav button{min-width:0;border:0;background:transparent;color:var(--muted);border-radius:11px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:4px 2px;font-size:9px;font-weight:700;line-height:1.1}
  body.tc-mobile-app .mobile-nav button svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  body.tc-mobile-app .mobile-nav button.active{color:var(--olive);background:rgba(130,125,103,.10)}
  body.tc-mobile-app .mobile-nav button:focus-visible{outline:2px solid var(--olive);outline-offset:-2px}

  body.tc-mobile-app .mobile-more-layer{position:fixed;inset:0;z-index:1100;display:block;background:rgba(15,15,15,.28);backdrop-filter:blur(2px)}
  body.tc-mobile-app .mobile-more-layer.hidden{display:none!important}
  body.tc-mobile-app .mobile-more-sheet{position:absolute;left:0;right:0;bottom:0;background:var(--white);border-radius:22px 22px 0 0;border-top:1px solid var(--line);box-shadow:0 -24px 70px rgba(0,0,0,.18);padding:10px 14px calc(18px + env(safe-area-inset-bottom));max-height:78dvh;overflow:auto}
  body.tc-mobile-app .mobile-more-handle{width:38px;height:4px;border-radius:999px;background:var(--line);margin:2px auto 14px}
  body.tc-mobile-app .mobile-more-title{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding:0 4px 9px}
  body.tc-mobile-app .mobile-more-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  body.tc-mobile-app .mobile-more-item{border:1px solid var(--line);background:var(--white);color:var(--ink);border-radius:13px;padding:13px 12px;display:flex;align-items:center;gap:10px;text-align:left;font-weight:650}
  body.tc-mobile-app .mobile-more-item span{width:22px;height:22px;display:grid;place-items:center;color:var(--olive);font-size:16px}
  body.tc-mobile-app .mobile-more-item.active{border-color:var(--olive);background:rgba(130,125,103,.10);color:var(--olive)}
  body.tc-mobile-app .mobile-more-sep{height:1px;background:var(--line);margin:12px 0}
  body.tc-mobile-app .mobile-more-utility{width:100%;border:0;background:transparent;color:var(--ink);padding:12px 10px;border-radius:10px;display:flex;align-items:center;gap:10px;text-align:left;font-weight:650}
  body.tc-mobile-app .mobile-more-utility:hover{background:var(--soft)}

  body.tc-mobile-app .user-menu{top:58px!important;right:10px!important;left:10px!important;width:auto!important}
}

@media (max-width:520px){
  body.tc-mobile-app .cards,body.tc-mobile-app .grid-3,body.tc-mobile-app .analytics-kpis,body.tc-mobile-app .recurring-detail-cards,body.tc-mobile-app .account-home-cards{grid-template-columns:1fr}
  body.tc-mobile-app .mobile-more-grid{grid-template-columns:1fr 1fr}
  body.tc-mobile-app .page-head h1,body.tc-mobile-app .detail-title h1{font-size:26px}
  body.tc-mobile-app .info-list{grid-template-columns:1fr}
  body.tc-mobile-app .info-list dd{margin:0 0 8px}
}
