/* Shared navigation and small-screen layout. Loaded after page styles. */
.gms-topbar{position:fixed;inset:0 0 auto;z-index:950;min-height:58px;display:flex;align-items:center;gap:12px;padding:7px max(12px,env(safe-area-inset-left));background:#fff;color:#172434;border-bottom:1px solid #e2e8f0;box-shadow:0 2px 8px #1824340a;font-family:system-ui,sans-serif;box-sizing:border-box}
body{padding-top:60px!important}
.gms-topbar a,.gms-topbar button,.gms-menu a,.gms-menu button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;border-radius:10px;text-decoration:none;font:600 15px system-ui,sans-serif;cursor:pointer;box-sizing:border-box}
.gms-topbar a{color:#b84412;background:#fff3eb}.gms-topbar button{background:#f1f5f9;color:#172434;border:1px solid #d7e0e9}.gms-page-name{flex:1;min-width:0;font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gms-topbar :focus-visible,.gms-menu :focus-visible{outline:3px solid #176dd0;outline-offset:2px}
.gms-menu{inset:0;margin:auto;border:0;border-radius:18px;padding:20px;width:min(480px,calc(100% - 24px));max-height:calc(100dvh - 32px);overflow:auto;background:white;color:#172434;font-family:system-ui,sans-serif}.gms-menu::backdrop{background:#14233399}.gms-menu-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.gms-menu-heading h2{font-size:20px;margin:0}.gms-menu-heading button{border:0;background:#f1f5f9;color:#172434}.gms-menu nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.gms-menu a{justify-content:flex-start;border:1px solid #dbe3ec;color:#243346;background:#f8fafc}.gms-menu a[aria-current=page]{border-color:#e95b20;background:#fff2e9;color:#ac3d0d}
@media screen and (max-width:768px){
 html{width:100%;scroll-padding-top:72px}body{width:100%;min-width:0!important}*,*::before,*::after{box-sizing:border-box}img,video,canvas{max-width:100%}
 .container,.dashboard-container,.main-content,.content,.page-container,.checkout-container{width:auto!important;max-width:100%!important;min-width:0!important;margin:12px!important;padding:12px!important}
 .header{gap:10px!important;padding:12px!important;flex-wrap:wrap!important;max-width:100%}.header-left,.header-actions,.user-info,.toolbar,.search-container,.filters,.filter-row,.actions-bar,.search-bar{min-width:0!important;max-width:100%;flex-wrap:wrap!important;gap:8px!important}.header-left{flex:1!important}.header .logo,.header h1{font-size:19px!important;overflow-wrap:anywhere}.header-actions>*{margin:0!important}
 .hamburger-menu-btn,.mobile-nav-toggle{display:none!important}
 .dashboard-grid,.stats-grid,.stat-grid,.charts-grid,.chart-grid,.settings-grid,.form-grid,.form-row,.dashboard-sections,.plans-container,.dashboard-charts,[style*="grid-template-columns"]{grid-template-columns:minmax(0,1fr)!important}
 .form-row{flex-direction:column!important}.form-group,.card,.stat-card,.chart-card,.section,.panel{min-width:0!important;max-width:100%!important}.form-group{width:100%!important}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important;max-width:100%;min-width:0!important;min-height:44px}.search-container input,.search-bar input{width:100%!important;flex-basis:100%!important}
 button,.btn,.action-btn{min-height:44px;white-space:normal;touch-action:manipulation}.actions,.action-buttons,.action-btns{flex-wrap:wrap!important;gap:8px!important}
 .modal-content,.modal-dialog,.profile-modal-content,.notification-dropdown{width:calc(100% - 24px)!important;max-width:calc(100vw - 24px)!important;min-width:0!important;max-height:calc(100dvh - 32px)!important;overflow-y:auto!important;margin:12px auto!important;padding:16px!important}.modal-body{padding:12px!important}.tabs,.tab-buttons,.tabs-container{display:flex!important;max-width:100%;overflow-x:auto;flex-wrap:nowrap!important}.tabs>*{flex-shrink:0}
 table.gms-record-table{display:block!important;width:100%!important;min-width:0!important;table-layout:auto!important;border:0!important;overflow:visible!important}table.gms-record-table thead{display:none!important}table.gms-record-table tbody{display:block!important;width:100%!important}table.gms-record-table tbody tr{display:block!important;width:100%!important;margin:0 0 14px;padding:12px;border:1px solid #dce4ec;border-radius:14px;background:#fff;box-shadow:0 2px 6px #18243408}table.gms-record-table tbody td{display:flex!important;align-items:center;justify-content:space-between;gap:12px;width:100%!important;min-width:0!important;padding:9px 0!important;border:0!important;white-space:normal!important;text-align:start!important;overflow-wrap:anywhere}table.gms-record-table td::before{content:attr(data-gms-label)!important;position:static!important;display:block!important;flex:0 0 32%;font-size:12px;color:#58677a;font-weight:600;text-align:start!important}table.gms-record-table td[colspan]::before{display:none!important}table.gms-record-table td>div{min-width:0;max-width:100%}table.gms-record-table td button{min-width:58px;padding:9px!important;margin:2px!important}table.gms-record-table td .actions{display:flex!important;flex-wrap:wrap!important}.gms-record-table+.mobile-card-view{display:none!important}.table-container,.table-wrapper{overflow:visible!important;max-width:100%;min-width:0!important}
 h1{font-size:25px!important}h2{font-size:21px!important}.gms-menu nav{grid-template-columns:repeat(2,minmax(0,1fr))!important}.gms-topbar .gms-page-name{font-size:13px}.gms-menu a{font-size:14px;padding:10px}
}
@media print{body{padding-top:0!important}.gms-topbar,.gms-menu{display:none!important}}

@media screen and (max-width:768px){
 .header{top:58px!important}.header-content,.user-menu{flex-wrap:wrap!important;gap:8px!important;min-width:0;max-width:100%}.header-content{justify-content:flex-start!important}.header-content .logo{flex-basis:100%}.user-menu{width:100%}
 .reports-grid,.reports-container,.filters-grid{grid-template-columns:minmax(0,1fr)!important}.report-card{width:100%!important;min-width:0!important}.report-header{gap:8px;flex-wrap:wrap}.report-header h2{min-width:0}
 .pagination,.search-filters,.filters-section,.search-section{flex-wrap:wrap!important;min-width:0;max-width:100%}.search-section>div{flex-wrap:wrap!important;min-width:0;max-width:100%}.search-section button{min-width:0!important}
 #customersTableContainer{display:block!important}.mobile-customer-list{display:none!important}.scroll-hint{display:none!important}
 .mobile-invoice-cards{display:none!important}.table-container{display:block!important}
 .modal-content[style],.modal-content .form-row{min-width:0!important}
}

@media screen and (max-width:768px){
 [style*="display: flex"]{flex-wrap:wrap!important;min-width:0!important;max-width:100%}
 .filters{flex-direction:column!important;align-items:stretch!important}.filters>input,.filters>select,.filters>button{width:100%!important;flex:auto!important}
}

@media screen and (max-width:768px){.customers-table,.invoices-table{display:block!important}}

@media screen and (max-width:768px){.jobs-table,.expenses-table{display:block!important}.mobile-jobs-list,.mobile-expenses-list,.mobile-payments-list,.mobile-inventory-list{display:none!important}}

@media screen and (max-width:768px){
 .header{position:relative!important;top:auto!important}.customers-table::after{display:none!important}
 table.gms-record-table td{min-height:0!important}table.gms-record-table button{height:44px!important;min-height:44px!important}.gms-record-actions{flex-direction:column!important;align-items:stretch!important}.gms-record-actions::before{flex-basis:auto!important}.gms-record-actions>div{width:100%!important;align-items:center!important;min-height:0!important}table.gms-record-table td:first-child::before{display:none!important}table.gms-record-table td:first-child{justify-content:flex-start!important;font-weight:600}
 .search-bar .btn{min-height:44px!important;color:#fff}.search-bar .btn-secondary{background:#e7edf4!important;color:#23344b!important}
}

/* A single application header; retain account and page controls in its actions menu. */
.gms-merged-header{display:none!important}
.gms-page-tools{position:relative;flex:0 0 auto;color:#172434}
.gms-page-tools summary{display:flex;align-items:center;justify-content:center;list-style:none;cursor:pointer;width:44px;height:44px;border:1px solid #d7e0e9;border-radius:10px;background:#f1f5f9;font-weight:700;font-size:20px}
.gms-page-tools summary::-webkit-details-marker{display:none}
.gms-tools-panel{position:absolute;top:calc(100% + 10px);right:0;width:min(300px,calc(100vw - 24px));padding:14px;background:#fff;border:1px solid #dbe3ec;border-radius:14px;box-shadow:0 8px 28px #14233326}
.gms-tools-panel .user-menu,.gms-tools-panel .user-info,.gms-tools-panel .header-actions{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:10px!important;width:100%!important;color:#172434!important}
.gms-tools-panel i{color:inherit!important}.gms-tools-panel button{color:#172434!important;background:#f1f5f9!important;margin:0!important;height:auto;min-height:44px!important}.gms-tools-panel .dropdown-menu{right:0!important;left:auto!important;color:#172434}.gms-tools-panel .notification-dropdown{right:0!important;width:min(300px,calc(100vw - 40px))!important}
.gms-page-tools summary:focus-visible{outline:3px solid #176dd0;outline-offset:2px}
@media screen and (max-width:768px){.gms-topbar{gap:8px}.gms-topbar>a,.gms-topbar>button{padding:10px}.gms-tools-panel .user-menu{width:100%!important}.gms-merged-header{display:none!important}}
@media print{.gms-merged-header{display:none!important}}

.gms-tools-panel .header-dropdown{width:100%;position:static!important}
.gms-tools-panel .dropdown-toggle{display:none!important}
.gms-tools-panel .dropdown-menu{display:block!important;position:static!important;min-width:0!important;width:100%!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important}
.gms-tools-panel .dropdown-item{width:100%;margin-bottom:6px!important;justify-content:flex-start!important;color:#172434!important}
.gms-tools-panel .notification-bell{position:static!important}

/* Keep Urdu controls readable and account panels inside the viewport. */
html[lang="ur"] body{font-family:"Segoe UI",Tahoma,Arial,sans-serif}
html[dir="rtl"] .gms-tools-panel{right:auto;left:0}
html[dir="rtl"] .gms-menu a{justify-content:flex-start;text-align:start}
html[dir="rtl"] .gms-tools-panel .dropdown-item{text-align:start}
@media screen and (max-width:768px){html[dir="rtl"] table.gms-record-table td::before{text-align:start}}
.search-bar .btn-secondary{background:#e7edf4!important;color:#23344b!important}
.gms-menu-language{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0}
.gms-menu-language select{min-height:44px;padding:8px;border:1px solid #d7e0e9;border-radius:8px;background:#fff;color:#172434;font:inherit;width:auto}
