/* TWA V31.33 — Super Admin mobile and tablet layout refinements, visual only. */
@media screen and (max-width: 800px){
  html{overflow-x:clip;-webkit-text-size-adjust:100%}
  body{max-width:100%;overflow-x:clip;background:linear-gradient(180deg,#f7fafb,#edf4f5)}
  .top{
    position:sticky;top:0;z-index:14;
    min-height:69px;
    padding:10px 14px;
    background:rgba(255,255,255,.97);
    backdrop-filter:blur(18px);
    box-shadow:0 6px 18px rgba(18,55,66,.055);
  }
  .owner-mobile-menu{width:44px;height:44px;border-radius:14px}
  .topbrand{min-width:0;gap:10px}
  .topbrand .lo{border-radius:13px;height:43px;width:43px;min-width:43px}
  .topbrand strong{font-size:14px;line-height:1.2}
  .topbrand small{font-size:9px;letter-spacing:.07em}
  .top nav{gap:7px;flex:0 0 auto}
  .top nav .quiet{border-radius:12px;min-height:42px}
  .owner-main{min-width:0;max-width:100%;width:100%;padding:18px 15px 40px}
  .owner-layout{max-width:100%;min-width:0}
  .owner-sidebar{
    background:linear-gradient(158deg,#102c40,#124a54)!important;
    border-radius:0 20px 20px 0;
    box-shadow:15px 0 40px rgba(8,32,47,.25);
  }
  .owner-nav button{min-height:49px;padding:12px 14px;border-radius:13px}
  .owner-nav button.selected{background:#157c78;box-shadow:inset 3px 0 #f2ce7d}
  .owner-context{
    display:flex;flex-wrap:wrap;align-items:stretch;gap:12px;
    border-radius:19px;padding:17px;
    background:#fff;
    box-shadow:0 9px 24px rgba(15,59,68,.045);
  }
  .owner-context-copy{flex:1 1 100%}
  .owner-context-copy strong{font-size:17px;color:#193d48}
  .owner-context select{flex:1 1 230px;max-width:100%;min-width:0}
  .owner-context #new-school{flex:1 1 170px}
  .owner-page .page-intro{
    padding:23px 20px!important;border-radius:20px;
    background:linear-gradient(115deg,#10384e,#107d7a);
    box-shadow:0 16px 30px rgba(12,65,76,.12);
  }
  .owner-page .page-intro h1{font-size:clamp(23px,5.6vw,29px);line-height:1.16;letter-spacing:-.04em}
  .owner-page .page-intro p{font-size:13px;line-height:1.6}
  .owner-page .card,.owner-page .stat,.owner-route-card,.owner-quick{
    border-radius:18px;
    border-color:#d9e6e7;
    box-shadow:0 11px 25px rgba(15,57,68,.045);
  }
  .owner-page .card{padding:19px 17px}
  .owner-page .card h2{font-size:19px}
  .owner-page .card h3{font-size:17px}
  .owner-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
  .owner-quick{gap:6px 10px;padding:17px}
  .owner-quick strong{font-size:15px;line-height:1.3}
  .owner-quick small{font-size:12px;line-height:1.5}
  .owner-route-grid{gap:11px}
  .owner-route-card{min-height:95px;padding:17px}
  .owner-route-card strong{font-size:15px}
  .owner-route-card small{font-size:12px;line-height:1.5}
  .owner-page :is(input,select,textarea){min-height:47px;border-radius:13px;font-size:16px;max-width:100%}
  .owner-page label{font-size:12px}
  .owner-page :is(.primary,.secondary,.quiet,.link-button){min-height:44px;border-radius:13px}
  .owner-page .owner-subtabs{max-width:100%;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin}
  .owner-page .owner-subtabs button{flex:0 0 auto;white-space:nowrap;min-height:43px}
  .owner-page :is(.table-wrap,.owner-table-wrap,.pdf-library-table-wrap){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .owner-page :is(.table-wrap,.owner-table-wrap) table{min-width:max-content}
  .owner-page :is(.item,.owner-staff-card,.owner-support-item){min-width:0}
  .owner-page :is(.item,.owner-staff-card,.owner-support-item) :is(strong,span,small,p){overflow-wrap:anywhere}
}

@media screen and (max-width: 600px){
  .top{padding:10px 12px;gap:8px}
  .topbrand strong{font-size:13px}
  .topbrand small{font-size:8px;letter-spacing:.02em}
  .top nav a,.top nav #refresh{display:none}
  .top nav #logout{padding:9px 11px;min-height:41px;white-space:nowrap;font-size:12px}
  .owner-main{padding:16px 13px 34px}
  .owner-context{margin-bottom:15px;padding:16px}
  .owner-context #new-school{
    display:inline-flex!important;flex:1 1 100%;width:100%!important;
    justify-content:center;align-items:center;min-height:46px;
  }
  .owner-context select{flex:1 1 100%;width:100%;min-height:48px}
  .owner-page .page-intro{padding:21px 19px!important;margin-bottom:14px}
  .owner-page .page-intro h1{font-size:25px}
  .owner-page .page-intro .eyebrow-dark{font-size:10px}
  .owner-page .stats{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px;margin-bottom:15px;
  }
  .owner-page .stat{
    min-height:104px;padding:16px 15px;border-radius:16px;
    background:linear-gradient(180deg,#fff,#fbfefd);
  }
  .owner-page .stat:nth-child(3){grid-column:1/-1;min-height:86px}
  .owner-page .stat span{font-size:12px;line-height:1.3}
  .owner-page .stat strong{font-size:28px;margin-top:7px}
  .owner-quick-grid{grid-template-columns:minmax(0,1fr)!important;gap:10px}
  .owner-quick{
    min-height:86px;display:grid;grid-template-columns:46px minmax(0,1fr);
    align-items:center;gap:4px 12px;padding:16px;
  }
  .owner-quick>span{
    grid-row:span 2;width:46px;height:46px;border-radius:14px;
  }
  .owner-quick strong{font-size:15px}
  .owner-quick small{font-size:12px}
  .owner-page .card{padding:18px 16px;margin-bottom:15px}
  .owner-route-grid,.owner-school-action-grid,.owner-school-detail-actions{
    grid-template-columns:minmax(0,1fr)!important;gap:10px;
  }
  .owner-route-card{min-height:94px;padding:16px}
  .owner-overview-actions,.owner-school-utility-buttons,.staff-action-bar,.owner-item-actions{
    display:flex;flex-wrap:wrap;gap:9px;
  }
  .owner-overview-actions > button,
  .owner-school-utility-buttons > button,
  .staff-action-bar > button,
  .owner-item-actions > button{flex:1 1 100%;min-height:45px}
  .owner-page :is(.duo,.two-cols,.form-row,.inline-form){
    grid-template-columns:minmax(0,1fr)!important;
  }
  .owner-page .school-list .item{padding:15px 14px;flex-wrap:wrap;align-items:flex-start}
  .owner-page .school-list .item .item-actions{flex:1 1 100%}
  .owner-page .school-list .item .item-actions button{flex:1 1 100%}
  .owner-page .owner-staff-card{padding:15px 13px}
  .staff-action-bar{margin-top:13px}
  .twa-app-platform-grid,.owner-page .app-grid,.twa-pwabuilder-steps{grid-template-columns:minmax(0,1fr)!important}
  .twa-app-share-row{flex-direction:column;align-items:stretch}
  .twa-app-share-row button{min-height:45px}
  .owner-page .owner-help-card p{line-height:1.6}
  .owner-page .owner-subtabs{padding-bottom:9px}
  .owner-page .owner-subtabs button{flex:0 0 auto!important}
  .login-back{min-height:100dvh;padding:18px 12px;display:flex;align-items:center;justify-content:center}
  .login{width:100%;max-width:460px;border-radius:24px;padding:26px 21px}
  .login .lo{width:59px;height:59px;border-radius:17px;margin:0 auto 18px;display:grid;place-items:center}
  .login h1{text-align:center;font-size:28px;line-height:1.14;letter-spacing:-.04em}
  .login > p{text-align:center;font-size:13px;line-height:1.6}
  .login label{font-size:12px;gap:7px}
  .login input{min-height:49px;font-size:16px;border-radius:12px}
  .login button.primary{min-height:49px;font-size:14px}
  .login .plain-link{text-align:center;justify-self:center}
}

@media screen and (max-width: 370px){
  .topbrand .lo{width:38px;height:38px;min-width:38px}
  .topbrand small{display:none}
  .topbrand strong{max-width:130px;line-height:1.2}
  .owner-main{padding-inline:11px}
  .owner-page .stat{padding:14px 11px}
}

@media (prefers-reduced-motion:reduce){
  .owner-quick,.owner-route-card,.owner-nav button{transition:none!important}
}
