/* Phone and tablet layouts, independent of desktop authentication state. */
.mobile-heading,.mobile-actions-toggle,.nav-close,.mobile-nav-backdrop{display:none}
.main,.content,.card,.table-card,.table-wrap{min-width:0}
.modal-backdrop{z-index:50}.toast-zone{z-index:60}
@media(max-width:900px){
 html,body{max-width:100%;margin:0}
 .app{display:block;min-height:100svh}.main{width:100%;max-width:100%}
 .sidebar,html[dir="rtl"] .sidebar{position:fixed;inset-block:0;left:0;right:auto;width:min(288px,86vw);height:100vh;height:100dvh;padding:22px 16px;z-index:40;overflow-y:auto;overscroll-behavior:contain;transform:translateX(-103%);visibility:hidden;pointer-events:none;transition:transform .2s,visibility .2s}
 html[dir="rtl"] .sidebar{left:auto;right:0;transform:translateX(103%)}
 .sidebar.open,html[dir="rtl"] .sidebar.open{transform:translateX(0);visibility:visible;pointer-events:auto;box-shadow:0 0 40px #101b2a44}
 .nav-close{display:grid;place-items:center;width:44px;height:44px;border:1px solid #ffffff22;color:white;border-radius:12px;background:#ffffff0a;margin-inline-start:auto;margin-bottom:12px;font-size:26px}
 .sidebar .brand{padding-bottom:18px}.sidebar-logo{width:212px;height:84px}.nav button{min-height:48px;font-size:15px}
 .mobile-nav-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:35;border:0;background:#0b172366;backdrop-filter:blur(2px)}
 body.nav-open{overflow:hidden}
 .topbar{height:auto;min-height:70px;padding:10px 16px;padding-top:max(10px,env(safe-area-inset-top));position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;isolation:isolate;background:#fff;backdrop-filter:none;z-index:25}
 .crumb{display:flex;align-items:center;flex:none;font-size:0;gap:0}.crumb>b{display:none}
 .mobile-menu,.mobile-actions-toggle{display:grid;place-items:center;min-width:44px;width:44px;height:44px;min-height:44px;font-size:22px;border-radius:12px;color:#172b55;background:#f7f9fc}
 .mobile-heading{display:flex;min-width:0;flex:1;flex-direction:column;align-items:flex-start;gap:1px}.mobile-heading strong{font-family:Poppins,"Segoe UI",sans-serif;color:#07166b;font-size:15px;letter-spacing:-.02em;text-align:start}.mobile-heading span{font-size:12px;color:#718094}
 .mobile-actions-toggle{font-size:25px;line-height:1}
 .topbar .top-actions{display:none;position:absolute;inset-inline:12px;top:calc(100% + 6px);padding:12px;border:1px solid #e0e7ef;border-radius:16px;background:white;box-shadow:0 16px 42px #14283f22;max-height:calc(100dvh - 95px);overflow-y:auto}
 .topbar.actions-open .top-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .top-actions .btn,.top-actions .btn.small{width:100%;min-height:46px;justify-content:center;font-size:13px;padding:10px 8px;white-space:normal;line-height:1.45}
 .top-actions>.user-chip{display:none}
 .content{padding:22px 16px 32px;padding-bottom:max(32px,env(safe-area-inset-bottom));width:100%;max-width:100%;margin:0}
 .page-head{display:flex;flex-direction:column;align-items:stretch;gap:16px;margin-bottom:20px}.page-title{font-size:25px;line-height:1.4;margin:5px 0 7px}.page-description{font-size:14px;line-height:1.7}.eyebrow{font-size:10px;letter-spacing:.04em;line-height:1.5}
 .head-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;width:100%}.head-actions .btn{justify-content:center;width:100%;min-height:46px;font-size:13px;line-height:1.5;white-space:normal;padding:10px 8px}.head-actions>.btn:only-child{grid-column:1/-1}
 .kpi-grid,.health-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.kpi-grid>.kpi:last-child:nth-child(odd){grid-column:1/-1}
 .kpi{padding:16px;min-height:132px;border-radius:14px}.kpi-label{padding-inline-end:32px;font-size:12px;line-height:1.5;min-height:36px}.kpi-icon{left:auto;right:auto;inset-inline-end:12px;top:14px;width:27px;height:27px;border-radius:8px;font-size:13px}.kpi-value{font-size:28px;margin-top:6px;line-height:1.2}.kpi-foot{font-size:11px;line-height:1.6;margin-top:6px}
 .dashboard-grid{grid-template-columns:minmax(0,1fr);gap:16px}.card-head{padding:16px;gap:12px;align-items:flex-start}.card-title{font-size:15px;line-height:1.5}.card-hint{font-size:12px;line-height:1.6}.card-body{padding:16px}.card-head .text-btn{flex-shrink:0;font-size:12px;max-width:40%;min-height:32px;line-height:1.5}.funnel-row{grid-template-columns:85px minmax(0,1fr) 26px;font-size:12px;gap:9px}.funnel{gap:15px}.sector-row{font-size:13px}.sector-bar{width:65px}.sector-name{min-width:0}.health-card{padding:16px}.health-top{font-size:12px;align-items:flex-start;gap:8px}.health-foot{font-size:11px;line-height:1.6}.source-row{font-size:13px;line-height:1.7}.source-row b{flex-shrink:0}
 .table-card{overflow:hidden}.table-toolbar{padding:14px;display:flex;flex-direction:column;align-items:stretch;gap:12px}.toolbar-left{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;width:100%}.toolbar-right{display:flex;flex-wrap:wrap;gap:10px;width:100%;justify-content:space-between;align-items:center}.search-wrap{width:100%;min-width:0}.search,.filter{height:46px;min-height:46px;width:100%;max-width:none;font-size:16px;min-width:0}.filter{padding-inline:10px 30px}.search{padding-inline:34px 12px}.search-wrap::before{top:11px}.table-meta{font-size:12px}.toolbar-right .btn{min-height:44px;font-size:12px}.table-wrap{max-width:100%;width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
 .mobile-record-table{display:block;min-width:0;width:100%;border-collapse:separate}.mobile-record-table thead{display:none}.mobile-record-table tbody{display:grid;gap:12px;padding:12px}.mobile-record-table tr{display:grid;grid-template-columns:minmax(0,1fr);border:1px solid #e3e9f0;border-radius:13px;padding:5px 14px;background:#fff;overflow:hidden}.mobile-record-table td{display:grid;grid-template-columns:minmax(84px,.32fr) minmax(0,1fr);gap:10px;align-items:start;min-width:0;max-width:none!important;width:auto!important;padding:11px 0;border-bottom:1px solid #edf1f5;font-size:13px;overflow-wrap:anywhere}.mobile-record-table td:last-child{border-bottom:0}.mobile-record-table td::before{content:attr(data-label);font-size:11px;line-height:1.7;color:#718094;font-weight:600}.mobile-record-table .company-cell{min-width:0;align-items:flex-start;gap:8px}.mobile-record-table .company-cell>div:last-child{min-width:0}.mobile-record-table .company-name{max-width:none;white-space:normal;overflow:visible;text-overflow:clip;font-size:13px}.mobile-record-table .company-sub{font-size:11px;white-space:normal}.mobile-record-table .company-logo{width:29px;height:29px;flex-shrink:0}.mobile-record-table .row-actions{flex-wrap:wrap;gap:8px}.mobile-record-table .text-btn{min-height:36px;padding:5px 9px;border:1px solid #e1e8f1;border-radius:8px;font-size:12px}.mobile-record-table .stage-select{max-width:100%;font-size:16px;min-height:42px}.mobile-record-table .badge{width:fit-content;max-width:100%;white-space:normal;line-height:1.5}.mobile-record-table .score{flex-wrap:wrap}.mobile-record-table td a{overflow-wrap:anywhere}
 .quality-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.quality-actions .btn{justify-content:center;white-space:normal;min-height:46px;font-size:12px}.notice{font-size:12px;line-height:1.8}.empty-title{font-size:17px;line-height:1.6}.empty-copy{font-size:14px;line-height:1.8}.empty-icon{width:44px;height:44px}.card-body[style*="text-align:center"]{padding:24px 18px!important}.card-body[style*="text-align:center"]>.btn{min-height:46px;margin-bottom:8px}.card-body[style*="text-align:center"]>.text-btn{display:block;min-height:44px;margin:4px auto 0}
 .modal-backdrop{padding:0;align-items:flex-end}.modal,.modal.wide{width:100%;max-width:100%;max-height:94vh;max-height:94dvh;display:flex;flex-direction:column;overflow:hidden;border-radius:20px 20px 0 0}.modal-head{position:static;flex:none;padding:18px 18px 14px;gap:12px}.modal-title{font-size:18px;line-height:1.5}.modal-desc{font-size:12px;line-height:1.7}.close-btn{width:44px;height:44px;flex-shrink:0;font-size:23px}.modal-body{padding:18px;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}.modal-foot{flex:none;padding:14px 18px max(16px,env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e7edf3;gap:10px;flex-wrap:wrap}.modal-foot .btn{min-height:46px;justify-content:center}.form-grid{grid-template-columns:minmax(0,1fr);gap:16px}.field.full,.form-section{grid-column:auto}.field label{font-size:13px}.field input,.field select,.field textarea{font-size:16px;min-height:46px}.field textarea{min-height:100px}.field-hint{font-size:12px;line-height:1.7}.form-section{font-size:12px}.check-row{min-height:44px;font-size:13px;line-height:1.6}.import-steps{flex-wrap:wrap;gap:10px}.import-step{font-size:12px}.mapping-grid{grid-template-columns:minmax(0,1fr)}.mapping-item{grid-template-columns:minmax(0,1fr);gap:6px}.mapping-item label{font-size:12px}.mapping-item select{font-size:16px;min-height:44px;width:100%;max-width:100%}.upload-box{padding:22px 16px}.upload-box strong{font-size:14px}.upload-box span{font-size:12px;line-height:1.7}.preview-box{max-width:100%}.access-actions{display:grid;grid-template-columns:1fr}.toast-zone,html[dir="rtl"] .toast-zone{right:12px;left:12px;bottom:max(14px,env(safe-area-inset-bottom))}.toast{width:100%;max-width:none;font-size:13px;line-height:1.6}
 .cloud-gate{min-height:100vh;min-height:100svh;padding:18px 14px;place-items:start center;align-content:center}.cloud-card{padding:20px;width:min(430px,100%);min-width:0;max-width:100%;border-radius:20px}.cloud-card .cloud-language,html[dir="rtl"] .cloud-language{position:static;display:flex;width:fit-content;margin:0;margin-inline-start:auto;margin-bottom:4px;min-height:40px;padding:8px 12px}.cloud-logo{width:min(240px,100%);height:92px;margin:0 auto 12px;background-size:100% auto}.cloud-card h1.brand-title{font-size:26px;margin:8px 0 20px}.cloud-form{margin-top:0;gap:8px}.cloud-form label{font-size:13px}.cloud-form input{height:48px;font-size:16px;min-width:0;width:100%}.password-field{min-width:0}.password-toggle{min-width:68px;font-size:13px;top:4px;bottom:4px}.cloud-form .remember-login{min-height:44px;margin:2px 0;font-size:13px;line-height:1.5}.cloud-form .remember-login input{width:20px;height:20px;min-height:20px}.auth-help{font-size:12px;line-height:1.7}.cloud-buttons{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-top:4px}.cloud-buttons .btn,.passkey-login{min-height:48px;justify-content:center;font-size:14px;padding:11px;line-height:1.5;white-space:normal}.auth-divider{margin-block:8px}.cloud-message,.auth-error{font-size:13px;line-height:1.7}
}
@media(max-width:360px){.content{padding-inline:12px}.topbar{padding-inline:12px;gap:8px}.mobile-heading strong{font-size:13px}.kpi{padding:14px 12px}.kpi-label{font-size:11px}.kpi-icon{width:24px;height:24px;inset-inline-end:10px}.kpi-foot{font-size:10px}.mobile-record-table td{grid-template-columns:82px minmax(0,1fr)}.cloud-card{padding:18px}.cloud-logo{width:218px;height:84px}}
@media(max-width:900px){
 .mobile-record-table .mobile-cell-value{min-width:0;max-width:100%;overflow-wrap:anywhere}
 .mobile-record-table td:first-child{grid-template-columns:minmax(0,1fr);gap:5px}
 .mobile-record-table .pill{font-size:11px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
 .modal-foot>button[style*="visibility:hidden"]{display:none}
 .modal-foot>div{min-width:0;max-width:100%;flex-wrap:wrap;margin-inline-start:auto}
 body.modal-open{overflow:hidden}
}
