/* Touch layouts supplement the existing desktop controls and report layouts. */
.mobile-dock,.mobile-projects,.programme-list,.mobile-view-toggle{display:none}
.app-status{display:flex;align-items:center;gap:12px;padding:9px 38px;color:#526975;font-size:12px;background:#fff;border-bottom:1px solid #d6e2e8;flex-wrap:wrap}
.app-status button{font-size:12px;padding:5px 10px;min-height:36px}
.app-status .connection{margin-right:auto}
.app-status .offline{color:#96651e}
.app-status .update-button[hidden]{display:none}
.installation-steps{padding-left:20px;line-height:1.8;color:#526975;font-size:14px}
.installation-note{line-height:1.6;color:#526975;font-size:13px}
.menu-shade{display:none}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #2c80a9;outline-offset:3px}
@media(max-width:700px){
 html{scroll-padding-top:90px}body{overflow-x:hidden}#shell{min-width:0}main{padding:20px 15px calc(95px + env(safe-area-inset-bottom))}
 #topbar{padding-top:env(safe-area-inset-top);height:calc(66px + env(safe-area-inset-top));padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
 .app-status{padding:8px 15px;gap:8px;font-size:11px}.app-status button{padding:5px 8px}
 .demo-banner{align-items:center}.demo-banner button{min-height:44px}.demo-banner>div{max-width:225px}
 button,.tiny,button.icon{min-height:44px}.mobile-menu{min-width:44px!important}.project-picker select,#projectSwitch{min-width:0;min-height:44px;font-size:16px!important;width:100%}
 input,select,textarea,.field input,.field select,.field textarea{font-size:16px!important;min-height:44px;min-width:0;max-width:100%}
 .field input[type=date]{min-width:0;appearance:none}.field input[readonly]{opacity:1}
 .page-head h1{font-size:26px;overflow-wrap:anywhere}.subtitle{line-height:1.6}.page-head .actions{flex-wrap:wrap}.page-head .actions button{white-space:normal;min-width:100px}
 .kpi{min-width:0}.kpi .value,.kpi.dark .value{font-size:25px}.kpi .note span{display:block;margin-top:4px}.attention-value span{font-size:11px}
 .panel-head{gap:10px;flex-wrap:wrap}.panel-head>div:first-child{min-width:0}.panel-head button{white-space:normal}.panel-head h2{line-height:1.5}
 .grid,.dashboard-grid,.settings-grid,.finance-shortcuts{grid-template-columns:minmax(0,1fr)}.grid>*,.dashboard-grid>*,.settings-grid>*,.panel,.panel-body{min-width:0}
 .portfolio-projects>.table-wrap,.portfolio-projects>.web-scroll-controls{display:none!important}
 .mobile-projects{display:grid;padding:0 15px 15px;gap:12px}.mobile-project-card{border:1px solid #dce5e9;border-radius:10px;padding:16px;background:#fff}
 .mobile-project-card h3{font-size:17px;margin:9px 0 13px;line-height:1.5}.mobile-project-card h3 button{font:inherit;text-align:left;color:#223641;background:none;border:0;padding:0}
 .mobile-project-card .card-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px}.mobile-project-card dl{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:15px 0}
 .mobile-project-card dt{color:#6b818c;font-size:11px;margin-bottom:5px}.mobile-project-card dd{font-size:13px;margin:0;font-weight:600}.mobile-project-card>.primary{width:100%}
 .mobile-dock{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;z-index:10;padding:7px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #d9e3e8;box-shadow:0 -3px 15px #3449530a}
 .mobile-dock button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;font-size:10px;min-width:0;border:0;padding:4px 0;color:#637c88;background:transparent;border-radius:8px;min-height:48px}.mobile-dock button.active{background:#edf5f4;color:#137c6e;font-weight:700}.mobile-dock svg{width:21px;height:21px}
 #sidebar{padding-bottom:calc(25px + env(safe-area-inset-bottom));overflow-y:auto;height:100dvh;z-index:13}.sidebar-close{display:block;min-width:44px}.navigation-open{overflow:hidden}.navigation-open .menu-shade{display:block;position:fixed;inset:0;border:0;border-radius:0;background:#243c4877;z-index:12}
 .finance-tabs{flex-wrap:nowrap;overflow-x:auto;border-radius:8px;max-width:100%}.finance-tabs button{flex-shrink:0}.resource-filters{align-items:stretch}.resource-filters label{width:100%;min-width:0}.resource-filters select{width:100%;min-width:0}
 .planning-window{gap:12px}.planning-window label{min-width:0;flex:1}.planning-range{min-width:0;width:100%;flex-basis:100%}.planning-nav{width:100%;justify-content:space-between}
 .register-cards .table-wrap{overflow:visible;max-height:none}.register-cards>.web-scroll-controls{display:none!important}.register-cards table,.register-cards tbody{display:block;min-width:0!important;width:100%}.register-cards thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .register-cards tr{display:grid;border:1px solid #dce5e9;border-radius:10px;margin:12px;padding:12px;gap:4px;background:#fff}.register-cards td{display:grid;grid-template-columns:105px minmax(0,1fr);gap:10px;padding:6px 0;text-align:left!important;white-space:normal;border:0;overflow-wrap:anywhere}.register-cards td:before{content:attr(data-label);font-size:11px;font-weight:500;color:#6b818c}.register-cards td:last-child{display:block;text-align:right!important}.register-cards td[colspan]{display:block}.register-cards .issue-link{padding:0;min-height:0}
 .mobile-view-toggle{display:flex;gap:6px;margin:0 0 16px;background:#eaf0f3;border-radius:9px;padding:5px}.mobile-view-toggle button{flex:1;border:0;background:transparent}.mobile-view-toggle .active{background:#fff;font-weight:700;color:#137c6e}
 .programme-list-mode .programme-list{display:grid;gap:15px}.programme-list-mode .programme-gantt{display:none}.programme-list section{border:1px solid #dce5e9;background:#fff;border-radius:10px;padding:15px}.programme-list h3{font-size:15px;margin:0 0 12px;color:#344953}.mobile-task{border-top:1px solid #e5ecef;padding:14px 0}.mobile-task:first-of-type{border-top:0}.mobile-task strong{display:block;font-size:14px;margin:8px 0;line-height:1.5}.mobile-task small{display:block;color:#6b818c;font-size:12px;line-height:1.6}.mobile-task .task-dates{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0;font-size:12px}.mobile-task .task-actions{display:flex;gap:10px}.mobile-task .task-actions button{flex:1;font-size:12px}
 .programme-gantt .gantt-label{width:190px;flex:0 0 190px;flex-wrap:wrap;white-space:normal;gap:4px;padding:8px}.programme-gantt .gantt-head,.programme-gantt .gantt-row{grid-template-columns:190px 1fr}.programme-gantt .gantt-row,.programme-gantt .gantt-activity .gantt-track{min-height:100px;height:auto}.programme-gantt .gantt-label .name{white-space:normal;flex-basis:100%;line-height:1.5}.programme-gantt .gantt-label small{margin-right:auto}.programme-gantt .gantt-activity .gantt-track{height:100px}.programme-gantt .gantt-inner{min-width:900px;padding-right:120px}.resource-timeline .gantt-label{position:static!important}.resource-timeline .gantt-inner{min-width:950px}
 dialog,#editor:has(.dependency-editor),.schedule-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 20px);margin:auto;border-radius:12px}.modal-head{padding:16px}.modal-head h2{font-size:18px}.modal-content{padding:16px}.modal-foot{padding:12px 16px calc(12px + env(safe-area-inset-bottom));gap:8px;flex-wrap:wrap}.modal-foot button{flex:1;min-width:100px}.form-grid{grid-template-columns:minmax(0,1fr)}.form-grid .wide{grid-column:auto}.dependency-row{grid-template-columns:minmax(0,1fr) 80px}.dependency-row label:first-child{grid-column:1/-1}.invoice-line,.invoice-receipt{grid-template-columns:minmax(0,1fr)}.report-section-options{grid-template-columns:minmax(0,1fr)}
 #toast{bottom:calc(85px + env(safe-area-inset-bottom));left:15px;right:15px;max-width:none;font-size:14px}.schedule-summary>div{min-width:0}.exchange-panel .actions{gap:8px}.exchange-panel .actions button{white-space:normal}.unallocated-work{flex-direction:column;align-items:flex-start;gap:10px}
}
@media(max-width:360px){.kpi .value,.kpi.dark .value{font-size:22px}.kpi{padding:15px 12px}.demo-banner span{font-size:10px}.app-status .connection{font-size:10px}}
@media print{.mobile-dock,.mobile-projects,.programme-list,.mobile-view-toggle,.app-status,.menu-shade{display:none!important}.portfolio-projects>.table-wrap,.programme-list-mode .programme-gantt{display:block!important}}

/* R8 mobile register and guidance refinement. */
@media(max-width:700px){
  .page-title-row{display:flex;align-items:center;gap:10px;min-width:0}
  .page-title-row h1{margin-bottom:0}
  .page-info{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 34px!important;min-width:34px!important;width:34px;height:34px;min-height:34px!important;padding:0!important;border:1px solid #c9d8df!important;border-radius:50%!important;background:#fff!important;color:#496675!important;font-family:Georgia,serif!important;font-size:17px!important;font-weight:700!important;line-height:1!important}
  .page-info:hover{background:#f2f7f9!important}
  .programme-help{padding-top:14px}
  .programme-help p{margin:0;padding:12px 0;border-bottom:1px solid #edf1f3;color:#526975;font-size:14px;line-height:1.55}
  .programme-help p:last-child{border-bottom:0}

  body[data-page="delivery"] .panel>.toolbar{padding:12px;gap:10px;align-items:stretch}
  body[data-page="delivery"] .panel>.toolbar .segmented{display:flex;flex-wrap:nowrap!important;width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  body[data-page="delivery"] .panel>.toolbar .segmented::-webkit-scrollbar{display:none}
  body[data-page="delivery"] .panel>.toolbar .segmented button{flex:0 0 auto;white-space:nowrap;min-height:40px}
  body[data-page="delivery"] .panel>.toolbar #search{flex:1 0 100%;width:100%;min-width:0}
  body[data-page="delivery"] .table-wrap{display:block;max-width:100%;max-height:none;overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;touch-action:pan-x pan-y}
  body[data-page="delivery"] .table-wrap table{display:table;width:max-content;min-width:900px;table-layout:auto}
  body[data-page="delivery"] .table-wrap thead{display:table-header-group;position:static;width:auto;height:auto;overflow:visible;clip-path:none}
  body[data-page="delivery"] .table-wrap tbody{display:table-row-group;width:auto}
  body[data-page="delivery"] .table-wrap tr{display:table-row;border:0;margin:0;padding:0;background:transparent}
  body[data-page="delivery"] .table-wrap th,
  body[data-page="delivery"] .table-wrap td{display:table-cell;padding:13px 14px;border-bottom:1px solid #eef1f3;vertical-align:middle;text-align:left!important;white-space:nowrap;overflow-wrap:normal}
  body[data-page="delivery"] .table-wrap th{position:sticky;top:0;z-index:2;background:#f5f7f8}
  body[data-page="delivery"] .table-wrap th.date,
  body[data-page="delivery"] .table-wrap td.date{text-align:center!important}
  body[data-page="delivery"] .table-wrap th.numeric,
  body[data-page="delivery"] .table-wrap td.numeric{text-align:right!important}
  body[data-page="delivery"] .table-wrap td.title{min-width:145px;max-width:240px;white-space:normal;line-height:1.45}
  body[data-page="delivery"] .table-wrap td:last-child,
  body[data-page="delivery"] .table-wrap th:last-child{text-align:center!important;min-width:54px}
  body[data-page="delivery"] .table-wrap td:before{content:none!important}
}
