/* YJG CRM / A1 mobile unified: desktop untouched, original controls and live data retained. */
@media (max-width:860px){
  .main>header.yjg-compact-header{position:sticky;top:0;z-index:1000;display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:9px!important;min-height:56px!important;padding:7px 13px!important;padding-top:max(7px,env(safe-area-inset-top))!important;background:#fff!important;box-shadow:0 2px 10px #102c4c0c;border-bottom:1px solid #e0e8f2;}
  .main>header.yjg-compact-header #yjg-mobile-menu{width:39px;height:39px;min-height:39px;flex:none;font-size:20px;}
  .main>header.yjg-compact-header>div:first-of-type{flex:1 1 auto!important;min-width:0!important;width:auto!important;}
  .main>header.yjg-compact-header #headTitle{display:block;font-size:17px!important;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .main>header.yjg-compact-header .actions{flex:0 0 auto!important;width:auto!important;min-width:0!important;display:flex!important;gap:6px!important;justify-content:flex-end!important;}
  .yjg-head-refresh,.yjg-account-toggle{display:inline-flex;align-items:center;justify-content:center;width:39px;height:39px;min-height:39px!important;padding:0!important;border:1px solid #dce6f0;border-radius:10px;background:#edf3fa;color:#234c70;font-size:21px;cursor:pointer;}
  .yjg-head-refresh .yjg-hide-text{display:none;}
  .yjg-head-refresh:disabled{opacity:.6;}
  .yjg-account-menu{position:relative;flex:none;}
  .yjg-account-popover{position:absolute;right:0;top:calc(100% + 10px);width:min(270px,86vw);padding:13px;background:#fff;border:1px solid #dbe5ef;border-radius:13px;box-shadow:0 12px 35px #142c4830;z-index:1500;display:flex;flex-direction:column;gap:12px;}
  .yjg-account-popover[hidden]{display:none!important;}
  .yjg-account-popover #cloudIdentity{max-width:none!important;white-space:normal!important;overflow-wrap:anywhere;font-size:14px;display:block;}
  .yjg-account-popover .yjg-logout-button{display:block;width:100%;min-height:43px!important;text-align:center;}
  #cloudNotice.yjg-info-notice{display:none!important;}
  #view>.topline{align-items:center;gap:10px;}
  #view>.topline>div:first-child{flex:1;min-width:0;}
  #view>.topline h1{font-size:20px;line-height:1.3;}
  #view>.topline>.btn,#view>.topline>button{flex:none;min-height:40px;padding:9px 12px;}
  #view>.toolbar input.field{width:100%;min-height:45px;}
  #view .tablewrap.yjg-mobile-card-list{overflow:visible!important;background:transparent!important;box-shadow:none!important;border:0!important;border-radius:0!important;min-width:0!important;}
  #view .tablewrap.yjg-mobile-card-list>table{display:block!important;width:100%!important;min-width:0!important;table-layout:auto!important;border:0!important;}
  #view .tablewrap.yjg-mobile-card-list>table>thead{display:none!important;}
  #view .tablewrap.yjg-mobile-card-list>table>tbody{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;width:100%!important;}
  #view .tablewrap.yjg-mobile-card-list>table>tbody>tr{display:flex!important;flex-direction:column!important;gap:8px!important;min-width:0!important;width:100%!important;padding:15px!important;border:1px solid #dde7f0!important;border-radius:14px!important;background:#fff!important;box-shadow:0 3px 12px #102c4c0a!important;}
  #view .tablewrap.yjg-mobile-card-list>table>tbody>tr>td{display:grid!important;grid-template-columns:minmax(76px,30%) minmax(0,1fr)!important;align-items:start!important;gap:9px!important;width:100%!important;min-width:0!important;min-height:0!important;max-width:none!important;padding:0!important;border:0!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;font-size:14px!important;line-height:1.5!important;}
  #view .tablewrap.yjg-mobile-card-list>table>tbody>tr>td::before{content:attr(data-yjg-label);color:#718397;font-size:12px;font-weight:650;line-height:1.8;min-width:0;}
  #view .tablewrap.yjg-mobile-card-list>table>tbody>tr>td.yjg-card-primary{display:block!important;padding:0 0 7px!important;border-bottom:1px solid #edf1f6!important;color:#1c3852;font-size:16px!important;font-weight:800!important;line-height:1.45!important;}
  #view .tablewrap.yjg-mobile-card-list>table>tbody>tr>td.yjg-card-primary::before{display:block!important;font-size:11px!important;line-height:1.35!important;font-weight:600!important;margin-bottom:3px!important;}
  #view .tablewrap.yjg-mobile-card-list>table>tbody>tr>td.yjg-card-action{display:flex!important;justify-content:flex-end!important;gap:9px!important;align-items:center!important;border-top:1px solid #edf1f6!important;padding-top:10px!important;margin-top:2px!important;flex-wrap:wrap!important;}
  #view .tablewrap.yjg-mobile-card-list>table>tbody>tr>td.yjg-card-action::before{display:none!important;}
  #view .tablewrap.yjg-mobile-card-list>table>tbody>tr>td.yjg-card-action .btn{min-height:39px!important;}
  #view .tablewrap.yjg-mobile-card-list>table>tbody>tr>td.yjg-card-extra{display:none!important;}
  #view .tablewrap.yjg-mobile-card-list>table>tbody>tr.yjg-card-expanded>td.yjg-card-extra{display:grid!important;}
  #view .tablewrap.yjg-mobile-card-list>table>tbody>tr>td.yjg-card-empty{display:block!important;font-weight:400!important;color:#718397!important;text-align:center!important;}
  #view .tablewrap.yjg-mobile-card-list>table>tbody>tr>td.yjg-card-empty::before{display:none!important;}
  .yjg-card-expander{align-self:flex-start;display:inline-flex;align-items:center;gap:5px;border:0;background:#f0f5fa;color:#225781;padding:6px 10px;border-radius:8px;font-size:12px;font-weight:700;min-height:32px;cursor:pointer;}
  #view .tablewrap.yjg-mobile-card-list .pill{white-space:normal!important;display:inline-block!important;max-width:max-content;}
  #view .tablewrap.yjg-mobile-card-list a,#view .tablewrap.yjg-mobile-card-list button{overflow-wrap:anywhere;word-break:normal;}
  #view .tablewrap.yjg-mobile-card-list input,#view .tablewrap.yjg-mobile-card-list select{max-width:100%;min-width:0;}
  #view .tablewrap.yjg-mobile-card-list td.yjg-card-no-label::before{display:none!important;}
  #modalRoot .modal h2{font-size:20px;line-height:1.35;}
  #modalRoot .formgrid{gap:15px!important;}
  #modalRoot .formgrid>label{min-width:0;gap:7px!important;}
  #modalRoot .formgrid input,#modalRoot .formgrid select,#modalRoot .formgrid textarea{min-height:45px;}
  #modalRoot .modal .actions,#modalRoot .modal .toolbar{gap:9px;}
}
@media (max-width:420px){#view .tablewrap.yjg-mobile-card-list>table>tbody>tr>td{grid-template-columns:minmax(65px,29%) minmax(0,1fr)!important;}}
@media (min-width:861px){.yjg-head-refresh,.yjg-account-menu,.yjg-card-expander{display:none!important;}}
