/* Global responsive layer. Loaded last so it can safely normalize every page. */
html{max-width:100%;overflow-x:hidden}body{max-width:100%;overflow-x:hidden}img,svg,video,canvas{max-width:100%;height:auto}.content-wrap>*{min-width:0}.row>*{min-width:0}.two-col>*,.three-col>*,.dashboard-grid>*,.metric-grid>*,.permission-grid>*{min-width:0}.single-form{width:100%}.code-value,.entity-cell strong,.table td,.table th{overflow-wrap:anywhere}.mobile-nav-toggle{display:none;width:42px;height:42px;flex:0 0 42px;border:1px solid rgba(255,255,255,.18);border-radius:12px;background:rgba(255,255,255,.08);color:#fff;place-items:center;cursor:pointer}.mobile-nav-toggle>span:first-child,.mobile-nav-toggle>span:first-child:before,.mobile-nav-toggle>span:first-child:after{display:block;width:20px;height:2px;border-radius:2px;background:currentColor;transition:transform .2s,opacity .2s}.mobile-nav-toggle>span:first-child{position:relative}.mobile-nav-toggle>span:first-child:before,.mobile-nav-toggle>span:first-child:after{content:"";position:absolute;right:0}.mobile-nav-toggle>span:first-child:before{top:-6px}.mobile-nav-toggle>span:first-child:after{top:6px}.app-header.mobile-nav-open .mobile-nav-toggle>span:first-child{background:transparent}.app-header.mobile-nav-open .mobile-nav-toggle>span:first-child:before{top:0;transform:rotate(45deg)}.app-header.mobile-nav-open .mobile-nav-toggle>span:first-child:after{top:0;transform:rotate(-45deg)}.table-wrap,.responsive-table-shell{max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;scrollbar-width:thin}.responsive-table-shell{border:1px solid var(--line);border-radius:15px}.responsive-table-shell>.table{margin:0}.table-scrollable{position:relative}.table-scrollable:focus-visible{outline:3px solid rgba(79,124,255,.35);outline-offset:2px}.form-control,.form-select,.input-group,.search-field,.searchable-select{max-width:100%}.modal-dialog{max-width:min(96vw,var(--bs-modal-width,500px))}.page-head h1,.dashboard-hero h1{overflow-wrap:anywhere}.actions,.form-actions,.hero-actions,.chart-card-actions{max-width:100%}

@media (max-width: 1100px){.content-wrap{width:100%}.two-col,.three-col{grid-template-columns:minmax(0,1fr)!important}.contract-upload{grid-template-columns:minmax(0,1fr)!important}.notifications-layout,.customers-layout{grid-template-columns:minmax(0,1fr)!important}}

@media (max-width: 900px){body.mobile-nav-active{overflow:hidden}.app-header{position:sticky;top:0}.header-inner{min-height:66px;padding:8px 14px;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.header-brand{flex:1 1 auto;min-width:0}.mobile-nav-toggle{display:grid;order:2}.theme-toggle{order:3}.alert-menu{order:4}.top-nav{display:none;order:10;flex:1 0 100%;width:100%;max-height:calc(100dvh - 138px);padding:8px 0 12px;overflow-x:hidden;overflow-y:auto;align-items:stretch;flex-direction:column;border-top:1px solid rgba(255,255,255,.1)}.app-header.mobile-nav-open .top-nav{display:flex}.top-nav>a,.nav-group>summary{width:100%;padding:12px 13px;font-size:14px}.nav-group{width:100%}.nav-group>.nav-dropdown{position:static!important;inset:auto!important;width:100%;min-width:0;max-height:none;margin:3px 0 7px;padding:6px;background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.1);box-shadow:none}.nav-group>.nav-dropdown a{color:#e4ebf8}.nav-group>.nav-dropdown a:hover,.nav-group>.nav-dropdown a.active{background:rgba(255,255,255,.1);color:#fff}.user-menu{display:none;order:11;width:100%;margin:0;border-top:1px solid rgba(255,255,255,.1)}.app-header.mobile-nav-open .user-menu{display:block}.user-menu>summary{width:100%;padding:12px 13px}.user-menu>.nav-dropdown{position:static!important;width:100%;margin-top:3px;background:var(--surface);box-shadow:none}.alert-dropdown{position:fixed;top:72px;right:10px;left:10px;width:auto;max-height:calc(100dvh - 90px)}.content-wrap{padding:18px}.page-head{align-items:flex-start}.page-head,.section-heading,.summary-strip{flex-wrap:wrap}.dashboard-grid,.charts-grid,.two-col,.three-col{grid-template-columns:minmax(0,1fr)!important}.filter-bar{align-items:stretch}.filter-bar>*{flex:1 1 220px}.search-field{min-width:0}.permission-row{grid-template-columns:minmax(0,1fr) auto auto}.professional-table{min-width:760px}.compact-table{min-width:560px}.form-actions,.actions{align-items:stretch}.inline-payment form.actions{width:100%}.inline-payment form.actions>*{flex:1 1 150px}.schedule-tabs{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}.schedule-tabs a{flex:0 0 auto}.dashboard-hero{padding:24px}.auth-main .content-wrap{width:min(100%,520px);padding:16px}}

@media (max-width: 650px){.header-inner{padding-inline:max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-right))}.header-brand strong{font-size:14px}.header-brand small{font-size:10px}.content-wrap{padding:12px max(10px,env(safe-area-inset-left)) calc(18px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-right))}.page-head{gap:12px;margin-bottom:16px}.page-head h1{font-size:clamp(23px,8vw,30px)}.page-head p{font-size:13px}.page-head>.actions,.page-head>.btn,.page-head>a.btn{width:100%}.page-head>.actions .btn,.page-head>.btn,.page-head>a.btn{min-height:44px}.card-panel{padding:14px;border-radius:15px}.section-heading{gap:10px;margin-bottom:14px}.section-heading .mini-link{white-space:normal}.section-title{font-size:17px}.dashboard-hero{padding:21px 17px;border-radius:17px}.dashboard-hero p{font-size:13px}.hero-actions{width:100%}.hero-actions .btn{flex:1 1 130px}.metric{min-height:104px;padding:17px}.metric strong{font-size:24px}.filter-bar{display:grid;grid-template-columns:minmax(0,1fr);gap:9px;padding:10px}.filter-bar>*{width:100%;min-width:0!important}.filter-bar .btn{min-height:44px}.form-control,.form-select,.searchable-select-trigger{font-size:16px}.input-group{flex-wrap:wrap}.input-group>.form-control,.input-group>.form-select{width:100%;flex:1 0 100%}.input-group>.btn,.input-group>.input-group-text{flex:1 1 auto}.actions>*{max-width:100%}.actions .form-control,.actions .form-select{flex:1 1 100%;width:100%!important}.actions .btn{flex:1 1 auto;min-height:40px}.permission-row{grid-template-columns:minmax(0,1fr) auto;gap:9px}.permission-row>*:nth-child(n+3){grid-column:1/-1}.detail-list{grid-template-columns:minmax(0,1fr)}.empty{padding:24px 12px}.table-wrap,.responsive-table-shell{margin-inline:0}.professional-table{min-width:700px}.compact-table{min-width:520px}.table thead th,.table tbody td{padding:11px 10px}.modal-dialog{margin:10px auto}.modal-content{border-radius:15px}.server-overview{grid-template-columns:54px minmax(0,1fr) auto;padding:12px}.storage-ring{width:50px;height:50px}.server-stats{flex-direction:column;gap:2px}.training-activity{min-width:0}.training-activity>div{min-width:0}.contract-image-link{aspect-ratio:16/11}}

