/* MES 166II · fresh shared visual language. No input, data or visibility changes. */
body.mes-spring{--spring-ink:#304b49;--spring-teal:#28776e;--spring-sky:#e9f4ff;--spring-mint:#e8f6ed;--spring-peach:#fff0e6;--spring-lemon:#fff7d9;--spring-line:#d8e7e2;--spring-shadow:0 7px 24px #47776b0c;background:#fafcf8!important;color:#30433f;}
body.mes-spring:not(.nb-shell):not(.master-compact):not(.teacher-compact):not(.ha-body-pattern-off){background:#fafcf8!important;background-image:none!important;}
body.mes-spring>.site-header{background:#fffdf7!important;border-bottom:1px solid #dde9e0!important;color:#304b49!important;box-shadow:0 3px 18px #47776b08;}
body.mes-spring .site-header .brand-text strong{color:#326b61!important;}body.mes-spring .site-header .brand-text span{color:#6d8279!important;}
body.mes-spring .site-header .nav a{color:#3d5d56!important;background:#edf6ef!important;border:1px solid #dbe9df!important;}
body.mes-spring .site-header .nav a:hover{background:#dcefe5!important;}
body.mes-spring .site-footer{background:#eff6f0!important;color:#5c756c!important;border-top:1px solid #d8e7df;}
body.mes-spring .page-hero,body.mes-spring .hero{background:linear-gradient(115deg,#e8f5ef,#f5faf1 55%,#fff3df)!important;color:#304b49!important;border-bottom:1px solid #dbe9df;}
body.mes-spring .page-hero h1,body.mes-spring .hero h1{color:#345b52!important;}
body.mes-spring .page-hero p,body.mes-spring .hero p,body.mes-spring .hero-kicker,body.mes-spring .crumb{color:#617b70!important;}
body.mes-spring .btn:not(.secondary),body.mes-spring .teacher-login-card button[type=submit],body.mes-spring .nb-login-card button[type=submit]{background:#28776e!important;color:#fff!important;border-color:#28776e!important;}
body.mes-spring .btn.secondary{background:#fffdf8!important;color:#496d60!important;border-color:#c5dace!important;}
body.mes-spring .panel,body.mes-spring .nb-card,body.mes-spring .mes-home-card,body.mes-spring .teacher-login-card,body.mes-spring .nb-login-card{border-color:#d4e3dc;box-shadow:var(--spring-shadow);}
/* Public welcome and quick links */
body.mes-spring .home-hero-grid{gap:28px!important;align-items:start!important;}
.mes-renewal-art{display:block;width:100%;height:auto;border-radius:16px;object-fit:contain;}
.mes-welcome-art{margin:0 0 16px;max-height:225px;object-fit:contain;background:#fffcf5;}
body.mes-spring .home-menu-panel{background:#fffef9!important;border:1px solid #d5e5da!important;box-shadow:var(--spring-shadow)!important;}
body.mes-spring .home-quick-card{border-color:#d6e6df!important;color:#3e6157!important;box-shadow:none!important;}
body.mes-spring .home-quick-card:nth-child(4n+1){background:#eaf5ff!important;}
body.mes-spring .home-quick-card:nth-child(4n+2){background:#eaf6ee!important;}
body.mes-spring .home-quick-card:nth-child(4n+3){background:#fff1e5!important;}
body.mes-spring .home-quick-card:nth-child(4n+4){background:#fff8dc!important;}
body.mes-spring .home-quick-card:hover{outline:2px solid #a9d6c3;outline-offset:1px;}
/* Staff, assistants and student navigation: light, quiet backgrounds and clear text. */
body.mes-spring .nb-main{background:linear-gradient(130deg,#f4faf6,#fafcf8 60%,#fffaf0)!important;}
body.mes-spring aside.nb-sidebar,body.mes-spring aside.mes-menu-unified{background:linear-gradient(180deg,#eef8f2,#fffdf5)!important;background-image:linear-gradient(180deg,#eef8f2,#fffdf5)!important;border-right:1px solid #cddfd4!important;box-shadow:5px 0 22px #5281740a!important;}
body.mes-spring .nb-sidebar nav.nb-nav>.mes-nav-section,body.mes-spring nav.mes-menu-unified-nav>.mes-nav-section{border-color:#d1e2d8!important;background:#ffffffcf!important;box-shadow:none!important;}
body.mes-spring .nb-sidebar nav.nb-nav a,body.mes-spring .nb-sidebar nav.nb-nav button{border-color:#d9e6de!important;background:#fffefa!important;color:#36584d!important;-webkit-text-fill-color:#36584d!important;box-shadow:none!important;}
body.mes-spring .nb-sidebar nav.nb-nav a.active{background:#dff0e7!important;border-color:#a8d0bd!important;box-shadow:inset 3px 0 #49917a!important;}
body.mes-spring .nb-sidebar nav.nb-nav a:hover{background:#e8f5f1!important;}
body.mes-spring .nb-card>.nb-card-title,body.mes-spring .wa-panel-head{background:linear-gradient(110deg,#eaf5ef,#fff6df)!important;}
body.mes-spring .mes-role-hero{background:linear-gradient(110deg,#e4f3ea,#f3f8ef 62%,#fff0dd)!important;border-color:#cadfd1!important;position:relative;}
body.mes-spring .mes-role-hero h1{color:#365e51!important;}
body.mes-spring .mes-role-hero:has(.mes-dashboard-art){padding-right:240px!important;min-height:170px;}
.mes-dashboard-art{position:absolute;right:20px;top:14px;width:195px;height:140px;object-fit:contain;border-radius:12px;pointer-events:none;}
body.mes-spring .mes-home-section-head h2{color:#365c51;}
body.mes-spring .mvgw-hero{background:linear-gradient(115deg,#e9f5ed,#eef7ff 65%,#fff3df)!important;}
/* Login decoration never overlaps form controls. */
.mes-login-illustration{max-width:420px;max-height:175px;margin:0 auto 20px;object-fit:contain;border-radius:16px;}
body.mes-spring .nb-login-hero{padding:26px 20px!important;}
body.mes-spring .nb-login-hero .nb-login-hero-inner{align-items:center;}
body.mes-spring .nb-login-hero-side{display:none!important;}
body.mes-spring .teacher-login-card,body.mes-spring .nb-login-card{background:#fffefb!important;border:1px solid #d0e4d8!important;border-top:5px solid #a3cebb!important;}
body.mes-spring :is(input,select,textarea):focus-visible{outline:2px solid #488c79;outline-offset:2px;}
body.mes-spring a:focus-visible,body.mes-spring button:focus-visible{outline:2px solid #488c79;outline-offset:3px;}
@media(max-width:900px){body.mes-spring .mes-role-hero:has(.mes-dashboard-art){padding-right:160px!important;}.mes-dashboard-art{right:10px;top:16px;width:135px;height:120px;}.mes-welcome-art{max-height:190px;}}
@media(max-width:600px){body.mes-spring .mes-role-hero:has(.mes-dashboard-art){padding-right:18px!important;padding-bottom:105px!important;}.mes-dashboard-art{top:auto;bottom:10px;right:14px;width:145px;height:88px;}.mes-login-illustration{max-height:135px;}.mes-welcome-art{max-height:165px;}body.mes-spring .site-header .nav a{font-size:11px!important;padding:7px 8px!important;}body.mes-spring .home-hero-grid{gap:18px!important;}}
@media print{body.mes-spring,body.mes-spring .nb-main{background:#fff!important;}.mes-dashboard-art,.mes-login-illustration,.mes-welcome-art{display:none!important;}}
/* Explicitly restore the new login art where the old text-only page hid every image. */
body.mes-spring.notice-login-page img.mes-login-illustration{display:block!important;}
body.mes-spring .mes-home-kpis .mes-home-card:nth-child(4n+1){background:#eaf5ff!important;border-color:#c8dfef!important;}
body.mes-spring .mes-home-kpis .mes-home-card:nth-child(4n+2){background:#e9f7ee!important;border-color:#c6e1d1!important;}
body.mes-spring .mes-home-kpis .mes-home-card:nth-child(4n+3){background:#fff2e6!important;border-color:#ecd6bf!important;}
body.mes-spring .mes-home-kpis .mes-home-card:nth-child(4n+4){background:#fff8df!important;border-color:#e9dfb8!important;}
body.mes-spring .wa-hero{background:linear-gradient(110deg,#dcf0e5,#e8f3ff 65%,#fff1df)!important;color:#315b4e!important;border:1px solid #c2d9cc!important;box-shadow:none!important;}
body.mes-spring .wa-hero h1,body.mes-spring .wa-hero p{color:#315b4e!important;}body.mes-spring .wa-hero>div>span{color:#668369!important;}
body.mes-spring .wa-section-nav button.active{background:#397e6e!important;color:#fff!important;}
body.mes-spring .wa-simple-panel{grid-template-columns:minmax(0,1fr);min-width:0;}
@media(max-width:760px){body.mes-spring .wa-simple-assignment-form{grid-template-columns:repeat(2,minmax(0,1fr))!important;}body.mes-spring .wa-simple-assignment-form :is(input,select,textarea){min-width:0;max-width:100%;}body.mes-spring .wa-table-wrap{max-width:100%;overflow-x:auto;}}
body.mes-spring .home-hero-copy h1{word-break:keep-all;overflow-wrap:break-word;font-size:clamp(26px,2.35vw,34px)!important;line-height:1.35!important;}
@media(max-width:700px){
 body.mes-spring-attendance .ha-controls-compact{flex-wrap:wrap!important;width:100%;min-width:0;max-width:100%;overflow:visible!important;}
 body.mes-spring-attendance .ha-toolbar-group,body.mes-spring-attendance .ha-action-tools{flex-wrap:wrap!important;max-width:100%;min-width:0;flex-shrink:1;}
 body.mes-spring-attendance .ha-top-compact{min-width:0;max-width:100%;}
 body.mes-spring-level-info .content{display:block;min-width:0;max-width:100%;box-sizing:border-box;}
 body.mes-spring-level-info .content>*{min-width:0;max-width:100%;box-sizing:border-box;margin-bottom:18px;}
 body.mes-spring-level-info .content table{max-width:100%;}
 body.mes-spring-worktime .nb-app,body.mes-spring-worktime .nb-main,body.mes-spring-worktime .nb-sidebar{box-sizing:border-box!important;min-width:0!important;width:100%!important;max-width:100%!important;}
}
body.mes-spring .hero2,body.mes-spring .system-hero,body.mes-spring section[class*="-hero"]{background:linear-gradient(115deg,#e8f5ef,#f5faf1 60%,#fff1de)!important;color:#345b52!important;}
body.mes-spring :is(.hero2,.system-hero) h1,body.mes-spring :is(.hero2,.system-hero) p{color:#345b52!important;}
@media(max-width:700px){body.mes-spring-level-info .content{width:100%!important;max-width:100vw!important;min-width:0!important;display:block!important;}body.mes-spring-level-info .content>*{min-width:0!important;max-width:100%!important;}}
/* 166IJ: additional small-phone and tablet checks. */
body.mes-spring .mes-stage-button-row{display:flex!important;flex-wrap:wrap!important;gap:6px;}
body.mes-spring .mes-stage-button-row .mes-stage-generate{flex:1 1 175px!important;min-width:0!important;max-width:100%;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;height:auto!important;min-height:38px!important;line-height:1.5!important;padding:8px 10px!important;}
body.mes-spring .rt-tab{white-space:normal!important;overflow-wrap:anywhere;line-height:1.5;min-height:40px;height:auto;}
.mes-mobile-table-scroll{width:100%;min-width:0;overflow-x:auto;-webkit-overflow-scrolling:touch;}
@media(max-width:900px){
 body.mes-spring-attendance .ha-controls-compact{flex-wrap:wrap!important;width:100%;min-width:0;max-width:100%;overflow:visible!important;}
 body.mes-spring-attendance .ha-toolbar-group,body.mes-spring-attendance .ha-action-tools{flex-wrap:wrap!important;max-width:100%;min-width:0;flex-shrink:1;}
 body.mes-spring-worktime .nb-app,body.mes-spring-worktime .nb-main,body.mes-spring-worktime .nb-sidebar{box-sizing:border-box!important;min-width:0!important;width:100%!important;max-width:100%!important;}
}
@media(max-width:600px){
 body.mes-mobile-mg .mgadm,body.mes-mobile-writing-info .content{box-sizing:border-box!important;min-width:0!important;width:100%!important;max-width:100%!important;}
 body.mes-spring #mesAdmissionOmrUrlTop{min-width:0!important;max-width:100%!important;flex:1 1 100%!important;}
 body.mes-spring .mes-mobile-table-scroll table{min-width:650px;}
}
@media(max-width:380px){body.mes-spring #staffPendingFilter{grid-template-columns:minmax(0,1fr)!important;}body.mes-spring #staffPendingFilter>*{grid-column:1!important;}body.mes-spring #staffPendingFilter select{width:100%!important;}}
