/* Kolsom Phase 8 Mobile · R8.8 */
.p8-bottom-nav,.p8-mobile-actions,.p8-mobile-only,.p8-mobile-indicator{display:none}
.p8-sync-pill{display:inline-flex;align-items:center;gap:5px;font-size:10px;font-weight:800;border-radius:999px;padding:4px 7px;background:#edf2f7;color:#4a5568}
.p8-sync-pill.offline{background:#fff1d6;color:#946000}.p8-sync-pill.pending{background:#e9f1fb;color:#1768ad}.p8-sync-pill.synced{background:#e7f5ef;color:#16845b}
.p8-check-dot{width:6px;height:6px;border-radius:50%;background:currentColor}
@media (max-width:1200px){
 body{padding-bottom:calc(78px + env(safe-area-inset-bottom))}
 .main{padding:14px 12px calc(150px + env(safe-area-inset-bottom))!important}
 .topbar{padding:13px 14px;border-radius:12px}.title h2{font-size:21px}.title p{font-size:11px}
 .right-top{width:100%}.right-top .rolebox{flex:1}
 button,.btn{min-height:44px}.sheet-toolbar select,.sheet-toolbar input,.field input,.field select{min-height:46px}
 textarea{min-height:88px}
 .p8-mobile-only{display:block}
 .p8-bottom-nav{display:grid;position:fixed;left:0;right:0;bottom:0;z-index:145;grid-template-columns:repeat(6,minmax(0,1fr));gap:2px;padding:6px 7px calc(6px + env(safe-area-inset-bottom));background:rgba(255,255,255,.98);border-top:1px solid #dbe4ed;box-shadow:0 -8px 28px rgba(8,43,82,.12);backdrop-filter:blur(12px)}
 .p8-bottom-nav button{border:0;background:transparent;color:#65758a;min-width:0;padding:5px 2px;border-radius:10px;display:grid;justify-items:center;gap:3px;font-size:9px;font-weight:800}
 .p8-bottom-nav button.active{background:#fff1df;color:#b65308}.p8-bottom-nav button svg{width:19px;height:19px}.p8-bottom-nav button span{line-height:1;display:flex}
 .p8-mobile-actions{display:flex;position:fixed;left:10px;right:10px;bottom:calc(71px + env(safe-area-inset-bottom));z-index:140;gap:7px;padding:8px;background:rgba(255,255,255,.96);border:1px solid #dbe4ed;border-radius:13px;box-shadow:0 8px 30px rgba(8,43,82,.16);backdrop-filter:blur(10px);align-items:center}
 .p8-mobile-actions .btn{flex:1;min-width:0}.p8-mobile-actions .p8-sync-pill{flex:0 0 auto}
 body.p8-keyboard-open .p8-bottom-nav{display:none}
 body.p8-keyboard-open .p8-mobile-actions{bottom:8px}
 .modal{padding:7px;align-items:flex-start}.modal-box{max-height:calc(100svh - 14px);width:100%;border-radius:12px;padding:13px}
 .modal-actions{position:sticky;bottom:-13px;background:#fff;padding:10px 0 calc(10px + env(safe-area-inset-bottom));z-index:12;border-top:1px solid #e3eaf1}
 .modal-actions .btn{flex:1}
 .p8-diary-mobile .daily-summary-grid{grid-template-columns:1fr!important;gap:9px}
 .p8-diary-mobile .daily-summary-grid label{font-size:12px}.p8-diary-mobile .daily-summary-grid input,.p8-diary-mobile .daily-summary-grid select,.p8-diary-mobile .daily-summary-grid textarea{width:100%;min-height:48px;font-size:16px}
 .p8-diary-mobile .summary-meta{font-size:10px}
 .p8-collapsed>*:not(.section-title){display:none!important}
 .p8-collapse-toggle{min-height:36px!important;padding:6px 9px!important}
 .p8-quick-manpower{border:1px solid #f0cba8;background:#fff8f1;border-radius:12px;padding:12px;margin:12px 0}
 .p8-quick-manpower .section-title{margin-bottom:5px}
 .p8-mobile-card-table{min-width:0!important;border-collapse:separate;border-spacing:0}
 .p8-mobile-card-table thead{display:none}
 .p8-mobile-card-table tbody,.p8-mobile-card-table tr,.p8-mobile-card-table td{display:block;width:100%!important;min-width:0!important;max-width:none!important}
 .p8-mobile-card-table tr{background:#fff;border:1px solid #dce6ef;border-radius:12px;padding:8px 11px;margin:0 0 10px;box-shadow:0 5px 15px rgba(8,43,82,.05)}
 .p8-mobile-card-table td{border-bottom:1px solid #edf1f5;padding:8px 0;display:flex;justify-content:space-between;gap:12px;text-align:right}
 .p8-mobile-card-table td:last-child{border-bottom:0}.p8-mobile-card-table td:before{content:attr(data-p8-label);font-size:9px;font-weight:900;color:#718096;text-transform:uppercase;letter-spacing:.04em;text-align:left;flex:0 0 36%}
 .p8-mobile-card-table td>*{max-width:62%}
 .p8-mobile-card-table td .btn{min-height:38px}
 .p8-mobile-horizontal{overflow-x:auto;-webkit-overflow-scrolling:touch}
 .p8-mobile-horizontal table{min-width:max-content}
 .p8-offline-banner{padding:8px 10px;border-radius:9px;background:#fff1d6;color:#805500;font-size:11px;font-weight:700;margin-bottom:10px}
 .mobile-start{display:none!important}
}
@media (min-width:1201px){.p8-bottom-nav,.p8-mobile-actions,.p8-mobile-indicator{display:none!important}}

.p8-mobile-indicator{position:fixed;right:10px;top:10px;z-index:146;background:#082b52;color:#fff;border-radius:999px;padding:5px 8px;font-size:9px;box-shadow:0 4px 14px rgba(0,0,0,.18);gap:5px;align-items:center}.p8-mobile-indicator span{opacity:.72}@media (max-width:1200px){.p8-mobile-indicator{display:flex}}


/* R8.2 mobile scope and visual system. All selectors remain mobile-only. */
@media (max-width:1200px){
 html,body{background:#e9eff4!important;color:#172534!important}
 body{padding-bottom:calc(84px + env(safe-area-inset-bottom))!important}
 .app{display:block!important;background:#e9eff4!important}
 .sidebar{display:none!important}
 .main{background:#e9eff4!important;padding:12px 10px calc(148px + env(safe-area-inset-bottom))!important;min-height:100vh}
 #content,#projectTabContent{background:transparent!important}
 .topbar{background:linear-gradient(145deg,#0b2a43,#143f5e)!important;border:0!important;box-shadow:0 8px 28px rgba(11,42,67,.18)!important;color:#f7fbff!important;border-radius:18px!important;padding:15px!important}
 .topbar .title h2,.topbar .title p,.topbar label,.topbar b,.topbar span{color:#f7fbff!important}
 .topbar .title p{color:#c7d8e6!important}
 .topbar .right-top{gap:8px!important}
 .topbar .rolebox,.topbar .cloud-pill,.topbar .save-state{background:rgba(255,255,255,.10)!important;border-color:rgba(255,255,255,.16)!important;color:#f7fbff!important}
 .topbar select{background:#f2f6f9!important;color:#172534!important;border-color:#cdd9e2!important}
 .card,.site-log-section,.wo-card,.planning-plan-card,.request-card,.notice,.control-strip,.day-status-banner,.photo-card,.modal-box,.sheet,.table-wrap{background:#f8fafc!important;border-color:#d4dfe7!important;color:#172534!important;box-shadow:0 5px 18px rgba(28,51,70,.055)}
 .notice{background:#f1f5f8!important}
 .control-strip,.day-status-banner{background:#edf3f7!important}
 .section-title h3,.card h3,.card b,.site-log-section b{color:#172534}
 .section-title span,small,.muted,.kpi-sub{color:#617385!important}
 .kpi-value{color:#0b2a43!important}
 table{background:#f8fafc!important}
 th{background:#e7eef3!important;color:#2a4255!important;border-color:#cfdae2!important}
 td{background:#f8fafc!important;color:#172534!important;border-color:#dde5eb!important}
 tr:nth-child(even) td{background:#f3f7fa!important}
 input,select,textarea,.sheet-select{background:#fbfcfd!important;color:#172534!important;border-color:#c6d3dd!important;border-radius:10px!important}
 input:focus,select:focus,textarea:focus{border-color:#34749d!important;box-shadow:0 0 0 3px rgba(52,116,157,.12)!important;outline:0}
 button,.btn{border-radius:10px!important}
 .btn.primary{background:#d96b22!important;border-color:#d96b22!important;color:#fff!important}
 .btn.danger{background:#fff0f0!important;color:#a93636!important;border-color:#e6bbbb!important}
 .tabs,.programme-subtabs,.sheet-tabs{background:#e4edf3!important;border-radius:12px!important;padding:4px!important;gap:4px!important;overflow-x:auto}
 .tabs button,.programme-subtabs button,.sheet-tabs button{background:transparent!important;color:#4e6273!important;border:0!important;min-height:40px!important;white-space:nowrap}
 .tabs button.active,.programme-subtabs button.active,.sheet-tabs button.active{background:#f8fafc!important;color:#0b2a43!important;box-shadow:0 2px 8px rgba(11,42,67,.12)!important}
 .p8-bottom-nav{background:#0b2a43!important;border-top:0!important;box-shadow:0 -8px 28px rgba(11,42,67,.22)!important;padding:7px 7px calc(7px + env(safe-area-inset-bottom))!important}
 .p8-bottom-nav button{background:transparent!important;color:#aebfcd!important;border-radius:12px!important;min-height:54px!important}
 .p8-bottom-nav button.active{background:rgba(255,255,255,.11)!important;color:#fff!important}
 .p8-bottom-nav button.active small{color:#fff!important}
 .p8-bottom-nav small{color:#aebfcd!important;font-size:10px!important}
 .p8-mobile-actions{background:#eef3f6!important;border:1px solid #d2dde5!important;box-shadow:0 6px 22px rgba(24,50,68,.12)!important;border-radius:14px!important}
 .p8-mobile-indicator{display:none!important}
 .p8-sync-pill{background:#dde8ee!important;color:#385368!important}
 .p8-sync-pill.offline{background:#f5e8ca!important;color:#7a5a13!important}
 .p8-sync-pill.pending{background:#dce9f4!important;color:#245d84!important}
 .p8-sync-pill.synced{background:#dceee7!important;color:#236a50!important}
 .p8-more-sheet{display:none;position:fixed;inset:0;z-index:220}
 .p8-more-sheet.open{display:block}
 .p8-more-backdrop{position:absolute;inset:0;border:0!important;border-radius:0!important;background:rgba(8,25,39,.48)!important}
 .p8-more-panel{position:absolute;left:10px;right:10px;bottom:calc(80px + env(safe-area-inset-bottom));background:#f3f7fa;border:1px solid #d1dde5;border-radius:18px;padding:14px;box-shadow:0 18px 50px rgba(8,25,39,.30)}
 .p8-more-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
 .p8-more-head>div{display:grid;gap:2px}.p8-more-head b{font-size:18px;color:#0b2a43}.p8-more-head small{font-size:11px;color:#617385!important}
 .p8-more-links{display:grid;gap:8px}
 .p8-more-links>button{display:grid;text-align:left;gap:3px;padding:13px;background:#f8fafc!important;border:1px solid #d6e0e7!important;color:#172534!important}
 .p8-more-links>button b{font-size:14px}.p8-more-links>button span{font-size:11px;color:#617385}
 .p8-more-sync{margin-top:10px;padding-top:10px;border-top:1px solid #d6e0e7}
 .p8-planning-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-bottom:10px}
 .p8-planning-summary>div{background:#edf3f7;border:1px solid #d2dee6;border-radius:12px;padding:10px;display:grid;gap:4px}
 .p8-planning-summary span{font-size:10px;color:#627586}.p8-planning-summary b{font-size:17px;color:#0b2a43}
 .p8-daily-report-inbox{margin-top:14px!important;border-left:4px solid #d96b22!important}
 .p8-report-count{font-size:11px;font-weight:800;color:#7a4a24!important;background:#f6e6d7;padding:5px 8px;border-radius:999px}
 .p8-report-list{display:grid;gap:8px;margin-top:10px}
 .p8-report-row{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f1f5f8;border:1px solid #d8e2e8;border-radius:12px;padding:11px}
 .p8-report-row>div:first-child{display:grid;gap:3px;min-width:0}.p8-report-row>div:first-child b{font-size:13px;color:#172534}.p8-report-row>div:first-child span{font-size:10px;color:#617385}
 .p8-report-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
 .p8-report-actions .btn{min-height:36px!important;padding:7px 9px!important;font-size:10px!important}
 .modal{background:rgba(7,25,39,.55)!important}.modal-box{background:#f5f8fa!important}
 .modal-head{background:#edf3f7!important;border-color:#d4dfe7!important}
 .photo-card img{background:#dfe7ed!important}
 .p8-offline-banner{background:#f5e8ca!important;color:#72510f!important;border-color:#e4cb8a!important}
 .horizontal-sheet{background:#f8fafc!important}
 .p8-bottom-nav button{padding-left:1px!important;padding-right:1px!important}
 .p8-bottom-nav button svg{width:18px!important;height:18px!important}
 .p8-bottom-nav small{font-size:9px!important;line-height:1.05!important;max-width:100%;overflow:hidden;text-overflow:ellipsis}
 .p8-project-mobile-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:0 0 10px;padding:4px;background:#dfe9ef;border:1px solid #cfdae2;border-radius:14px}
 .p8-project-mobile-tabs button{min-height:42px!important;background:transparent!important;border:0!important;color:#516777!important;font-weight:800}
 .p8-project-mobile-tabs button.active{background:#f8fafc!important;color:#0b2a43!important;box-shadow:0 2px 8px rgba(11,42,67,.10)}
 .p8-plan-section{background:#f4f7f9;border:1px solid #d3dfe6;border-radius:16px;padding:12px;margin:10px 0}
 .p8-plan-list{display:grid;gap:8px}
 .p8-plan-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#eaf0f4;border:1px solid #d4dfe6;border-radius:12px;padding:11px}
 .p8-plan-main{display:grid;gap:4px;min-width:0}
 .p8-plan-main b{font-size:13px;line-height:1.3;color:#172534;overflow-wrap:anywhere}
 .p8-plan-main span{font-size:10px;color:#657888}
 .p8-plan-status{flex:0 0 auto}
 .p8-plan-status .badge{white-space:nowrap}
 #content>.card,#content>.sheet,#projectTabContent>.card,#projectTabContent>.sheet{background:#f4f7f9!important}
 #content .roadmap-panel,#content .dashboard-panel,#content .panel,#content .sheet-body,#projectTabContent .roadmap-panel,#projectTabContent .panel,#projectTabContent .sheet-body{background:#f4f7f9!important;color:#172534!important}
 #content .table-wrap,#projectTabContent .table-wrap{background:#eef3f6!important}
 #content [style*="background:#fff"],#projectTabContent [style*="background:#fff"],#content [style*="background: #fff"],#projectTabContent [style*="background: #fff"]{background:#f4f7f9!important}
}


/* R8.4 focused installed-app mobile UX */
@media (max-width:1200px){
 body{padding-bottom:20px!important}
 .main{padding:9px 9px calc(150px + env(safe-area-inset-bottom))!important}
 .portal-utility-bar{display:none!important}

 .p8-search-host{display:block;margin:0 0 8px;position:relative;z-index:170}
 .p8-search-host .portal-search-shell{width:100%!important;min-width:0!important;max-width:none!important}
 .p8-search-host .portal-search-box{min-height:46px;border-radius:14px!important;padding:9px 12px!important;background:#f8fafc!important;border-color:#ccd8e1!important;box-shadow:0 4px 14px rgba(17,43,64,.08)!important}
 .p8-search-host .portal-search-box input{font-size:16px!important;color:#172534!important;min-height:28px!important}
 .p8-search-host .portal-search-box kbd{display:none!important}
 .p8-search-host .portal-search-panel{left:0!important;right:0!important;width:100%!important;max-height:62vh!important;border-radius:14px!important}

 .topbar.p8-mobile-topbar{display:flex!important;flex-direction:column!important;gap:9px!important;margin-bottom:8px!important;padding:11px 12px!important;border-radius:14px!important;background:linear-gradient(145deg,#0b2a43,#123b58)!important}
 .topbar.p8-mobile-topbar .title{width:100%}
 .topbar.p8-mobile-topbar .title h2{font-size:18px!important;line-height:1.15!important;margin:0!important}
 .topbar.p8-mobile-topbar .title p{font-size:10px!important;line-height:1.3!important;margin:3px 0 0!important;color:#c5d5e1!important}
 .topbar.p8-mobile-topbar .right-top,.topbar.p8-mobile-topbar .actions,.topbar.p8-mobile-topbar .tabs{display:none!important}
 .p8-header-controls{display:flex;align-items:flex-end;gap:8px;justify-content:space-between;width:100%}
 .p8-project-picker{display:grid;gap:3px;flex:1;min-width:0}
 .p8-project-picker>span{font-size:9px!important;font-weight:800;color:#b9cddd!important;text-transform:uppercase;letter-spacing:.04em}
 .p8-project-picker select{width:100%;min-height:38px!important;border-radius:9px!important;background:#f5f8fa!important;color:#172534!important;border:0!important;padding:6px 9px!important;font-size:12px!important}
 .p8-header-controls .p8-sync-pill{flex:0 0 auto;min-height:29px;padding:6px 8px!important;background:rgba(255,255,255,.12)!important;color:#e9f5fb!important}
 .p8-header-controls .p8-sync-pill.offline{background:#74561a!important;color:#fff5d6!important}
 .p8-header-controls .p8-sync-pill.pending{background:#214f70!important;color:#e7f4ff!important}
 .p8-header-controls .p8-sync-pill.synced{background:#1c5d4c!important;color:#e8fff7!important}

 .p8-module-tabs{display:grid;position:fixed;left:0;right:0;bottom:0;z-index:145;grid-template-columns:repeat(6,minmax(0,1fr));gap:2px;margin:0;padding:7px 7px calc(7px + env(safe-area-inset-bottom));background:#0b2a43;border-top:0;box-shadow:0 -8px 28px rgba(11,42,67,.22)}
 .p8-module-tabs button{display:grid;justify-items:center;align-content:center;gap:3px;min-height:54px;padding:5px 2px;border:0;border-radius:12px;background:transparent;color:#aebfcd;font-size:9px;font-weight:800;min-width:0}
 .p8-module-tabs button span{display:flex;line-height:1}
 .p8-module-tabs button svg{width:18px;height:18px}
 .p8-module-tabs button small{font-size:8px!important;line-height:1.05!important;color:inherit!important;white-space:normal;overflow:hidden;text-overflow:ellipsis;max-width:100%;max-height:18px;text-align:center}
 .p8-module-tabs button.active{background:rgba(255,255,255,.11);color:#fff;box-shadow:none}
 .p8-bottom-nav{display:none!important}

 .p8-mobile-actions{left:9px!important;right:9px!important;bottom:calc(78px + env(safe-area-inset-bottom))!important;padding:7px!important;border-radius:13px!important;background:rgba(239,244,247,.97)!important}
 .p8-mobile-actions .btn{min-height:42px!important}
 body.p8-keyboard-open .p8-mobile-actions{display:none!important}
 body.p8-keyboard-open .p8-module-tabs{display:none!important}

 .p8-local-tabs,.p8-project-section-tabs,.p8-document-tabs{display:grid!important;grid-auto-flow:column;grid-auto-columns:minmax(105px,1fr);gap:5px!important;overflow-x:auto!important;scrollbar-width:none;margin:0 0 9px!important;padding:4px!important;background:#dfe8ee!important;border:1px solid #cdd9e1!important;border-radius:12px!important;border-bottom:0!important}
 .p8-local-tabs::-webkit-scrollbar,.p8-project-section-tabs::-webkit-scrollbar,.p8-document-tabs::-webkit-scrollbar{display:none}
 .p8-local-tabs button,.p8-project-section-tabs button,.p8-document-tabs button{min-height:40px!important;padding:8px 10px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:#536778!important;font-size:11px!important;font-weight:800!important;white-space:nowrap!important}
 .p8-local-tabs button.active,.p8-project-section-tabs button.active,.p8-document-tabs button.active{background:#f8fafc!important;color:#0b2a43!important;box-shadow:0 2px 8px rgba(11,42,67,.10)!important}

 #content>.tabs{margin-bottom:9px!important}
 #projectTabContent>.programme-subtabs:not(.p8-document-tabs){display:none!important}
 .p8-project-mobile-tabs{display:none!important}

 .p8-milestone-section,.p8-detailed-section{background:#f4f7f9;border:1px solid #d2dee6;border-radius:14px;padding:10px;margin-top:9px}
 .p8-milestone-list,.p8-activity-list{display:grid;gap:8px}
 .p8-milestone-card,.p8-activity-card{background:#eef3f6;border:1px solid #d1dce4;border-radius:12px;padding:10px;box-shadow:none}
 .p8-milestone-head,.p8-activity-head,.p8-programme-group-head{display:flex;justify-content:space-between;align-items:flex-start;gap:9px}
 .p8-milestone-head>div,.p8-programme-group-head>div{display:grid;gap:2px;min-width:0}
 .p8-milestone-head b,.p8-programme-group-head b{font-size:12px;color:#172534;line-height:1.3}
 .p8-milestone-head span,.p8-programme-group-head span{font-size:9px;color:#647887}
 .p8-mobile-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}
 .p8-mobile-field-grid label,.p8-activity-card>label{display:grid;gap:4px;font-size:9px;font-weight:800;color:#667988;text-transform:uppercase;letter-spacing:.025em}
 .p8-mobile-field-grid label>span{min-height:40px;display:flex;align-items:center;padding:8px;background:#f8fafc;border:1px solid #cedae2;border-radius:9px;color:#243746;font-size:11px;font-weight:700;text-transform:none}
 .p8-mobile-field-grid input,.p8-mobile-field-grid select,.p8-activity-card>label input,.p8-activity-card>label select{width:100%!important;min-width:0!important;min-height:42px!important;font-size:14px!important;text-transform:none}
 .p8-card-actions,.p8-activity-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}
 .p8-card-actions .btn,.p8-activity-foot .btn,.p8-programme-group-head .btn{min-height:36px!important;padding:7px 9px!important;font-size:10px!important}
 .p8-activity-foot span{font-size:9px;color:#657887;font-weight:700}
 .p8-programme-group{margin-top:9px;border-top:1px solid #d5e0e7;padding-top:9px}
 .p8-programme-group:first-child{border-top:0;padding-top:0}
 .p8-programme-group-head{margin-bottom:7px}
 .p8-detail-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:9px 0}
 .p8-detail-summary>div{display:flex;align-items:center;justify-content:space-between;gap:4px;padding:7px 8px;background:#e7eef3;border:1px solid #d2dde5;border-radius:10px}
 .p8-detail-summary span{font-size:8px;color:#647786;text-transform:uppercase;font-weight:800}
 .p8-detail-summary b{font-size:12px;color:#0b2a43}
 .p8-date-warning{color:#a75a0e!important;font-size:9px!important;margin-top:2px}

 .p8-editable-card-table{display:block!important;width:100%!important;min-width:0!important;border-collapse:separate!important}
 .p8-editable-card-table thead{display:none!important}
 .p8-editable-card-table tbody{display:grid!important;gap:8px!important;width:100%!important}
 .p8-editable-card-table tr{display:block!important;width:100%!important;background:#eef3f6!important;border:1px solid #d1dce4!important;border-radius:12px!important;padding:7px 9px!important;margin:0!important}
 .p8-editable-card-table td{display:grid!important;grid-template-columns:100px minmax(0,1fr)!important;align-items:center!important;gap:8px!important;width:100%!important;min-width:0!important;max-width:none!important;padding:7px 0!important;border-bottom:1px solid #dce5eb!important;background:transparent!important;text-align:left!important}
 .p8-editable-card-table td:last-child{border-bottom:0!important}
 .p8-editable-card-table td:before{content:attr(data-p8-label);font-size:8px;font-weight:900;color:#6e8190;text-transform:uppercase;letter-spacing:.03em;overflow-wrap:anywhere}
 .p8-editable-card-table td input,.p8-editable-card-table td select,.p8-editable-card-table td textarea{width:100%!important;max-width:none!important;min-width:0!important;min-height:40px!important;font-size:14px!important}
 .p8-editable-card-table td textarea{min-height:64px!important}
 .p8-editable-card-table td .btn{width:auto;max-width:100%;min-height:36px!important;padding:7px 9px!important;font-size:10px!important}
 .p8-editable-card-table td b{font-size:11px}

 #content .sheet-toolbar{gap:7px!important;padding:7px!important;background:#edf3f6!important;border-radius:10px!important;margin-bottom:8px!important}
 #content .sheet-toolbar label{font-size:9px!important}
 #content .date-with-day{flex:1;min-width:150px}
 #content .date-with-day input{width:100%!important;min-width:0!important}
 .p8-file-choice-note{display:block;margin-top:5px;color:#607485!important;font-size:10px!important;line-height:1.3}

 #subcontractorContent .wo-card{border-radius:12px!important;background:#eef3f6!important;border-color:#d0dce4!important}
 #subcontractorContent .wo-head{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
 #subcontractorContent .wo-head>div:last-child{text-align:left!important}
 #subcontractorContent .wo-head .btn{margin-top:5px}

 .p8-more-panel{bottom:10px!important}
 .p8-more-links>button{min-height:58px!important}
}


/* R8.7 mobile information architecture and table layouts */
@media (max-width:1200px){
 .p8-planning-subtabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:0 0 10px;padding:4px;background:#dfe8ee;border:1px solid #cdd9e2;border-radius:12px}
 .p8-planning-subtabs button{min-height:42px;border:0;background:transparent;color:#50687a;font-weight:800;border-radius:9px;padding:8px 10px}
 .p8-planning-subtabs button.active{background:#fff;color:#0b2a43;box-shadow:0 2px 7px rgba(11,42,67,.08)}
 .p8-programme-table-wrap,.p8-native-table-wrap{width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch;border:1px solid #d1dce4;border-radius:12px;background:#f8fafc}
 .p8-programme-table{display:table!important;width:max-content!important;min-width:1040px!important;border-collapse:collapse!important}
 .p8-programme-table thead{display:table-header-group!important}
 .p8-programme-table tbody{display:table-row-group!important}
 .p8-programme-table tr{display:table-row!important}
 .p8-programme-table th,.p8-programme-table td{display:table-cell!important;width:auto!important;min-width:110px!important;max-width:none!important;padding:7px 8px!important;vertical-align:middle!important;text-align:left!important;border-bottom:1px solid #dce5eb!important;white-space:nowrap}
 .p8-programme-table th{position:sticky;top:0;z-index:2;background:#e7eef3!important;font-size:9px!important;text-transform:uppercase;letter-spacing:.03em}
 .p8-programme-table td:before{display:none!important;content:none!important}
 .p8-programme-table td:nth-child(2){min-width:230px!important}
 .p8-programme-table td:nth-child(6){min-width:170px!important}
 .p8-programme-table input,.p8-programme-table select{min-height:36px!important;height:36px!important;font-size:12px!important;padding:6px 7px!important;margin:0!important;max-width:none!important}
 .p8-programme-table .p8-program-code{width:92px!important}
 .p8-programme-table .p8-program-title{width:220px!important}
 .p8-programme-table .p8-program-progress{width:78px!important}
 .p8-programme-milestone-row td{background:#edf3f7!important;padding:7px 9px!important}
 .p8-programme-milestone-row td>div{display:flex;align-items:center;justify-content:space-between;gap:10px}
 .p8-programme-milestone-row span{display:flex;flex-direction:column;gap:2px}
 .p8-programme-milestone-row small{font-size:9px!important}
 .p8-programme-empty{text-align:center!important;color:#617385!important}
 .p8-drawing-summary{display:flex!important;grid-template-columns:none!important;gap:6px!important;overflow-x:auto;padding-bottom:2px}
 .p8-drawing-summary>.card{flex:1 0 108px!important;min-height:0!important;padding:9px 10px!important;border-top-width:3px!important;border-radius:11px!important}
 .p8-drawing-summary .kpi-label{font-size:8px!important;line-height:1.2!important}
 .p8-drawing-summary .kpi-value{font-size:22px!important;line-height:1!important;margin-top:4px!important}
 .p8-drawing-summary .kpi-sub{font-size:8px!important;line-height:1.25!important;margin-top:4px!important}
 .p8-native-mobile-table{display:table!important;width:max-content!important;min-width:760px!important;border-collapse:collapse!important}
 .p8-native-mobile-table thead{display:table-header-group!important}
 .p8-native-mobile-table tbody{display:table-row-group!important}
 .p8-native-mobile-table tr{display:table-row!important}
 .p8-native-mobile-table th,.p8-native-mobile-table td{display:table-cell!important;width:auto!important;min-width:92px!important;max-width:none!important;padding:7px 8px!important;vertical-align:middle!important;text-align:left!important;white-space:nowrap}
 .p8-native-mobile-table td:before{display:none!important;content:none!important}
 .p8-drawings-table{min-width:980px!important}
 .p8-resource-table-mode .sheet{overflow-x:auto!important;-webkit-overflow-scrolling:touch;border-radius:10px}
 .p8-resource-table{min-width:1120px!important}
 .p8-resource-table input,.p8-resource-table select{min-height:34px!important;height:34px!important;font-size:11px!important;padding:5px 6px!important}
 .p8-resource-table .btn{min-height:34px!important;padding:6px 8px!important;font-size:9px!important}
}


/* R8.10 stable header project selector and six-button mobile navigation */
.p8-header-sync{display:flex;flex:0 0 auto}
.p8-project-picker select:focus{outline:2px solid rgba(217,107,34,.55)!important;outline-offset:1px}
@media(max-width:390px){
 .p8-module-tabs{padding-left:4px;padding-right:4px;gap:1px}
 .p8-module-tabs button{padding-left:1px;padding-right:1px}
 .p8-module-tabs button small{font-size:7.5px!important}
}


/* R10.4 retained mobile home, approval summary and table layouts */
@media (max-width:1200px){
 .p8-home-page{display:grid;gap:10px}
 .p8-home-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .p8-home-kpis button{display:grid;gap:4px;min-width:0;min-height:88px;padding:12px;border:1px solid #d4dfe7;border-radius:14px;background:#eef3f6;color:#172534;text-align:left;box-shadow:none}
 .p8-home-kpis button b{font-size:24px;line-height:1;color:#0b2a43}
 .p8-home-kpis button span{font-size:10px;font-weight:800;color:#5f7383}
 .p8-home-section{padding:12px!important;border-radius:14px!important}
 .p8-home-section .section-title{margin-bottom:9px!important}
 .p8-home-section .section-title h3{font-size:14px!important;color:#172534!important}
 .p8-home-section .section-title span{font-size:9px!important;color:#687c8c!important}
 .p8-home-quick{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .p8-home-quick button{display:grid;gap:3px;min-height:64px;padding:10px;border:1px solid #d1dde5;border-radius:12px;background:#f4f7f9;color:#172534;text-align:left}
 .p8-home-quick button:first-child{background:#0b2a43;border-color:#0b2a43;color:#fff}
 .p8-home-quick button:nth-child(2){border-color:#d8b397;background:#fbf3ed}
 .p8-home-quick button b{font-size:11px;line-height:1.2}
 .p8-home-quick button span{font-size:8.5px;line-height:1.25;color:#6b7d8b}
 .p8-home-quick button:first-child span{color:#c8d8e3}
 .p8-home-columns{display:grid;grid-template-columns:1fr;gap:10px}
 .p8-home-progress,.p8-home-approvals{display:grid}
 .p8-home-progress button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;align-items:center;padding:9px 0;border:0;border-bottom:1px solid #dce5eb;background:transparent;color:#172534;text-align:left}
 .p8-home-progress button:last-child{border-bottom:0}
 .p8-home-progress button>span{display:grid;gap:2px;min-width:0}
 .p8-home-progress button b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .p8-home-progress button small{font-size:8px!important;color:#758695!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .p8-home-progress button em{font-size:10px;font-style:normal;font-weight:900;color:#0b2a43}
 .p8-home-progress button i{grid-column:1/-1;height:6px;border-radius:6px;background:#dce5eb;overflow:hidden}
 .p8-home-progress button i u{display:block;height:100%;border-radius:6px;background:#35647e;text-decoration:none}
 .p8-home-approvals button{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 0;border:0;border-bottom:1px solid #dce5eb;background:transparent;color:#172534;text-align:left}
 .p8-home-approvals button:last-child{border-bottom:0}
 .p8-home-approvals button>span{display:grid;gap:2px;min-width:0}
 .p8-home-approvals button b{font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .p8-home-approvals button small{font-size:8px!important;color:#758695!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .p8-home-approvals button em{flex:0 0 auto;padding:5px 7px;border-radius:999px;font-size:8px;font-style:normal;font-weight:900;background:#e9eef2;color:#5d7180}
 .p8-home-approvals button em.good{background:#e5f0eb;color:#2f6652}
 .p8-home-approvals button em.pending{background:#f7eadf;color:#a45d25}
 .p8-home-approvals button em.review{background:#e7eef4;color:#315d78}
 .p8-home-approvals button em.bad{background:#f6e5e2;color:#a34b3e}

 .p8-approval-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:0 0 10px}
 .p8-approval-summary>div{display:grid;gap:4px;min-width:0;padding:10px 7px;border:1px solid #d4dfe7;border-radius:12px;background:#eef3f6;text-align:center}
 .p8-approval-summary b{font-size:19px;line-height:1;color:#172534}
 .p8-approval-summary span{font-size:7.5px;font-weight:900;line-height:1.15;color:#647887;white-space:nowrap}
 .p8-approval-summary .pending{background:#fbf1e8;border-color:#ead7c6}
 .p8-approval-summary .pending b{color:#a45d25}
 .p8-approval-summary .approved{background:#e9f2ed;border-color:#d5e6dc}
 .p8-approval-summary .approved b{color:#2f6652}
 .p8-approval-summary .review{background:#e9f0f5;border-color:#d6e2eb}
 .p8-approval-summary .review b{color:#315d78}
 .p8-approval-summary .rejected{background:#f7e9e6;border-color:#ecd7d2}
 .p8-approval-summary .rejected b{color:#a34b3e}

 .p8-resource-table-mode .p8-native-table-wrap,
 .p8-procurement-table-mode .p8-native-table-wrap,
 .p8-progress-table-mode .p8-native-table-wrap{width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch;border:1px solid #d1dce4;border-radius:12px;background:#f8fafc}
 .p8-resource-table-mode .p8-resource-table{min-width:1120px!important}
 .p8-procurement-table-mode .p8-procurement-table{min-width:980px!important}
 .p8-progress-table-mode .p8-progress-table{min-width:900px!important}
 .p8-resource-table-mode .p8-native-mobile-table,
 .p8-procurement-table-mode .p8-native-mobile-table,
 .p8-progress-table-mode .p8-native-mobile-table{display:table!important;width:max-content!important;border-collapse:separate!important;border-spacing:0!important}
 .p8-resource-table-mode .p8-native-mobile-table thead,
 .p8-procurement-table-mode .p8-native-mobile-table thead,
 .p8-progress-table-mode .p8-native-mobile-table thead{display:table-header-group!important}
 .p8-resource-table-mode .p8-native-mobile-table tbody,
 .p8-procurement-table-mode .p8-native-mobile-table tbody,
 .p8-progress-table-mode .p8-native-mobile-table tbody{display:table-row-group!important}
 .p8-resource-table-mode .p8-native-mobile-table tr,
 .p8-procurement-table-mode .p8-native-mobile-table tr,
 .p8-progress-table-mode .p8-native-mobile-table tr{display:table-row!important;background:#f8fafc!important;border:0!important;padding:0!important}
 .p8-resource-table-mode .p8-native-mobile-table th,
 .p8-resource-table-mode .p8-native-mobile-table td,
 .p8-procurement-table-mode .p8-native-mobile-table th,
 .p8-procurement-table-mode .p8-native-mobile-table td,
 .p8-progress-table-mode .p8-native-mobile-table th,
 .p8-progress-table-mode .p8-native-mobile-table td{display:table-cell!important;width:auto!important;max-width:none!important;padding:7px 8px!important;border-radius:0!important;border-bottom:1px solid #dce5eb!important;white-space:nowrap!important;vertical-align:middle!important;text-align:left!important}
 .p8-resource-table-mode .p8-native-mobile-table td:before,
 .p8-procurement-table-mode .p8-native-mobile-table td:before,
 .p8-progress-table-mode .p8-native-mobile-table td:before{display:none!important;content:none!important}
 .p8-resource-table-mode .p8-native-mobile-table th,
 .p8-procurement-table-mode .p8-native-mobile-table th,
 .p8-progress-table-mode .p8-native-mobile-table th{position:sticky;top:0;z-index:3;background:#e7eef3!important;color:#334b5c!important;font-size:8.5px!important;text-transform:uppercase;letter-spacing:.03em}
 .p8-resource-table-mode .p8-native-mobile-table th:first-child,
 .p8-procurement-table-mode .p8-native-mobile-table th:first-child,
 .p8-progress-table-mode .p8-native-mobile-table th:first-child{left:0;z-index:5}
 .p8-resource-table-mode .p8-native-mobile-table td:first-child,
 .p8-procurement-table-mode .p8-native-mobile-table td:first-child,
 .p8-progress-table-mode .p8-native-mobile-table td:first-child{position:sticky;left:0;z-index:2;background:#f8fafc!important;box-shadow:3px 0 6px rgba(11,42,67,.05)}
 .p8-resource-table-mode .p8-native-mobile-table input,
 .p8-resource-table-mode .p8-native-mobile-table select,
 .p8-resource-table-mode .p8-native-mobile-table textarea,
 .p8-procurement-table-mode .p8-native-mobile-table input,
 .p8-procurement-table-mode .p8-native-mobile-table select,
 .p8-procurement-table-mode .p8-native-mobile-table textarea,
 .p8-progress-table-mode .p8-native-mobile-table input,
 .p8-progress-table-mode .p8-native-mobile-table select,
 .p8-progress-table-mode .p8-native-mobile-table textarea{min-height:36px!important;height:auto!important;font-size:11px!important;padding:6px 7px!important}
}


/* R10.5 mobile navigation, procurement and subcontractor refinements */
@media (max-width:1200px){
 .p8-search-host{display:grid!important;grid-template-columns:46px minmax(0,1fr) 46px;align-items:center;gap:8px;margin:0 0 8px!important}
 .p8-search-host .portal-search-shell{grid-column:2;width:100%!important;min-width:0!important}
 .p8-search-home,.p8-search-user{width:46px;height:46px;min-height:46px!important;border:1px solid #cbd8e1;border-radius:13px!important;background:#f8fafc;color:#0b2a43;display:grid;place-items:center;padding:0!important;box-shadow:0 4px 12px rgba(11,42,67,.08)}
 .p8-search-home{grid-column:1}
 .p8-search-user{grid-column:3;font-size:12px;font-weight:900;letter-spacing:.03em}
 .p8-search-home.active{background:#0b2a43;color:#fff;border-color:#0b2a43}
 .p8-search-home svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 .p8-search-host .portal-search-box{min-height:46px!important}
 .p8-search-host .portal-search-box input{font-size:15px!important}

 .request-head{padding:10px!important}
 .request-head-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:7px!important;align-items:end!important}
 .request-head-grid>label{min-width:0}
 .request-head-grid>label input,.request-head-grid>label select{width:100%!important;min-width:0!important;min-height:42px!important;padding:8px 9px!important;font-size:13px!important}
 .request-head-grid .request-actions{grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px!important;align-items:stretch!important;margin-top:2px!important}
 .request-head-grid .request-actions .btn,.request-head-grid .request-actions .badge{width:100%!important;min-width:0!important;min-height:40px!important;margin:0!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;white-space:normal!important;line-height:1.15!important;padding:8px 9px!important;font-size:9.5px!important}
 .request-sheet>div[style*="padding:10px"]{padding:8px!important}
 .request-sheet>div[style*="padding:10px"] .btn{width:100%;min-height:40px!important}

 .p8-subcontractor-table-mode #subcontractorContent,
 .p8-subcontractor-table-mode #subcontractorContent .card,
 .p8-subcontractor-table-mode #subcontractorContent .sheet,
 .p8-subcontractor-table-mode #subcontractorContent .table-wrap,
 .p8-subcontractor-table-mode #subcontractorContent .p8-native-table-wrap{background:#f8fafc!important;color:#172534!important}
 .p8-subcontractor-table-mode #subcontractorContent table{display:table!important;width:max-content!important;min-width:980px!important;border-collapse:separate!important;border-spacing:0!important;background:#f8fafc!important}
 .p8-subcontractor-table-mode #subcontractorContent thead{display:table-header-group!important}
 .p8-subcontractor-table-mode #subcontractorContent tbody{display:table-row-group!important}
 .p8-subcontractor-table-mode #subcontractorContent tr{display:table-row!important;background:#f8fafc!important;color:#172534!important}
 .p8-subcontractor-table-mode #subcontractorContent th,
 .p8-subcontractor-table-mode #subcontractorContent td{display:table-cell!important;width:auto!important;max-width:none!important;padding:7px 8px!important;border-radius:0!important;white-space:nowrap!important;vertical-align:middle!important;text-align:left!important;background:#f8fafc!important;color:#172534!important;border-bottom:1px solid #dce5eb!important}
 .p8-subcontractor-table-mode #subcontractorContent tr:nth-child(even) td{background:#f3f7fa!important}
 .p8-subcontractor-table-mode #subcontractorContent tr.selected td{background:#e8f0f5!important;color:#172534!important}
 .p8-subcontractor-table-mode #subcontractorContent th{position:sticky;top:0;z-index:3;background:#e7eef3!important;color:#2a4255!important;font-size:8.5px!important;text-transform:uppercase}
 .p8-subcontractor-table-mode #subcontractorContent td:before{display:none!important;content:none!important}
 .p8-subcontractor-table-mode #subcontractorContent .section-title{margin-bottom:8px!important;gap:8px!important}
 .p8-subcontractor-table-mode #subcontractorContent .section-title h3{font-size:13px!important}
 .p8-subcontractor-table-mode #subcontractorContent .section-title .btn{min-height:38px!important;padding:7px 10px!important;font-size:9px!important}
 .p8-subcontractor-table-mode #subcontractorContent>.card{padding:10px!important}
 .p8-subcontractor-table-mode #subcontractorContent .wo-card{background:#f8fafc!important;color:#172534!important}
 .p8-subcontractor-table-mode #subcontractorContent .wo-head{background:#edf3f7!important;color:#172534!important}

 .wo-list-card,.wo-scope-card{padding:10px!important;margin-bottom:10px!important}
 .wo-list-head{align-items:center!important}
 .wo-filter-row{display:flex;align-items:flex-end;gap:8px;margin:0 0 8px}
 .wo-sub-filter{display:grid;gap:4px;width:100%;font-size:9px;font-weight:900;color:#657887;text-transform:uppercase}
 .wo-sub-filter select{width:100%;min-height:42px!important;font-size:13px!important}
 .wo-list-table{min-width:1180px!important}
 .wo-scope-table{min-width:960px!important}
 .wo-row-actions{display:flex;gap:5px;align-items:center;white-space:nowrap}
 .wo-row-actions .btn{min-height:34px!important;padding:6px 8px!important;font-size:8.5px!important}

 body.p8-modal-open .p8-mobile-actions,
 body.p8-modal-open .p8-module-tabs,
 body.p8-modal-open .p9-mobile-history{display:none!important}
 body.p8-modal-open{padding-bottom:0!important}
 body.p8-modal-open .modal{padding:6px!important;align-items:flex-start!important}
 body.p8-modal-open .modal-box{max-height:calc(100svh - 12px)!important;padding-bottom:8px!important}
 body.p8-modal-open .modal-actions{position:sticky!important;bottom:-8px!important;z-index:30!important;background:#f8fafc!important;border-top:1px solid #d4dfe7!important;padding:9px 0 calc(9px + env(safe-area-inset-bottom))!important;margin-top:12px!important}
 body.p8-modal-open .modal-actions .btn{min-height:44px!important}

 .p9-mobile-history{bottom:calc(132px + env(safe-area-inset-bottom))!important}
}


/* R10.6 mobile cleanup */
@media (max-width:1200px){
 .p8-search-host{
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr) 44px!important;
  grid-template-rows:48px!important;
  align-items:center!important;
  column-gap:8px!important;
  row-gap:0!important;
  width:100%!important
 }
 .p8-search-host .p8-search-home{grid-column:1!important;grid-row:1!important;order:0!important;width:44px!important;height:44px!important;min-height:44px!important}
 .p8-search-host .portal-search-shell{grid-column:2!important;grid-row:1!important;order:0!important;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important}
 .p8-search-host .p8-search-user{grid-column:3!important;grid-row:1!important;order:0!important;width:44px!important;height:44px!important;min-height:44px!important}
 .p8-search-host .portal-search-box{height:44px!important;min-height:44px!important;margin:0!important}
 .p8-search-host .portal-search-panel{top:calc(100% + 6px)!important}
 .p9-mobile-history,.p9-history-action{display:none!important}

 .p8-resource-table-mode .sheet-actions{display:none!important}
 .p8-resource-table-mode .p8-quick-manpower{display:none!important}

 .p8-subcontractor-table-mode .p8-sub-hide{display:none!important}
 .p8-subcontractor-table-mode .p8-sub-details-table{min-width:680px!important}
 .p8-subcontractor-table-mode .p8-sub-details-table th:nth-child(3),
 .p8-subcontractor-table-mode .p8-sub-details-table td:nth-child(3){min-width:220px!important}
 .p8-subcontractor-table-mode .p8-sub-details-table th:nth-child(4),
 .p8-subcontractor-table-mode .p8-sub-details-table td:nth-child(4){min-width:150px!important}
 .p8-subcontractor-table-mode #subcontractorContent table th:first-child,
 .p8-subcontractor-table-mode #subcontractorContent table td:first-child{
  position:static!important;
  left:auto!important;
  z-index:auto!important;
  box-shadow:none!important
 }
 .p8-subcontractor-table-mode .p8-sub-bottom-actions{
  display:flex!important;
  justify-content:flex-end!important;
  gap:8px!important;
  padding:9px 0 0!important;
  margin:0!important;
  background:transparent!important
 }
 .p8-subcontractor-table-mode .p8-sub-bottom-actions .btn{
  min-width:160px!important;
  min-height:42px!important;
  margin:0!important
 }
 .p8-subcontractor-table-mode .wo-list-head>.btn{display:none!important}
 .p8-subcontractor-table-mode .section-title>.btn:empty{display:none!important}
}


/* R10.7 mobile polish */
@media (max-width:1200px){
 .p8-search-host .p8-search-home{
  background:#d96b22!important;
  border-color:#d96b22!important;
  color:#fff!important
 }
 .p8-search-host .p8-search-home.active{
  background:#ef7b19!important;
  border-color:#ef7b19!important;
  color:#fff!important
 }
 .p8-search-host .p8-search-user{
  background:#0b2a43!important;
  border-color:#0b2a43!important;
  color:#fff!important
 }
 .p8-subcontractor-table-mode #subcontractorContent .p8-sub-hide{
  display:none!important
 }
 .p8-subcontractor-table-mode #subcontractorContent .p8-sub-details-table{
  min-width:620px!important
 }
}


/* R10.8 larger mobile module navigation */
@media (max-width:1200px){
 .p8-module-tabs{
  gap:3px!important;
  padding:8px 6px calc(8px + env(safe-area-inset-bottom))!important
 }
 .p8-module-tabs button{
  min-height:62px!important;
  gap:5px!important;
  padding:6px 2px!important;
  border-radius:13px!important;
  font-weight:900!important
 }
 .p8-module-tabs button span{
  min-height:25px!important;
  align-items:center!important;
  justify-content:center!important
 }
 .p8-module-tabs button svg{
  width:23px!important;
  height:23px!important;
  stroke-width:2!important
 }
 .p8-module-tabs button small{
  font-size:9.5px!important;
  line-height:1.08!important;
  max-height:22px!important;
  font-weight:900!important;
  letter-spacing:-.01em!important
 }
 .p8-module-tabs button.active{
  background:rgba(239,123,25,.16)!important;
  color:#ef7b19!important;
  box-shadow:inset 0 0 0 1px rgba(239,123,25,.25)!important
 }
 .p8-module-tabs button.active small{
  color:#ef7b19!important
 }
 .p8-mobile-actions{
  bottom:calc(88px + env(safe-area-inset-bottom))!important
 }
}


/* R10.13 mobile motion and navigation polish */
@media (max-width:1200px){
 :root{--p8-ease:cubic-bezier(.2,.8,.2,1)}
 .p8-module-tabs button{
  position:relative!important;
  touch-action:manipulation;
  transition:background-color .22s var(--p8-ease),color .22s var(--p8-ease),transform .16s var(--p8-ease),box-shadow .22s var(--p8-ease)!important;
  -webkit-tap-highlight-color:transparent
 }
 .p8-module-tabs button::before{
  content:"";
  position:absolute;
  top:3px;
  left:50%;
  width:20px;
  height:3px;
  border-radius:999px;
  background:#ef7b19;
  opacity:0;
  transform:translateX(-50%) scaleX(.35);
  transition:opacity .2s var(--p8-ease),transform .24s var(--p8-ease)
 }
 .p8-module-tabs button span,
 .p8-module-tabs button small,
 .p8-module-tabs button svg{
  transition:transform .2s var(--p8-ease),color .2s var(--p8-ease),opacity .2s var(--p8-ease)!important
 }
 .p8-module-tabs button.active::before{
  opacity:1;
  transform:translateX(-50%) scaleX(1)
 }
 .p8-module-tabs button.active span{
  transform:translateY(-1px) scale(1.06)
 }
 .p8-module-tabs button:active{
  transform:scale(.94)
 }
 .p8-module-tabs button:not(.active):active span{
  transform:translateY(1px)
 }

 .p8-search-home,.p8-search-user{
  touch-action:manipulation;
  transition:transform .16s var(--p8-ease),box-shadow .2s var(--p8-ease),filter .2s var(--p8-ease)!important;
  -webkit-tap-highlight-color:transparent
 }
 .p8-search-home:active,.p8-search-user:active{
  transform:scale(.93);
  box-shadow:0 2px 7px rgba(11,42,67,.12)!important
 }
 .p8-search-host .portal-search-box{
  transition:border-color .2s var(--p8-ease),box-shadow .2s var(--p8-ease),transform .2s var(--p8-ease)!important
 }
 .p8-search-host .portal-search-box:focus-within{
  transform:translateY(-1px);
  box-shadow:0 7px 20px rgba(17,43,64,.11)!important
 }

 .p8-local-tabs,.p8-project-section-tabs,.p8-document-tabs,#content>.tabs,#content .sheet-tabs{
  scroll-behavior:smooth;
  scroll-snap-type:x proximity
 }
 .p8-local-tabs button,.p8-project-section-tabs button,.p8-document-tabs button,#content>.tabs button,#content .sheet-tabs button{
  scroll-snap-align:center;
  touch-action:manipulation;
  transition:background-color .2s var(--p8-ease),color .2s var(--p8-ease),box-shadow .2s var(--p8-ease),transform .15s var(--p8-ease)!important;
  -webkit-tap-highlight-color:transparent
 }
 .p8-local-tabs button:active,.p8-project-section-tabs button:active,.p8-document-tabs button:active,#content>.tabs button:active,#content .sheet-tabs button:active{
  transform:scale(.96)
 }
 .p8-local-tabs button.active,.p8-project-section-tabs button.active,.p8-document-tabs button.active,#content>.tabs button.active,#content .sheet-tabs button.active{
  transform:translateY(-1px)
 }

 #content.p8-view-enter{
  animation:p8ViewEnter .28s var(--p8-ease) both;
  transform-origin:50% 0
 }
 @keyframes p8ViewEnter{
  0%{opacity:.42;transform:translateY(8px) scale(.995)}
  100%{opacity:1;transform:translateY(0) scale(1)}
 }

 .p8-mobile-actions{
  transition:transform .22s var(--p8-ease),opacity .22s var(--p8-ease),box-shadow .22s var(--p8-ease)!important
 }
 .p8-mobile-actions .btn{
  touch-action:manipulation;
  transition:transform .15s var(--p8-ease),filter .18s var(--p8-ease),box-shadow .18s var(--p8-ease)!important
 }
 .p8-mobile-actions .btn:active{
  transform:scale(.97);
  filter:brightness(.97)
 }

 .p8-home-kpis button,.p8-home-quick button,.p8-home-progress button,.p8-home-approvals button{
  touch-action:manipulation;
  transition:transform .16s var(--p8-ease),box-shadow .2s var(--p8-ease),background-color .2s var(--p8-ease)!important
 }
 .p8-home-kpis button:active,.p8-home-quick button:active,.p8-home-progress button:active,.p8-home-approvals button:active{
  transform:scale(.985)
 }

 .modal.open .modal-box{
  animation:p8ModalIn .22s var(--p8-ease) both
 }
 @keyframes p8ModalIn{
  from{opacity:.55;transform:translateY(14px) scale(.985)}
  to{opacity:1;transform:translateY(0) scale(1)}
 }
}

@media (prefers-reduced-motion:reduce){
 .p8-module-tabs button,.p8-module-tabs button span,.p8-module-tabs button small,.p8-module-tabs button svg,
 .p8-search-home,.p8-search-user,.p8-search-host .portal-search-box,
 .p8-local-tabs button,.p8-project-section-tabs button,.p8-document-tabs button,#content>.tabs button,#content .sheet-tabs button,
 .p8-mobile-actions,.p8-mobile-actions .btn,.p8-home-kpis button,.p8-home-quick button,.p8-home-progress button,.p8-home-approvals button{
  transition:none!important
 }
 #content.p8-view-enter,.modal.open .modal-box{animation:none!important}
 .p8-local-tabs,.p8-project-section-tabs,.p8-document-tabs,#content>.tabs,#content .sheet-tabs{scroll-behavior:auto!important}
}


/* R10.14 floating glass dock and mobile cleanup */
@media (max-width:1200px){
 body{padding-bottom:calc(98px + env(safe-area-inset-bottom))!important}
 .main{padding-bottom:calc(170px + env(safe-area-inset-bottom))!important}

 .p8-module-tabs{
  left:12px!important;
  right:12px!important;
  bottom:10px!important;
  width:auto!important;
  border-radius:24px!important;
  padding:8px 7px calc(8px + env(safe-area-inset-bottom))!important;
  background:linear-gradient(180deg,rgba(20,64,91,.86),rgba(9,39,63,.88))!important;
  border:1px solid rgba(255,255,255,.18)!important;
  box-shadow:0 14px 38px rgba(5,24,40,.28),inset 0 1px 0 rgba(255,255,255,.12)!important;
  backdrop-filter:blur(24px) saturate(145%)!important;
  -webkit-backdrop-filter:blur(24px) saturate(145%)!important;
  overflow:hidden!important
 }
 .p8-module-tabs::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius:inherit;
  background:linear-gradient(135deg,rgba(255,255,255,.10),rgba(255,255,255,0) 42%);
  opacity:.65
 }
 .p8-module-tabs button{
  z-index:1;
  min-height:60px!important;
  border-radius:18px!important;
  background:transparent!important;
  color:#c1d0da!important
 }
 .p8-module-tabs button.active{
  background:rgba(239,123,25,.15)!important;
  color:#ef7b19!important;
  box-shadow:inset 0 0 0 1px rgba(239,123,25,.26),0 5px 14px rgba(0,0,0,.10)!important
 }
 .p8-module-tabs button small{
  overflow:visible!important;
  text-overflow:clip!important;
  max-height:24px!important
 }
 .p8-mobile-actions{
  bottom:calc(102px + env(safe-area-inset-bottom))!important;
  border-radius:18px!important;
  box-shadow:0 12px 28px rgba(11,42,67,.17)!important
 }

 .p8-project-picker select{
  background:#e7f2f8!important;
  color:#17374c!important;
  border:1px solid #b9cedb!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82)!important
 }
 .p8-project-picker select:focus{
  outline:2px solid rgba(239,123,25,.62)!important;
  outline-offset:1px!important;
  border-color:#efb27e!important
 }

 .p8-procurement-table-mode .sheet-actions{
  display:none!important
 }

 .p8-subcontractor-table-mode #subcontractorContent>.card>.section-title,
 .p8-subcontractor-table-mode #subcontractorContent .wo-list-head{
  display:none!important
 }
 .p8-subcontractor-table-mode #subcontractorContent>.card{
  padding-top:8px!important
 }
 .p8-subcontractor-table-mode .wo-filter-row{
  margin-top:0!important
 }

 .p8-document-register-clean{
  margin-top:8px!important;
  padding-top:8px!important
 }
 .p8-document-register-clean>.section-title{
  display:none!important
 }

 #content{
  view-transition-name:p8-content
 }
 ::view-transition-old(root),
 ::view-transition-new(root){
  animation:none;
  mix-blend-mode:normal
 }
 ::view-transition-old(p8-content){
  animation:p8OldView .16s cubic-bezier(.4,0,1,1) both
 }
 ::view-transition-new(p8-content){
  animation:p8NewView .22s cubic-bezier(.2,.8,.2,1) both
 }
 @keyframes p8OldView{
  from{opacity:1;transform:translateY(0)}
  to{opacity:.28;transform:translateY(-3px)}
 }
 @keyframes p8NewView{
  from{opacity:.3;transform:translateY(5px) scale(.998)}
  to{opacity:1;transform:translateY(0) scale(1)}
 }

 .p8-local-tabs button,.p8-project-section-tabs button,.p8-document-tabs button{
  transition:background-color .16s cubic-bezier(.2,.8,.2,1),color .16s cubic-bezier(.2,.8,.2,1),transform .14s cubic-bezier(.2,.8,.2,1),box-shadow .16s cubic-bezier(.2,.8,.2,1)!important
 }
 .p8-search-host,.topbar.p8-mobile-topbar{
  transform:translateZ(0)
 }
}

@media (max-width:390px){
 .p8-module-tabs{left:7px!important;right:7px!important}
 .p8-module-tabs button small{font-size:8.3px!important}
}

@media (prefers-reduced-motion:reduce){
 ::view-transition-old(p8-content),::view-transition-new(p8-content){animation:none!important}
}


/* R10.15 dark floating dock refinement */
@media (max-width:1200px){
 .p8-module-tabs{
  left:4px!important;
  right:4px!important;
  bottom:6px!important;
  border-radius:16px!important;
  padding:8px 6px calc(8px + env(safe-area-inset-bottom))!important;
  background:linear-gradient(180deg,rgba(14,51,77,.98),rgba(11,42,67,.985))!important;
  border:1px solid rgba(255,255,255,.09)!important;
  box-shadow:0 12px 30px rgba(5,24,40,.30),inset 0 1px 0 rgba(255,255,255,.055)!important;
  backdrop-filter:blur(12px) saturate(112%)!important;
  -webkit-backdrop-filter:blur(12px) saturate(112%)!important
 }
 .p8-module-tabs::after{
  background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,0) 38%)!important;
  opacity:.7!important
 }
 .p8-module-tabs button{
  border-radius:12px!important
 }
 .p8-module-tabs button.active{
  background:rgba(239,123,25,.12)!important;
  box-shadow:inset 0 0 0 1px rgba(239,123,25,.24),0 3px 9px rgba(0,0,0,.10)!important
 }
 .p8-mobile-actions{
  bottom:calc(98px + env(safe-area-inset-bottom))!important
 }
}
@media (max-width:390px){
 .p8-module-tabs{left:2px!important;right:2px!important}
}


/* R10.16 stable phone rendering in portrait and landscape */
@media (max-width:1200px){
 html.p8-phone-mode body.p8-nav-pending #content{
  opacity:0!important;
  transform:translateY(3px)!important;
  pointer-events:none!important
 }
 html.p8-phone-mode #content{
  transition:opacity .12s cubic-bezier(.2,.8,.2,1),transform .12s cubic-bezier(.2,.8,.2,1)!important;
  view-transition-name:none!important
 }
 html.p8-phone-mode body:not(.p8-nav-pending) #content{
  opacity:1;
  transform:none
 }
}

html.p8-full-portal-mode .p8-module-tabs,
html.p8-full-portal-mode .p8-mobile-actions,
html.p8-full-portal-mode .p8-mobile-indicator,
html.p8-full-portal-mode .p8-search-host{
 display:none!important
}


/* R10.17 Resources sticky key columns */
@media (max-width:1200px){
 .p8-resource-table-mode .p8-resource-table th:first-child{
  left:auto!important;
  z-index:3!important;
  box-shadow:none!important
 }
 .p8-resource-table-mode .p8-resource-table td:first-child{
  position:static!important;
  left:auto!important;
  z-index:auto!important;
  background:#f8fafc!important;
  box-shadow:none!important
 }

 .p8-resource-materials .p8-resource-table th:nth-child(3),
 .p8-resource-machinery .p8-resource-table th:nth-child(2),
 .p8-resource-manpower .p8-resource-table th:nth-child(2){
  position:sticky!important;
  left:0!important;
  z-index:6!important;
  min-width:180px!important;
  background:#e7eef3!important;
  box-shadow:4px 0 8px rgba(11,42,67,.08)!important
 }

 .p8-resource-materials .p8-resource-table td:nth-child(3),
 .p8-resource-machinery .p8-resource-table td:nth-child(2),
 .p8-resource-manpower .p8-resource-table td:nth-child(2){
  position:sticky!important;
  left:0!important;
  z-index:4!important;
  min-width:180px!important;
  background:#f8fafc!important;
  box-shadow:4px 0 8px rgba(11,42,67,.08)!important
 }

 .p8-resource-materials .p8-resource-table td:nth-child(3) input,
 .p8-resource-machinery .p8-resource-table td:nth-child(2) input,
 .p8-resource-manpower .p8-resource-table td:nth-child(2) input{
  min-width:160px!important
 }
}


/* R11 Mobile Workspace: compact hierarchy and field-friendly controls. Phone-only. */
@media screen and (max-width:1200px){
 html.p8-phone-mode body{
  background:#f2f5f8!important;
  padding-bottom:calc(84px + env(safe-area-inset-bottom))!important
 }
 html.p8-phone-mode .main{
  padding:9px 11px calc(150px + env(safe-area-inset-bottom))!important
 }
 html.p8-phone-mode .p8-search-host{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 42px!important;
  grid-template-rows:44px!important;
  column-gap:8px!important;
  margin:0 0 8px!important
 }
 html.p8-phone-mode .p8-search-host .p8-search-home{
  display:none!important
 }
 html.p8-phone-mode .p8-search-host .portal-search-shell{
  grid-column:1!important;
  grid-row:1!important;
  width:100%!important;
  min-width:0!important
 }
 html.p8-phone-mode .p8-search-host .p8-search-user{
  grid-column:2!important;
  grid-row:1!important;
  width:42px!important;
  height:42px!important;
  min-height:42px!important;
  border-radius:10px!important;
  background:#0b2a43!important;
  border:0!important;
  box-shadow:none!important
 }
 html.p8-phone-mode .p8-search-host .portal-search-box{
  min-height:44px!important;
  height:44px!important;
  border-radius:10px!important;
  background:#fff!important;
  border:1px solid #d9e2e9!important;
  box-shadow:none!important;
  padding:7px 11px!important
 }
 html.p8-phone-mode .p8-search-host .portal-search-box input{
  min-height:27px!important;
  font-size:16px!important
 }
 html.p8-phone-mode .topbar.p8-mobile-topbar{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:7px 9px!important;
  min-height:64px!important;
  margin-bottom:9px!important;
  padding:11px 12px!important;
  border-radius:12px!important;
  background:#0b2a43!important;
  box-shadow:none!important;
  border:0!important
 }
 html.p8-phone-mode .topbar.p8-mobile-topbar .title{
  grid-column:1!important;
  grid-row:1!important;
  width:auto!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important
 }
 html.p8-phone-mode .topbar.p8-mobile-topbar .title h2{
  color:#fff!important;
  font-size:18px!important;
  font-weight:800!important;
  line-height:1.2!important;
  margin:0!important
 }
 html.p8-phone-mode .topbar.p8-mobile-topbar .title p{
  color:#b8cedd!important;
  font-size:11px!important;
  font-weight:500!important;
  line-height:1.3!important;
  margin:3px 0 0!important
 }
 html.p8-phone-mode .topbar.p8-mobile-topbar .p8-header-controls{
  display:flex!important;
  grid-column:2!important;
  grid-row:1!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  min-width:0!important;
  width:auto!important
 }
 html.p8-phone-mode .topbar.p8-header-has-project .p8-header-controls{
  grid-column:1/-1!important;
  grid-row:2!important;
  width:100%!important;
  justify-content:space-between!important
 }
 html.p8-phone-mode .p8-header-controls .p8-project-picker{
  flex:1 1 auto!important;
  min-width:0!important;
  max-width:100%!important;
  display:grid!important;
  gap:3px!important
 }
 html.p8-phone-mode .p8-project-picker>span{
  font-size:10px!important;
  color:#b8cedd!important;
  letter-spacing:.02em!important
 }
 html.p8-phone-mode .p8-project-picker select{
  min-height:44px!important;
  width:100%!important;
  border-radius:8px!important;
  border:1px solid #cad8e2!important;
  padding:8px 10px!important;
  font-size:16px!important;
  box-shadow:none!important;
  color:#0b2a43!important;
  background:#fff!important
 }
 html.p8-phone-mode .p8-header-controls .p8-sync-pill{
  min-height:28px!important;
  border-radius:7px!important;
  padding:6px 7px!important;
  font-size:10px!important;
  white-space:nowrap!important;
  box-shadow:none!important
 }
 html.p8-phone-mode .p8-header-inbox{
  position:relative;
  flex:0 0 36px!important;
  width:36px!important;
  min-width:36px!important;
  height:36px!important;
  min-height:36px!important;
  display:grid!important;
  place-items:center!important;
  padding:7px!important;
  border:1px solid #4f6c81!important;
  border-radius:9px!important;
  color:#f7fafc!important;
  background:rgba(255,255,255,.08)!important;
  box-shadow:none!important
 }
 html.p8-phone-mode .p8-header-inbox svg{
  height:19px!important;
  width:19px!important
 }
 html.p8-phone-mode .p8-header-inbox-count{
  position:absolute;
  top:-5px;
  right:-4px;
  min-width:17px;
  height:17px;
  padding:1px 3px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#ef7b19;
  color:white;
  border:1px solid #0b2a43;
  font-size:9px;
  font-weight:800;
  line-height:1
 }
 html.p8-phone-mode .p8-module-tabs{
  display:grid!important;
  left:3px!important;
  right:3px!important;
  bottom:4px!important;
  width:auto!important;
  border-radius:12px!important;
  padding:7px 4px calc(7px + env(safe-area-inset-bottom))!important;
  gap:1px!important;
  background:#0b2a43!important;
  border:1px solid rgba(255,255,255,.10)!important;
  box-shadow:0 7px 24px rgba(8,29,47,.23)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important
 }
 html.p8-phone-mode .p8-module-tabs button{
  display:grid!important;
  gap:4px!important;
  min-width:0!important;
  min-height:57px!important;
  padding:7px 1px 5px!important;
  border-radius:9px!important;
  background:transparent!important;
  color:#b6cbd9!important;
  box-shadow:none!important;
  font-size:10px!important
 }
 html.p8-phone-mode .p8-module-tabs button span{
  min-height:22px!important;
  display:grid!important;
  place-items:center!important
 }
 html.p8-phone-mode .p8-module-tabs button svg{
  width:21px!important;
  height:21px!important;
  stroke-width:1.9!important
 }
 html.p8-phone-mode .p8-module-tabs button small{
  max-height:26px!important;
  font-size:9.5px!important;
  font-weight:700!important;
  line-height:1.2!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
  letter-spacing:-.025em!important;
  color:inherit!important;
  text-align:center!important
 }
 html.p8-phone-mode .p8-module-tabs button.active{
  background:#19455f!important;
  color:#fff!important;
  box-shadow:inset 0 -2px 0 #ef7b19!important
 }
 html.p8-phone-mode .p8-module-tabs button.active small{
  color:#fff!important
 }
 html.p8-phone-mode .p8-mobile-actions{
  bottom:calc(84px + env(safe-area-inset-bottom))!important;
  border-radius:11px!important;
  padding:7px!important;
  border:1px solid #d8e3eb!important;
  background:#fff!important;
  box-shadow:0 5px 17px rgba(11,42,67,.13)!important
 }
 html.p8-phone-mode #content{
  view-transition-name:none!important;
  animation:none!important
 }
 html.p8-phone-mode #content.p8-view-enter{
  animation:none!important
 }
 html.p8-phone-mode .p8-workspace-page{
  display:grid!important;
  gap:12px!important;
  min-width:0!important;
  color:#172f43!important;
  padding-bottom:12px
 }
 html.p8-phone-mode .p8-workspace-page button,
 html.p8-phone-mode .p8-workspace-page select{
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation
 }
 html.p8-phone-mode .p8-workspace-focus{
  display:grid;
  gap:10px;
  padding:15px;
  border-radius:14px;
  background:linear-gradient(145deg,#113d59,#0b2a43);
  border:1px solid #214861;
  color:#fff;
  box-shadow:none
 }
 html.p8-phone-mode .p8-workspace-focus-head{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:space-between
 }
 html.p8-phone-mode .p8-workspace-eyebrow{
  font-size:13px;
  font-weight:800;
  color:#fff
 }
 html.p8-phone-mode .p8-workspace-focus-indicator{
  font-size:10px;
  font-weight:700;
  color:#c7d8e4
 }
 html.p8-phone-mode .p8-workspace-project-select{
  display:grid;
  gap:5px;
  min-width:0;
  font-size:10px;
  font-weight:700;
  color:#c9dce8
 }
 html.p8-phone-mode .p8-workspace-project-select>span{
  font-size:10px;
  color:#c9dce8;
  letter-spacing:.03em
 }
 html.p8-phone-mode .p8-workspace-project-select select{
  width:100%;
  min-height:44px!important;
  padding:9px 12px!important;
  background:#fff!important;
  border:1px solid #dbe5ec!important;
  border-radius:8px!important;
  box-shadow:none!important;
  font-size:16px!important;
  font-weight:700!important;
  color:#173750!important
 }
 html.p8-phone-mode .p8-workspace-progress-caption{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:11px;
  font-weight:600;
  color:#c5d9e6
 }
 html.p8-phone-mode .p8-workspace-progress-caption strong{
  color:#fff;
  font-size:14px
 }
 html.p8-phone-mode .p8-workspace-progress-track{
  display:block;
  width:100%;
  height:7px;
  border-radius:10px;
  overflow:hidden;
  background:#315a72
 }
 html.p8-phone-mode .p8-workspace-progress-track>span{
  display:block;
  height:100%;
  background:#65ae9d;
  border-radius:10px;
  min-width:0
 }
 html.p8-phone-mode .p8-workspace-empty{
  color:#d4e0e9;
  margin:0;
  font-size:12px
 }
 html.p8-phone-mode .p8-workspace-metrics{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px
 }
 html.p8-phone-mode .p8-workspace-metrics button{
  display:grid;
  gap:5px;
  justify-items:start;
  align-content:center;
  min-width:0;
  min-height:77px!important;
  padding:10px 11px!important;
  background:#fff!important;
  border:1px solid #dce5ed!important;
  border-radius:11px!important;
  text-align:left;
  box-shadow:none!important
 }
 html.p8-phone-mode .p8-workspace-metrics strong{
  color:#123b56;
  font-size:24px;
  font-weight:850;
  line-height:1
 }
 html.p8-phone-mode .p8-workspace-metrics span{
  color:#60778a;
  font-size:11px;
  line-height:1.2;
  font-weight:700
 }
 html.p8-phone-mode .p8-workspace-section{
  display:grid;
  min-width:0;
  gap:9px
 }
 html.p8-phone-mode .p8-workspace-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:21px;
  padding:0 2px
 }
 html.p8-phone-mode .p8-workspace-heading h3{
  font-size:15px!important;
  font-weight:800!important;
  letter-spacing:-.015em;
  margin:0!important;
  color:#173750!important
 }
 html.p8-phone-mode .p8-workspace-heading>button{
  width:auto!important;
  min-height:32px!important;
  border:0!important;
  background:transparent!important;
  color:#256888!important;
  font-size:11px;
  font-weight:800
 }
 html.p8-phone-mode .p8-workspace-shortcuts{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px
 }
 html.p8-phone-mode .p8-workspace-field .p8-workspace-shortcuts{
  grid-template-columns:repeat(2,minmax(0,1fr))
 }
 html.p8-phone-mode .p8-workspace-shortcuts button{
  display:flex!important;
  flex-direction:column;
  gap:6px;
  align-items:flex-start;
  min-height:100px!important;
  min-width:0;
  padding:12px 11px!important;
  border:1px solid #dce5ed!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#173750!important;
  text-align:left;
  box-shadow:none!important
 }
 html.p8-phone-mode .p8-workspace-shortcuts button:first-child{
  background:#f2f6f9!important;
  border-color:#c9dae5!important
 }
 html.p8-phone-mode .p8-workspace-quick-icon{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:#e6f0f5;
  color:#194d6b
 }
 html.p8-phone-mode .p8-workspace-quick-icon svg{
  width:18px;
  height:18px
 }
 html.p8-phone-mode .p8-workspace-shortcuts strong{
  font-size:12px;
  line-height:1.16;
  font-weight:800;
  color:#173750
 }
 html.p8-phone-mode .p8-workspace-shortcuts small{
  font-size:10px!important;
  line-height:1.2;
  color:#657c8d!important;
  font-weight:500
 }
 html.p8-phone-mode .p8-workspace-module-list,
 html.p8-phone-mode .p8-workspace-progress-list,
 html.p8-phone-mode .p8-workspace-recent-list{
  display:grid;
  background:#fff;
  border:1px solid #dce5ed;
  border-radius:12px;
  overflow:hidden
 }
 html.p8-phone-mode .p8-workspace-module-list button{
  display:flex!important;
  align-items:center;
  width:100%!important;
  min-height:62px!important;
  gap:11px;
  padding:10px 12px!important;
  border:0!important;
  border-bottom:1px solid #e9eef3!important;
  background:#fff!important;
  color:#173750!important;
  text-align:left;
  box-shadow:none!important
 }
 html.p8-phone-mode .p8-workspace-module-list button:last-child{
  border-bottom:0!important
 }
 html.p8-phone-mode .p8-workspace-module-icon{
  display:grid;
  flex:0 0 36px;
  width:36px;
  height:36px;
  place-items:center;
  background:#edf3f7;
  border-radius:9px;
  color:#23536f
 }
 html.p8-phone-mode .p8-workspace-module-icon svg{
  width:20px;
  height:20px
 }
 html.p8-phone-mode .p8-workspace-module-label{
  display:grid;
  min-width:0;
  flex:1;
  gap:3px
 }
 html.p8-phone-mode .p8-workspace-module-label strong{
  font-size:13px;
  font-weight:800;
  color:#173750
 }
 html.p8-phone-mode .p8-workspace-module-label small{
  color:#758899!important;
  font-size:11px!important;
  line-height:1.2
 }
 html.p8-phone-mode .p8-workspace-chevron{
  flex:0 0 auto;
  color:#849cad;
  font-size:25px;
  font-weight:400;
  line-height:1
 }
 html.p8-phone-mode .p8-workspace-progress-list button{
  display:grid;
  gap:9px;
  padding:12px!important;
  min-height:66px!important;
  border:0!important;
  border-bottom:1px solid #e9eef3!important;
  background:#fff!important;
  box-shadow:none!important;
  text-align:left;
  color:#18364c!important
 }
 html.p8-phone-mode .p8-workspace-progress-list button:last-child,
 html.p8-phone-mode .p8-workspace-recent-list button:last-child{
  border-bottom:0!important
 }
 html.p8-phone-mode .p8-workspace-progress-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  font-size:12px
 }
 html.p8-phone-mode .p8-workspace-progress-top strong{
  font-size:12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#18364c
 }
 html.p8-phone-mode .p8-workspace-progress-top b{
  flex:0 0 auto;
  color:#174d6a;
  font-size:12px
 }
 html.p8-phone-mode .p8-workspace-progress-list .p8-workspace-progress-track{
  height:6px;
  background:#e1e9ef
 }
 html.p8-phone-mode .p8-workspace-progress-list .p8-workspace-progress-track>span{
  background:#3e819a
 }
 html.p8-phone-mode .p8-workspace-recent-list button{
  display:flex;
  gap:12px;
  justify-content:space-between;
  align-items:center;
  min-height:62px!important;
  padding:11px 12px!important;
  background:#fff!important;
  border:0!important;
  border-bottom:1px solid #e9eef3!important;
  box-shadow:none!important;
  color:#173750!important;
  text-align:left
 }
 html.p8-phone-mode .p8-workspace-recent-list button>span{
  display:grid;
  gap:3px;
  min-width:0
 }
 html.p8-phone-mode .p8-workspace-recent-list strong{
  font-size:12px;
  color:#173750
 }
 html.p8-phone-mode .p8-workspace-recent-list small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#71889b!important;
  font-size:10px!important
 }
 html.p8-phone-mode .p8-workspace-recent-list em{
  padding:5px 7px;
  border-radius:7px;
  flex:0 0 auto;
  background:#f8eddf;
  font-size:10px;
  font-style:normal;
  font-weight:700;
  color:#915b1e
 }
 html.p8-phone-mode .p8-workspace-recent-list em.good{
  background:#e4f1e9;
  color:#27674a
 }
 html.p8-phone-mode .p8-workspace-recent-list em.bad{
  background:#f7e8e6;
  color:#a44738
 }
 html.p8-phone-mode .p8-workspace-recent-list em.review{
  background:#e9f0f7;
  color:#315d82
 }
 html.p8-phone-mode .p8-workspace-footnote{
  padding:4px 8px 8px;
  color:#61778a;
  font-size:11px;
  text-align:center
 }
 html.p8-phone-mode .p8-local-tabs button,
 html.p8-phone-mode .p8-project-section-tabs button,
 html.p8-phone-mode .p8-document-tabs button{
  font-size:12px!important;
  font-weight:750!important
 }
 html.p8-phone-mode .p8-mobile-card-table td:before{
  font-size:10px!important;
  letter-spacing:.02em!important
 }
 html.p8-phone-mode .p8-editable-card-table td:before{
  font-size:10px!important
 }
 html.p8-phone-mode .p8-workspace-page button:focus-visible,
 html.p8-phone-mode .p8-module-tabs button:focus-visible,
 html.p8-phone-mode .p8-header-inbox:focus-visible{
  outline:2px solid #ef7b19!important;
  outline-offset:2px!important
 }
}
@media (prefers-reduced-motion:reduce){
 html.p8-phone-mode .p8-workspace-page *,
 html.p8-phone-mode .p8-module-tabs button{
  transition:none!important;
  animation:none!important
 }
}


/* R11.1 phone-only header and high-contrast spreadsheet refinement */
@media screen and (max-width:1200px){
 html.p8-phone-mode .topbar.p8-mobile-icon-header{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-rows:auto!important;
  min-height:61px!important;height:auto!important;
  padding:9px 10px!important;
  align-items:center!important;
  gap:4px!important;
  border:1px solid #27516b!important;
  border-left:4px solid #ef7b19!important;
  border-radius:11px!important;
  background:#0b2a43!important;
  box-shadow:none!important;
  margin-bottom:7px!important
 }
 html.p8-phone-mode .topbar.p8-mobile-icon-header .title{
  grid-column:1!important;grid-row:1!important;
  align-self:center!important;
  min-width:0!important;max-width:100%!important;
  margin:0!important
 }
 html.p8-phone-mode .topbar.p8-mobile-icon-header .title h2{
  font-size:17px!important;
  color:#fff!important;
  line-height:1.1!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
  overflow:hidden!important
 }
 html.p8-phone-mode .topbar.p8-mobile-icon-header .title p{
  display:block!important;
  margin:4px 0 0!important;
  color:#b6cbdc!important;
  font-size:10px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
  overflow:hidden!important
 }
 html.p8-phone-mode .topbar.p8-mobile-icon-header .p8-header-controls{
  grid-column:2!important;grid-row:1!important;
  display:flex!important;
  width:auto!important;min-width:0!important;
  gap:4px!important;
  align-items:center!important;justify-content:flex-end!important
 }
 html.p8-phone-mode .p8-header-sync{
  display:grid!important;
  flex:0 0 31px!important;
  width:31px!important;height:32px!important;
  min-width:31px!important;min-height:32px!important;
  place-items:center!important;
  padding:0!important;
  border:1px solid #345c74!important;
  border-radius:8px!important;
  color:#f1f8fc!important;
  background:#133750!important;
  box-shadow:none!important
 }
 html.p8-phone-mode .p8-header-sync-wheel{
  display:block!important;
  width:16px!important;height:16px!important;
  border:2px solid #48b997!important;
  border-top-color:transparent!important;
  border-radius:50%!important;
  background:transparent!important;
  animation:kkPhoneSyncSpin 2.7s linear infinite!important
 }
 html.p8-phone-mode .p8-header-sync.pending .p8-header-sync-wheel{
  border-color:#f59d44!important;
  border-top-color:transparent!important;
  animation-duration:.9s!important
 }
 html.p8-phone-mode .p8-header-sync.offline .p8-header-sync-wheel{
  border-color:#dc8a7e!important;
  border-top-color:transparent!important;
  animation:none!important
 }
 html.p8-phone-mode .topbar.p8-mobile-icon-header .p8-mobile-header-button,
 html.p8-phone-mode .topbar.p8-mobile-icon-header .p8-header-print-actions .portal-print-icon-button{
  display:grid!important;
  flex:0 0 31px!important;
  width:31px!important;height:32px!important;
  min-width:31px!important;min-height:32px!important;
  padding:6px!important;
  place-items:center!important;
  border:1px solid #345c74!important;
  border-radius:8px!important;
  color:#eef7fc!important;
  background:#133750!important;
  box-shadow:none!important;
  line-height:1!important
 }
 html.p8-phone-mode .topbar.p8-mobile-icon-header .p8-mobile-header-button svg,
 html.p8-phone-mode .topbar.p8-mobile-icon-header .p8-header-print-actions .portal-print-icon-button svg{
  width:18px!important;height:18px!important;
  color:#eef7fc!important;
  stroke:currentColor!important
 }
 html.p8-phone-mode .topbar.p8-mobile-icon-header .p8-header-print-actions{
  display:inline-flex!important;
  width:auto!important;min-width:0!important;
  flex:0 0 auto!important;
  align-items:center!important;
  gap:0!important;
  margin:0!important;
  padding:0!important
 }
 html.p8-phone-mode .topbar.p8-mobile-icon-header .p8-header-print-actions > button:not(.portal-print-icon-button){
  display:none!important
 }
 html.p8-phone-mode .topbar.p8-mobile-icon-header .p8-header-avatar{
  display:grid!important;
  place-items:center!important;
  flex:0 0 31px!important;
  width:31px!important;height:31px!important;
  border-radius:50%!important;
  border:1px solid #57849f!important;
  background:#2e536d!important;
  color:#fff!important;
  font-size:10px!important;
  font-weight:800!important;
  line-height:1!important
 }
 html.p8-phone-mode #p8MobileProjectBar{
  display:flex;
  width:100%;
  min-height:44px;
  margin:0 0 8px;
  padding:5px 9px;
  background:#0d2b43;
  border:1px solid #29516c;
  border-radius:10px;
  align-items:center;
  color:#d6e4ee
 }
 html.p8-phone-mode #p8MobileProjectBar[style*="none"]{display:none!important}
 html.p8-phone-mode #p8MobileProjectBar .p8-project-picker{
  display:flex!important;
  flex-direction:row!important;
  gap:9px!important;
  align-items:center!important;
  width:100%!important;
  min-width:0!important
 }
 html.p8-phone-mode #p8MobileProjectBar .p8-project-picker>span{
  flex:0 0 auto;
  font-size:11px!important;
  color:#d4e5f0!important
 }
 html.p8-phone-mode #p8MobileProjectBar .p8-project-picker select{
  flex:1 1 auto!important;
  width:100%!important;
  min-width:0!important;
  height:37px!important;
  min-height:37px!important;
  border:1px solid #3f647b!important;
  border-radius:7px!important;
  padding:4px 8px!important;
  color:#eef8ff!important;
  background:#143a55!important;
  color-scheme:dark;
  font-size:14px!important
 }
 html.p8-phone-mode .p8-search-host{
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:44px!important;
  width:100%!important
 }
 html.p8-phone-mode .p8-search-host .p8-search-user{
  display:none!important
 }
 html.p8-phone-mode .p8-search-host .portal-search-shell{
  grid-column:1!important;grid-row:1!important;
  width:100%!important
 }

 /* One contrast standard for editable tables, sheet headers and sticky cells. */
 html.p8-phone-mode #content :is(.sheet,.table-wrap,.p8-native-table-wrap),
 html.p8-phone-mode #projectTabContent :is(.sheet,.table-wrap,.p8-native-table-wrap){
  color:#eaf3fa!important;
  background:#0d2a42!important;
  border-color:#305570!important;
  color-scheme:dark
 }
 html.p8-phone-mode #content :is(.sheet,.table-wrap,.p8-native-table-wrap) table,
 html.p8-phone-mode #projectTabContent :is(.sheet,.table-wrap,.p8-native-table-wrap) table{
  background:#0d2a42!important;
  color:#eaf3fa!important
 }
 html.p8-phone-mode #content :is(.sheet,.table-wrap,.p8-native-table-wrap) :is(thead,th),
 html.p8-phone-mode #projectTabContent :is(.sheet,.table-wrap,.p8-native-table-wrap) :is(thead,th){
  color:#f7fbff!important;
  background:#173d57!important;
  border-color:#345d78!important;
  opacity:1!important
 }
 html.p8-phone-mode #content :is(.sheet,.table-wrap,.p8-native-table-wrap) tbody tr:nth-child(odd),
 html.p8-phone-mode #projectTabContent :is(.sheet,.table-wrap,.p8-native-table-wrap) tbody tr:nth-child(odd){
  background:#0d2b44!important
 }
 html.p8-phone-mode #content :is(.sheet,.table-wrap,.p8-native-table-wrap) tbody tr:nth-child(even),
 html.p8-phone-mode #projectTabContent :is(.sheet,.table-wrap,.p8-native-table-wrap) tbody tr:nth-child(even){
  background:#12344e!important
 }
 html.p8-phone-mode #content :is(.sheet,.table-wrap,.p8-native-table-wrap) tbody td,
 html.p8-phone-mode #projectTabContent :is(.sheet,.table-wrap,.p8-native-table-wrap) tbody td{
  color:#edf5fb!important;
  background:transparent!important;
  border-color:#31536b!important;
  opacity:1!important;
  -webkit-text-fill-color:#edf5fb!important
 }
 html.p8-phone-mode #content :is(.sheet,.table-wrap,.p8-native-table-wrap) :is(input,select,textarea),
 html.p8-phone-mode #projectTabContent :is(.sheet,.table-wrap,.p8-native-table-wrap) :is(input,select,textarea){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:#163852!important;
  border:1px solid #456781!important;
  opacity:1!important;
  color-scheme:dark
 }
 html.p8-phone-mode #content :is(.sheet,.table-wrap,.p8-native-table-wrap) :is(input,textarea)::placeholder,
 html.p8-phone-mode #projectTabContent :is(.sheet,.table-wrap,.p8-native-table-wrap) :is(input,textarea)::placeholder{
  color:#bed0dc!important;
  -webkit-text-fill-color:#bed0dc!important;
  opacity:1!important
 }
 html.p8-phone-mode #content .p8-mobile-card-table tr{
  border-color:#305570!important;
  background:#102f49!important;
  color:#eaf3fa!important
 }
}
@keyframes kkPhoneSyncSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){
 html.p8-phone-mode .p8-header-sync-wheel{animation:none!important}
}


/* R11.2 phone cleanup: retain audit records and workflow controls, not floating chrome. */
@media screen and (max-width:1200px){
 html.p8-phone-mode .p9-history-action,
 html.p8-phone-mode .p9-mobile-history,
 html.p8-phone-mode #p9MobileHistory,
 html.p8-phone-mode #cloudRefreshBtn,
 html.p8-phone-mode .p8-header-avatar,
 html.p8-phone-mode .p8-search-user{
  display:none!important
 }
 html.p8-phone-mode .mobile-start{
  left:auto!important;
  right:16px!important;
  bottom:calc(14px + env(safe-area-inset-bottom))!important
 }
 html.p8-phone-mode .mobile-start-btn{
  display:grid!important;
  width:53px!important;height:53px!important;
  min-width:53px!important;min-height:53px!important;
  padding:12px!important;gap:4px!important;
  border-radius:13px!important
 }
 html.p8-phone-mode .topbar.p8-mobile-icon-header{
  margin-bottom:7px!important
 }
 html.p8-phone-mode #content{
  margin-top:0!important;
  padding-top:0!important
 }
 html.p8-phone-mode #projectTabContent{
  position:relative!important;
  top:auto!important;
  margin-top:0!important;
  padding-top:0!important;
  overflow:visible!important
 }
 html.p8-phone-mode #projectTabContent > .p8-project-section-tabs,
 html.p8-phone-mode #projectTabContent > .p8-document-tabs,
 html.p8-phone-mode #projectTabContent > .p8-planning-subtabs{
  display:grid!important;
  grid-auto-flow:row!important;
  grid-auto-columns:auto!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:6px!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
  margin:0 0 9px!important;
  padding:5px!important;
  overflow:visible!important;
  white-space:normal!important
 }
 html.p8-phone-mode #projectTabContent > .p8-project-section-tabs button,
 html.p8-phone-mode #projectTabContent > .p8-document-tabs button,
 html.p8-phone-mode #projectTabContent > .p8-planning-subtabs button{
  width:100%!important;
  min-width:0!important;
  min-height:42px!important;
  height:auto!important;
  padding:8px!important;
  font-size:12px!important;
  line-height:1.3!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  text-align:center!important
 }
 html.p8-phone-mode :is(#content,#projectTabContent) input[type="file"]{
  display:block;
  max-width:100%!important;
  padding:5px!important;
  border:1px solid #426781!important;
  border-radius:8px!important;
  background:#11354f!important;
  color:#e9f4fb!important;
  -webkit-text-fill-color:#e9f4fb!important;
  color-scheme:dark!important;
  font-size:12px!important
 }
 html.p8-phone-mode :is(#content,#projectTabContent) input[type="file"]::file-selector-button,
 html.p8-phone-mode :is(#content,#projectTabContent) input[type="file"]::-webkit-file-upload-button{
  background:#1a4866!important;
  border:1px solid #5a7b96!important;
  border-radius:7px!important;
  padding:7px 10px!important;
  margin-right:8px!important;
  color:#f5faff!important;
  -webkit-text-fill-color:#f5faff!important;
  box-shadow:none!important;
  font-size:12px!important
 }
 html.p8-phone-mode :is(#content,#projectTabContent) :is(.sheet,.table-wrap,.p8-native-table-wrap) :is(option,optgroup){
  background:#12334c!important;
  color:#f1f8fd!important
 }
}


/* R12.2 restored phone experience. All changes below require p8-phone-mode.
   Mobile CSS is disabled by p8SetMobileAssetMode() on tablets, opened foldables
   and desktops. Do not move these rules into the full-portal stylesheets. */
@media screen and (max-width:1200px){
 html.p8-phone-mode .mobile-start{
  display:block!important;
  position:fixed!important;
  left:auto!important;
  right:15px!important;
  bottom:calc(94px + env(safe-area-inset-bottom))!important;
  z-index:185!important;
  width:53px!important;
  height:53px!important;
  margin:0!important
 }
 html.p8-phone-mode .mobile-start-btn{
  display:grid!important;
  width:53px!important;
  height:53px!important;
  min-width:53px!important;
  min-height:53px!important;
  padding:12px!important;
  gap:4px!important;
  border-radius:13px!important;
  background:#082a43!important;
  border:1px solid #305974!important;
  box-shadow:0 7px 19px rgba(3,19,34,.3)!important
 }
 html.p8-phone-mode .sidebar{
  display:none!important;
  position:fixed!important;
  left:auto!important;
  right:9px!important;
  top:auto!important;
  bottom:calc(154px + env(safe-area-inset-bottom))!important;
  width:min(78vw,290px)!important;
  max-width:290px!important;
  min-width:0!important;
  height:auto!important;
  max-height:calc(100dvh - 185px)!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  z-index:184!important;
  padding:15px 12px!important;
  box-sizing:border-box!important;
  border:1px solid #285572!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,#0b314c,#071f37)!important;
  box-shadow:0 18px 42px rgba(0,13,29,.5)!important
 }
 html.p8-phone-mode .sidebar.open{display:block!important}
 html.p8-phone-mode .sidebar .brand{
  padding:3px 4px 12px!important
 }
 html.p8-phone-mode .sidebar #nav .nav button{
  min-height:43px!important
 }
 html.p8-phone-mode body.p8-keyboard-open .mobile-start,
 html.p8-phone-mode body:has(.modal.open) .mobile-start{
  display:none!important
 }
 /* Keep the direct Home/Projects/Site/Procurement/Subcontractors dock usable. */
 html.p8-phone-mode .p8-module-tabs{
  z-index:145!important
 }
 html.p8-phone-mode body:has(#p8MobileActions:not([style*="display: none"])) .mobile-start{
  bottom:calc(161px + env(safe-area-inset-bottom))!important
 }
 html.p8-phone-mode body:has(#p8MobileActions:not([style*="display: none"])) .sidebar{
  bottom:calc(221px + env(safe-area-inset-bottom))!important;
  max-height:calc(100dvh - 250px)!important
 }

 /* Remove the sticky desktop tab offset; expose every authorized project tab. */
 html.p8-phone-mode #content.p8-phone-project-workspace{
  margin-top:0!important;
  padding-top:0!important;
  min-height:0!important;
  overflow:visible!important
 }
 html.p8-phone-mode #content.p8-phone-project-workspace > .tabs{
  display:grid!important;
  position:static!important;
  top:auto!important;
  left:auto!important;
  z-index:auto!important;
  grid-auto-flow:row!important;
  grid-auto-columns:auto!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  gap:6px!important;
  margin:0 0 9px!important;
  padding:6px!important;
  overflow:visible!important;
  white-space:normal!important;
  border:1px solid #2e5671!important;
  border-radius:11px!important;
  background:#0b2a43!important;
  box-shadow:none!important;
  scroll-snap-type:none!important
 }
 html.p8-phone-mode #content.p8-phone-project-workspace > .tabs button{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  min-height:43px!important;
  height:auto!important;
  padding:8px 7px!important;
  border:0!important;
  border-radius:8px!important;
  background:#11344e!important;
  color:#cadce9!important;
  font-size:12px!important;
  line-height:1.3!important;
  white-space:normal!important;
  overflow:visible!important;
  overflow-wrap:anywhere!important;
  text-align:center!important;
  scroll-snap-align:none!important
 }
 html.p8-phone-mode #content.p8-phone-project-workspace > .tabs button.active{
  background:#20516f!important;
  color:#fff!important;
  box-shadow:inset 0 -2px 0 #ef7b19!important
 }
 html.p8-phone-mode #content.p8-phone-project-workspace > .tabs .ui-tab-label{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  min-width:0!important;
  max-width:100%!important;
  white-space:normal!important;
  color:inherit!important;
  text-align:center!important
 }
 html.p8-phone-mode #content.p8-phone-project-workspace > .tabs .ui-icon{
  color:inherit!important
 }
 html.p8-phone-mode #content.p8-phone-project-workspace #projectTabContent{
  position:static!important;
  top:auto!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important
 }
 html.p8-phone-mode #content.p8-phone-project-workspace #projectTabContent > :is(.programme-subtabs,.p8-planning-subtabs,.p8-document-tabs,.p8-local-tabs){
  display:grid!important;
  position:static!important;
  top:auto!important;
  z-index:auto!important;
  grid-auto-flow:row!important;
  grid-auto-columns:auto!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-content:start!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  gap:6px!important;
  margin:0 0 9px!important;
  padding:5px!important;
  overflow:visible!important;
  white-space:normal!important;
  border:1px solid #315673!important;
  border-radius:11px!important;
  background:#0d2d45!important;
  scroll-snap-type:none!important
 }
 html.p8-phone-mode #content.p8-phone-project-workspace #projectTabContent > :is(.programme-subtabs,.p8-planning-subtabs,.p8-document-tabs,.p8-local-tabs) button{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  width:100%!important;
  min-height:41px!important;
  height:auto!important;
  margin:0!important;
  padding:7px!important;
  color:#cedfea!important;
  background:#12334b!important;
  border:0!important;
  border-radius:8px!important;
  font-size:12px!important;
  line-height:1.3!important;
  font-weight:750!important;
  text-align:center!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  scroll-snap-align:none!important
 }
 html.p8-phone-mode #content.p8-phone-project-workspace #projectTabContent > :is(.programme-subtabs,.p8-planning-subtabs,.p8-document-tabs,.p8-local-tabs) button.active{
  color:#fff!important;
  background:#20516f!important;
  box-shadow:inset 0 -2px 0 #ef7b19!important
 }
 html.p8-phone-mode #content.p8-phone-project-workspace #projectTabContent > :is(.programme-subtabs,.p8-planning-subtabs,.p8-document-tabs,.p8-local-tabs) .ui-tab-label{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex-wrap:wrap!important;
  gap:5px!important;
  min-width:0!important;
  white-space:normal!important
 }

 /* Readable dark sheets, import invoice inputs and progress tables. */
 html.p8-phone-mode :is(#content,#projectTabContent) :is(.sheet,.table-wrap,.p8-native-table-wrap,.unified-sheet,.programme-sheet,.request-sheet,.sheet-body){
  background:#0d2a42!important;
  color:#edf5fc!important;
  border-color:#325771!important;
  color-scheme:dark!important
 }
 html.p8-phone-mode :is(#content,#projectTabContent) :is(.sheet,.table-wrap,.p8-native-table-wrap,.unified-sheet,.programme-sheet,.request-sheet) table{
  background:#0d2a42!important;
  color:#edf5fc!important
 }
 html.p8-phone-mode :is(#content,#projectTabContent) :is(.sheet,.table-wrap,.p8-native-table-wrap,.unified-sheet,.programme-sheet,.request-sheet) :is(thead,th){
  color:#f5fbff!important;
  background:#173e58!important;
  -webkit-text-fill-color:#f5fbff!important;
  border-color:#3c627b!important;
  opacity:1!important
 }
 html.p8-phone-mode :is(#content,#projectTabContent) :is(.sheet,.table-wrap,.p8-native-table-wrap,.unified-sheet,.programme-sheet,.request-sheet) tbody tr:nth-child(odd){
  background:#0e2c45!important
 }
 html.p8-phone-mode :is(#content,#projectTabContent) :is(.sheet,.table-wrap,.p8-native-table-wrap,.unified-sheet,.programme-sheet,.request-sheet) tbody tr:nth-child(even){
  background:#13344f!important
 }
 html.p8-phone-mode :is(#content,#projectTabContent) :is(.sheet,.table-wrap,.p8-native-table-wrap,.unified-sheet,.programme-sheet,.request-sheet) tbody td{
  background:transparent!important;
  color:#ecf5fb!important;
  -webkit-text-fill-color:#ecf5fb!important;
  border-color:#335772!important;
  opacity:1!important
 }
 html.p8-phone-mode :is(#content,#projectTabContent) :is(.sheet,.table-wrap,.p8-native-table-wrap,.unified-sheet,.programme-sheet,.request-sheet) :is(input,select,textarea),
 html.p8-phone-mode :is(#content,#projectTabContent) input[type="file"]{
  background:#143950!important;
  border:1px solid #426c86!important;
  color:#f5faff!important;
  -webkit-text-fill-color:#f5faff!important;
  opacity:1!important;
  color-scheme:dark!important
 }
 html.p8-phone-mode :is(#content,#projectTabContent) input[type="file"]{
  max-width:100%!important;
  padding:6px!important;
  border-radius:8px!important;
  font-size:12px!important
 }
 html.p8-phone-mode :is(#content,#projectTabContent) input[type="file"]::file-selector-button,
 html.p8-phone-mode :is(#content,#projectTabContent) input[type="file"]::-webkit-file-upload-button{
  background:#1c4b68!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  border:1px solid #6388a0!important;
  border-radius:7px!important;
  padding:8px 10px!important;
  margin-right:8px!important;
  box-shadow:none!important;
  font-size:12px!important
 }
 html.p8-phone-mode :is(#content,#projectTabContent) :is(input,textarea)::placeholder{
  color:#bccfdd!important;
  -webkit-text-fill-color:#bccfdd!important;
  opacity:1!important
 }
 html.p8-phone-mode :is(#content,#projectTabContent) :is(option,optgroup){
  background:#12344e!important;
  color:#f5faff!important
 }

 /* Bring back the navy executive home and quick-entry style consistently. */
 html.p8-phone-mode .p8-workspace-metrics button,
 html.p8-phone-mode .p8-workspace-shortcuts button,
 html.p8-phone-mode .p8-workspace-module-list,
 html.p8-phone-mode .p8-workspace-module-list button,
 html.p8-phone-mode .p8-workspace-progress-list,
 html.p8-phone-mode .p8-workspace-progress-list button,
 html.p8-phone-mode .p8-workspace-recent-list,
 html.p8-phone-mode .p8-workspace-recent-list button{
  background:#102f49!important;
  border-color:#31546d!important;
  color:#f0f6fb!important;
  box-shadow:none!important
 }
 html.p8-phone-mode .p8-workspace-page :is(.p8-workspace-metrics,.p8-workspace-shortcuts,.p8-workspace-module-list,.p8-workspace-progress-list,.p8-workspace-recent-list) :is(strong,small,span,b){
  color:#e1eef6!important
 }
 html.p8-phone-mode .p8-workspace-module-icon,
 html.p8-phone-mode .p8-workspace-quick-icon{
  background:#1c4a65!important;
  color:#f6faff!important
 }
 html.p8-phone-mode .p8-workspace-chevron{
  color:#b7ccda!important
 }

 /* The final mobile request removed the Refresh, initials and History controls. */
 html.p8-phone-mode #cloudRefreshBtn,
 html.p8-phone-mode #cloudUser,
 html.p8-phone-mode .p8-search-user,
 html.p8-phone-mode .p8-header-avatar,
 html.p8-phone-mode .p9-history-action,
 html.p8-phone-mode #p9MobileHistory,
 html.p8-phone-mode .p9-mobile-history{
  display:none!important
 }
}
@media screen and (prefers-reduced-motion:reduce){
 html.p8-phone-mode .p8-header-sync-wheel{animation:none!important}
}
