html,body{max-width:100%;overflow-x:hidden}img,video,svg{max-width:100%}input,select,textarea,button{min-width:0}.admin-nav-backdrop{display:none!important}
@media(min-width:1051px){
 body.admin-page .admin-header{position:sticky;top:0}
 body.admin-page .admin-nav{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;width:min(1480px,calc(100% - 48px));overflow:visible;padding:8px 0 11px}
 body.admin-page .admin-nav a{width:100%;min-width:0;justify-content:center;padding:7px 8px;white-space:nowrap}
 body.admin-page .admin-nav a span{overflow:hidden;text-overflow:ellipsis}
 body.admin-page .admin-nav a i{flex:0 0 20px}
}
@media(min-width:1051px) and (max-width:1260px){body.admin-page .admin-nav{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:1050px){
 body.admin-menu-open{overflow:hidden}
 body.admin-page .admin-header{position:sticky;top:0}
 body.admin-page .admin-nav{position:fixed!important;z-index:152;top:70px;right:15px;bottom:14px;left:15px;display:none!important;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;width:auto;height:auto;max-height:none;overflow-x:hidden!important;overflow-y:scroll!important;overscroll-behavior:contain;padding:12px 12px calc(18px + env(safe-area-inset-bottom));border-radius:0 0 16px 16px;scrollbar-width:auto;scrollbar-color:#67bfd0 #e8f5f8}
 body.admin-menu-open .admin-nav{display:grid!important}
 body.admin-page .admin-nav a{min-height:46px;padding:9px 12px;background:#f8fcfd}
 body.admin-page .admin-nav-backdrop{position:fixed!important;z-index:150;inset:70px 0 0;display:none!important;width:100%;height:auto;min-height:0;padding:0!important;border:0!important;border-radius:0!important;background:rgba(9,39,48,.36)!important;backdrop-filter:blur(2px);box-shadow:none!important}
 body.admin-menu-open .admin-nav-backdrop{display:block!important}
 body.admin-page .admin-main{min-width:0}
}
@media(max-width:650px){
 body.admin-page .admin-nav{top:64px;right:10px;bottom:10px;left:10px;grid-template-columns:1fr;max-height:none}
 body.admin-page .admin-nav-backdrop{inset:64px 0 0}
 body.admin-page .admin-commandbar{gap:7px}
 body.admin-page .admin-brand img{max-width:108px;max-height:34px}
 body.admin-page .admin-brand b{font-size:14px}
 body.admin-page .admin-account-toggle{min-width:44px;padding:5px}
 body.admin-page .admin-account-toggle>span{width:32px;height:32px}
 body.admin-page .admin-main{width:calc(100% - 16px);margin:12px auto 45px}
 body.admin-page .panel{padding:14px;border-radius:13px}
 body.admin-page .panel-title{margin-bottom:15px;padding-bottom:13px}
 body.admin-page .panel-title h1,body.admin-page .panel-title h2{font-size:19px!important;line-height:1.6}
 body.admin-page .form-grid,body.admin-page .inline-form,body.admin-page .payment-form{grid-template-columns:minmax(0,1fr)!important}
 body.admin-page .actions,body.admin-page .report-actions{align-items:stretch;flex-direction:column;width:100%}
 body.admin-page .actions>*,body.admin-page .report-actions>*{width:100%}
 body.admin-page .table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
 body.admin-page table{min-width:660px}
 body.admin-page th,body.admin-page td{padding:10px 9px}
 body.admin-page .role-form{min-width:210px}
 body.admin-page .admin-footer{width:calc(100% - 20px);align-items:center;flex-direction:column;gap:4px;text-align:center}
}
@media(max-width:720px){
 .site-header{position:sticky;top:0;z-index:120}
 .site-header .header-inner{width:calc(100% - 20px)!important;min-height:64px!important}
 .site-header .brand{min-width:0;max-width:calc(100% - 102px)}
 .site-header .brand img{max-width:125px;max-height:38px}
 .site-header .brand>span:last-child{min-width:0}
 .site-header .brand strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .site-header .menu-toggle{order:3;flex:0 0 40px}
 .site-header .header-actions{order:2;flex:0 0 44px}
 .site-header .main-nav{top:64px;right:10px;left:10px;max-height:calc(100dvh - 78px);overflow-y:auto;overscroll-behavior:contain}
 .site-header .main-nav a{min-height:45px}
 .site-header .user-menu-dropdown{position:fixed;top:68px;right:10px!important;left:10px!important;width:auto!important;min-width:0!important;max-height:calc(100dvh - 80px);overflow-y:auto}
 .hero-grid{padding:38px 0!important}.hero-copy{min-width:0}.hero h1{font-size:clamp(28px,9vw,36px)!important}.hero-actions{display:grid;grid-template-columns:1fr;gap:9px}.hero-actions a{width:100%;text-align:center}
 .hero-card{height:260px!important}.hero-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.hero-stats div{padding:9px!important;border:1px solid #dcecf0;border-radius:10px}
 .course-grid,.teacher-grid{gap:14px}.course-card,.teacher-card{min-width:0}.course-footer{align-items:flex-start;flex-direction:column;gap:10px}.course-footer>a{width:100%;text-align:center}
 .section{padding:48px 0!important}.section-head h2{font-size:24px!important}
 .catalog-hero{padding:38px 0!important}.catalog-hero h1{font-size:28px!important}.catalog-summary{align-items:flex-start;flex-direction:column;gap:8px}
 .course-search>div{display:grid;grid-template-columns:1fr 1fr}.course-search input{grid-column:1/-1}.course-search button,.course-search a{width:100%;min-width:0}
 .alvand-user-page .user-shell{width:calc(100% - 18px);margin:14px auto!important}.alvand-user-page .user-sidebar,.alvand-user-page .panel,.alvand-user-page .welcome{padding:15px!important}.alvand-user-page .stats{grid-template-columns:1fr!important}
}
@media(max-width:470px){
 .site-header .brand{max-width:calc(100% - 94px)}
 .site-header .brand img{max-width:105px}
 .quick-grid,.course-grid,.teacher-grid{grid-template-columns:minmax(0,1fr)!important}
 .finance-summary-grid article{padding:17px 62px 17px 15px!important}.finance-summary-grid article:after{right:15px;left:auto}
}