@media (max-width: 430px){.header-brand div{display:none}.header-brand{flex:1}.theme-toggle,.mobile-nav-toggle,.alert-menu>summary{width:40px;height:40px;flex-basis:40px}.content-wrap{padding-top:10px}.card-panel{padding:12px}.dashboard-metrics,.metric-grid,.customer-kpis,.account-balance-grid{gap:10px}.metric{min-height:98px}.page-head h1{font-size:24px}.btn{white-space:normal}.summary-strip{padding:11px}.summary-strip strong{font-size:16px}.contract-gallery{grid-template-columns:minmax(0,1fr)}.training-activity{grid-template-columns:44px minmax(0,1fr)}.training-activity em{grid-column:2}.alert-dropdown{top:66px}.professional-table{min-width:660px}}

@media (hover:none) and (pointer:coarse){a,button,summary,.btn,.form-check-input{touch-action:manipulation}.top-nav>a,.nav-group>summary,.nav-dropdown a,.nav-dropdown button{min-height:44px}.table-wrap,.responsive-table-shell{scroll-snap-type:x proximity}}

@media (orientation:landscape) and (max-height:520px){.top-nav{max-height:calc(100dvh - 72px)}.alert-dropdown{max-height:calc(100dvh - 78px);overflow:auto}}

/* Mobile tables become readable entity cards instead of compressed desktop columns. */
@media (max-width: 650px){.table-wrap:has(>.mobile-card-table),.responsive-table-shell:has(>.mobile-card-table){overflow:visible;border:0;background:transparent}.mobile-card-table,.mobile-card-table.professional-table,.mobile-card-table.compact-table{display:block;min-width:0!important;width:100%;table-layout:auto}.mobile-card-table>thead{display:none}.mobile-card-table>tbody{display:grid;width:100%;gap:12px}.mobile-card-table>tbody>tr{display:grid;width:100%;min-width:0;padding:5px 14px;background:var(--surface);border:1px solid var(--line);border-radius:15px;box-shadow:0 7px 22px rgba(19,34,56,.06);overflow:hidden}.mobile-card-table>tbody>tr:hover{background:var(--surface)}.mobile-card-table>tbody>tr.row-overdue{border-right:4px solid var(--danger)}.mobile-card-table>tbody>tr>td{display:grid;grid-template-columns:minmax(92px,36%) minmax(0,1fr);align-items:start;gap:10px;width:100%;min-width:0;min-height:44px;padding:11px 0!important;border:0!important;border-bottom:1px solid var(--line)!important;text-align:right!important;white-space:normal!important;overflow-wrap:normal;word-break:normal}.mobile-card-table>tbody>tr>td>*{min-width:0;max-width:100%}.mobile-card-table>tbody>tr>td:last-child{border-bottom:0!important}.mobile-card-table>tbody>tr>td:before{content:attr(data-label);display:block;color:var(--muted);font-size:11px;font-weight:800;line-height:1.55;white-space:normal}.mobile-card-table>tbody>tr>td[data-mobile-full="true"]{display:block;min-height:0;padding:18px 8px!important;text-align:center!important;border:0!important}.mobile-card-table>tbody>tr>td[data-mobile-full="true"]:before{display:none}.mobile-card-table .entity-cell{min-width:0}.mobile-card-table .code-value{direction:ltr;text-align:right!important;word-break:break-all}.mobile-card-table a,.mobile-card-table .badge{max-width:100%;overflow-wrap:anywhere;white-space:normal}.mobile-card-table .table-actions,.mobile-card-table .actions,.mobile-card-table form.d-flex{display:flex!important;flex-wrap:wrap;gap:7px;width:100%;min-width:0}.mobile-card-table .table-actions>*{flex:1 1 auto}.mobile-card-table form.d-flex>.form-control,.mobile-card-table form.d-flex>.form-select{flex:1 1 150px;width:100%!important;min-width:0}.mobile-card-table form.d-flex>.btn,.mobile-card-table .table-actions .btn{flex:1 1 auto;min-height:40px;white-space:normal}.mobile-card-table .soft-badge,.mobile-card-table .partner-badge,.mobile-card-table .danger-badge,.mobile-card-table .warning-badge,.mobile-card-table .status-dot{white-space:normal}.mobile-card-table td>small,.mobile-card-table td>.d-block{max-width:100%;overflow-wrap:anywhere}.mobile-card-table+.table-scroll-hint{display:none}}
