/* ASHISH V57 — Unified responsive system / mobile width hardening */
html,body{width:100%;max-width:100%;min-width:0;overflow-x:clip;}
*,*::before,*::after{box-sizing:border-box;}
img,svg,canvas,video,iframe{max-width:100%;}

/* Client portal */
body.ash-redesign-active #ashApp{width:100%;max-width:520px;margin-inline:auto;min-width:0;}
body.ash-redesign-active #ashApp>*{min-width:0;max-width:100%;}
body.ash-redesign-active .ash-container-inner{width:100%;max-width:100%;min-width:0;}
body.ash-redesign-active input,body.ash-redesign-active select,body.ash-redesign-active textarea,body.ash-redesign-active button{max-width:100%;}
@media (min-width:700px){body.ash-redesign-active #ashApp{max-width:720px;}}
@media (min-width:1024px){body.ash-redesign-active #ashApp{max-width:1080px;}}
@media (min-width:1440px){body.ash-redesign-active #ashApp{max-width:1240px;}}
@media (max-width:699px){
  body.ash-redesign-active #ashApp{max-width:100vw;}
  body.ash-redesign-active .ash-container-inner{padding-inline:clamp(10px,4vw,16px);}
  body.ash-redesign-active .ash-header-top{gap:6px;}
  body.ash-redesign-active .ash-brand-text{min-width:0;}
  body.ash-redesign-active .ash-brand-text strong{font-size:clamp(.82rem,3.7vw,1rem);}
  body.ash-redesign-active .ash-quick-stats{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.ash-redesign-active .ash-track-input-row{flex-direction:column;}
  body.ash-redesign-active .ash-track-btn{width:100%;}
}
@media (max-width:380px){
  body.ash-redesign-active .ash-container-inner{padding-inline:10px;}
  body.ash-redesign-active .ash-hero-title,body.ash-redesign-active .ash-hero-title-gold{font-size:clamp(1.15rem,6vw,1.35rem);}
}

/* V46 sidebar inside the admin: never allow a fixed child to create horizontal clipping. */
#ashV46Page{width:100%;max-width:100%;min-width:0;padding:clamp(6px,1.5vw,20px);overflow:visible;}
#ashV46Page .v46-shell{width:100%;max-width:100%;min-width:0;overflow:hidden;}
#ashV46Page .v46-panel,#ashV46Page .v46-setting-card,#ashV46Page .v46-formbox,#ashV46Page .v46-item{width:100%;max-width:100%;min-width:0;overflow:hidden;}
#ashV46Page .v46-settings-grid,#ashV46Page .v46-grid{grid-template-columns:repeat(3,minmax(0,1fr));min-width:0;}
#ashV46Page .v46-field{min-width:0;width:100%;}
#ashV46Page .v46-field input,#ashV46Page .v46-field select,#ashV46Page .v46-field textarea{display:block;width:100%;max-width:100%;min-width:0;}
#ashV46Page .v46-actions,#ashV46Page .v46-tabs{max-width:100%;min-width:0;flex-wrap:wrap;}
#ashV46Page .v46-tabs{overflow:hidden;}
#ashV46Page .v46-tab{max-width:100%;white-space:normal;}
#ashV46Page .v46-preview{max-width:100%;min-width:0;overflow:hidden;overflow-wrap:anywhere;}
@media (max-width:1000px){#ashV46Page .v46-settings-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:700px){
  #ashV46Page{padding:6px 4px 18px;}
  #ashV46Page .v46-shell{border-radius:16px;padding:10px;}
  #ashV46Page .v46-panel{padding:10px;border-radius:16px;}
  #ashV46Page .v46-setting-card{padding:10px;border-radius:14px;}
  #ashV46Page .v46-settings-grid,#ashV46Page .v46-grid{grid-template-columns:1fr;}
  #ashV46Page .v46-settings-head{align-items:stretch;}
  #ashV46Page .v46-settings-head>*{width:100%;} 
  #ashV46Page .v46-actions>*{flex:1 1 140px;min-width:0;}
}
@media (max-width:480px){
  #ashV46Page{padding:4px 2px 16px;}
  #ashV46Page .v46-shell{padding:8px;border-radius:14px;}
  #ashV46Page .v46-shell h1{font-size:1.05rem;}
  #ashV46Page .v46-shell .sub{font-size:.78rem;}
  #ashV46Page .v46-tab{width:100%;padding:9px 10px;}
  #ashV46Page .v46-btn{width:100%;} 
}

/* All admin pages: make flex/grid children shrink instead of forcing the viewport wider. */
.main-area,.admin-panel-shell,.page-content,.page{min-width:0;max-width:100%;}
.page-content>*{min-width:0;max-width:100%;}
.form-grid,.settings-grid,.overview-grid,.charts-row,.stats-row{min-width:0;}
.form-grid>* ,.settings-grid>* ,.overview-grid>* ,.charts-row>* ,.stats-row>*{min-width:0;}
@media (max-width:768px){.page-content{overflow-x:clip!important;}input,select,textarea{max-width:100%;min-width:0;}}
