/* MyMEHIT student experience — mobile-first neumorphic app shell. */
.student-portal-body,
.auth-student{
  --student-bg:#e9eef3;
  --student-surface:#e9eef3;
  --student-raised:10px 10px 24px rgba(136,149,163,.27),-10px -10px 24px rgba(255,255,255,.88);
  --student-raised-soft:6px 6px 14px rgba(136,149,163,.23),-6px -6px 14px rgba(255,255,255,.82);
  --student-inset:inset 4px 4px 9px rgba(136,149,163,.2),inset -4px -4px 9px rgba(255,255,255,.85);
  --student-navy:#071e3b;
  --student-gold:#c8941a;
  --student-muted:#687b8f;
  overflow-x:hidden;
  background:var(--student-bg);
}
.student-portal-body img{max-width:100%}
.student-mobile-nav,.student-more-sheet,.student-more-backdrop,.student-mobile-context{display:none}
.student-mobile-header-actions,.community-student-quick-nav{display:none}

/* Stable desktop header and professional sidebar icons. */
.student-mobile-brand{display:flex;align-items:center;gap:11px;min-width:0}
.student-mobile-brand>img{display:block;width:31px;height:35px;object-fit:contain;flex:none}
.student-mobile-brand>span{display:block;min-width:0}
.student-mobile-brand .student-desktop-subtitle{display:block;margin-top:4px}
.student-mobile-motto{display:none}
.student-brand img{width:35px!important;height:39px!important}
.student-sidebar nav a{gap:10px;min-height:42px;padding:0 11px}
.student-nav-icon{display:grid;place-items:center;width:27px;height:27px;flex:none;border-radius:8px;color:#b9c9da}
.student-nav-icon svg{width:18px;height:18px}
.student-sidebar nav a.active .student-nav-icon{color:#071e3b;background:rgba(255,255,255,.35);box-shadow:inset 2px 2px 5px rgba(79,55,5,.12)}
.student-quote{font-size:12px!important;letter-spacing:.035em;line-height:1.7!important}
.student-quote em{font-style:italic}

/* Grouped desktop navigation: fewer competing links, faster scanning. */
.student-grouped-navigation{display:grid!important;gap:8px!important}
.student-nav-group{border:1px solid rgba(255,255,255,.07);border-radius:12px;background:rgba(255,255,255,.025);overflow:hidden}
.student-nav-group>summary{display:flex;min-height:38px;align-items:center;justify-content:space-between;gap:10px;padding:0 11px;color:#8fa7c2;cursor:pointer;list-style:none;font-size:9px;font-weight:850;letter-spacing:.12em;text-transform:uppercase}
.student-nav-group>summary::-webkit-details-marker{display:none}
.student-nav-group>summary svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;transition:transform .18s ease}
.student-nav-group[open]>summary svg{transform:rotate(180deg)}
.student-nav-group>div{display:grid;gap:3px;padding:0 5px 6px}
.student-sidebar .student-nav-group a{padding:0 8px!important}
.student-sidebar .student-nav-group a b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:inherit}

/* Neumorphic desktop foundation. */
.student-portal-body .student-content{background:var(--student-bg)}
.student-portal-body .student-card,
.student-portal-body .student-offline-bar,
.student-portal-body .self-service-item,
.student-portal-body .student-courses-grid article,
.student-portal-body .student-assignments-grid article{
  border:1px solid rgba(255,255,255,.58);
  background:var(--student-surface);
  box-shadow:var(--student-raised-soft);
}
.student-portal-body .student-card{border-radius:18px}
.student-portal-body .student-kpis article{
  border:1px solid rgba(255,255,255,.1);
  border-radius:18px;
  box-shadow:7px 7px 17px rgba(24,45,69,.2),-5px -5px 14px rgba(255,255,255,.72);
}
.student-portal-body .student-gold-link,
.student-portal-body .self-service-form button,
.student-portal-body .student-offline-bar button{
  border-radius:12px;
  box-shadow:4px 4px 10px rgba(94,105,117,.24),-4px -4px 10px rgba(255,255,255,.65);
}
.student-portal-body input,
.student-portal-body select,
.student-portal-body textarea{
  max-width:100%;
  min-width:0;
}

/* Student sign-in is part of the same product, not a desktop page squeezed down. */
.auth-student .auth-panel{background:var(--student-bg)}
.auth-student .auth-card{
  border:1px solid rgba(255,255,255,.65);
  background:var(--student-surface);
  box-shadow:var(--student-raised);
}
.auth-student .form-stack input{
  border:0;
  background:var(--student-surface);
  box-shadow:var(--student-inset);
}
.auth-student .form-stack input:focus{
  border:0;
  box-shadow:var(--student-inset),0 0 0 3px rgba(200,148,26,.2);
}
.auth-student .password-toggle,.auth-student .security-note{
  background:var(--student-surface);
  box-shadow:var(--student-raised-soft);
}

@media(max-width:780px){
  html{width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%}
  html:has(body.student-portal-body){height:100%;overflow:hidden}
  body.student-portal-body{position:fixed;inset:0;width:100%;min-width:320px;height:var(--student-app-height,100dvh);min-height:0;overflow:hidden;overscroll-behavior:none}
  body.auth-student{width:100%;min-width:320px;min-height:100dvh;overscroll-behavior-y:none}
  .student-portal-body button,.student-portal-body a,.auth-student button,.auth-student a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
  .student-portal-body input,.student-portal-body select,.student-portal-body textarea,
  .auth-student input,.auth-student select,.auth-student textarea{font-size:16px!important}

  /* App frame */
  .student-shell{position:fixed;inset:0;display:block;width:100%;height:var(--student-app-height,100dvh);min-height:0;overflow:hidden;background:var(--student-bg)}
  .student-sidebar{display:none!important}
  .student-main{display:flex;width:100%;height:100%;min-width:0;min-height:0;flex-direction:column;overflow:hidden}
  .student-topbar{
    position:sticky;top:0;z-index:30;display:flex;min-height:68px;padding:calc(9px + env(safe-area-inset-top)) 14px 9px;
    border:0;background:rgba(233,238,243,.92);box-shadow:0 8px 20px rgba(35,54,75,.08);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)
  }
  .student-mobile-brand{display:flex!important;align-items:center;gap:9px;min-width:0;flex:1}
  .student-mobile-brand>img{display:block;width:29px;height:32px;object-fit:contain;flex:none}
  .student-mobile-brand>span{display:block;min-width:0}
  .student-topbar>div:first-child>strong{display:block;max-width:56vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.2;letter-spacing:.01em;color:var(--student-navy)}
  .student-desktop-subtitle{display:none!important}
  .student-mobile-motto{display:block;margin-top:5px;color:#9b7118;font-family:Georgia,"Times New Roman",serif;font-size:9px;font-weight:500;line-height:1.2;letter-spacing:.06em;white-space:nowrap}
  .student-top-actions{display:none}
  .student-mobile-header-actions{display:flex;align-items:center;gap:8px;margin-left:auto}
  .student-mobile-header-actions>a,.student-mobile-header-actions>button{display:grid;place-items:center;width:38px;height:38px;padding:0;border:0;border-radius:12px;background:var(--student-bg);box-shadow:var(--student-raised-soft);color:var(--student-navy)}
  .student-mobile-header-actions svg{width:19px;height:19px}
  .student-period{position:absolute;top:calc(68px + env(safe-area-inset-top));left:0;right:0;display:none;padding:7px 12px;background:var(--student-bg);box-shadow:0 7px 14px rgba(35,54,75,.06)}
  .student-mobile-context{display:none}
  .student-content{flex:1;min-height:0;width:100%;max-width:none;padding:14px 14px calc(96px + env(safe-area-inset-bottom));overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}

  /* Compact dashboard */
  .student-welcome{min-height:0;padding:19px;border-radius:20px;align-items:flex-start;gap:14px;flex-direction:column;box-shadow:8px 8px 20px rgba(26,44,66,.2),-7px -7px 18px rgba(255,255,255,.72)}
  .student-welcome .eyebrow{margin-bottom:8px;font-size:8px}
  .student-welcome h1{margin:0 0 7px;font-size:clamp(23px,7vw,29px);line-height:1.08}
  .student-welcome p{font-size:11px;line-height:1.5}
  .student-welcome-compact{min-height:0}
  .student-gold-link{padding:10px 13px;font-size:10px}
  .student-offline-bar{display:grid;grid-template-columns:1fr;gap:9px;margin:14px 2px;padding:12px;border:0;border-radius:16px}
  .student-offline-bar button,.student-offline-bar a{width:100%;min-height:40px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:10px}
  .student-offline-bar small{display:block;line-height:1.5;text-align:center}
  .student-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 2px}
  .student-kpis article{min-height:100px;padding:14px 13px}
  .student-kpis small{font-size:8px;line-height:1.35}
  .student-kpis strong{margin:8px 0 4px;font-size:21px}
  .student-kpis span{font-size:8px;line-height:1.3}
  .student-dashboard-grid,.student-courses-grid,.student-assignments-grid,.self-service-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
  .student-card{padding:16px;margin:0 2px;border:0!important;border-radius:18px!important}
  .student-course-overview{margin-top:14px}
  .student-card header{align-items:flex-start;margin-bottom:12px}
  .student-card h2{font-size:12px;line-height:1.35}
  .student-card header a,.student-card header span{font-size:9px;white-space:nowrap}
  .student-fact,.student-line{align-items:flex-start;padding:10px 0;font-size:10px;line-height:1.4}
  .student-card-note{font-size:9px}
  .student-card .student-empty{padding:18px 2px;font-size:11px;line-height:1.5}
  .student-big-number{font-size:30px}
  .student-courses-grid article,.student-assignments-grid article{border:0;border-radius:15px;padding:14px}
  .student-resource{padding:14px 2px;gap:12px}
  .student-resource-actions{width:100%}
  .student-resource-actions a,.student-resource-actions button{width:100%;overflow-wrap:anywhere}
  .student-table-wrap{width:100%;max-width:100%;padding:2px 0 7px;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
  .student-card table{min-width:560px;font-size:10px}
  .student-card th,.student-card td{padding:9px 8px}
  .student-schedule .student-table-wrap,.student-course-overview .student-table-wrap,.student-timetable-card .student-table-wrap{overflow:visible}
  .student-schedule table,.student-course-overview table,.student-timetable-card table{display:block;min-width:0}
  .student-schedule thead,.student-course-overview thead,.student-timetable-card thead{display:none}
  .student-schedule tbody,.student-course-overview tbody,.student-timetable-card tbody{display:grid;gap:10px}
  .student-schedule tr,.student-course-overview tr,.student-timetable-card tr{display:grid;padding:11px;border-radius:13px;background:var(--student-bg);box-shadow:var(--student-inset)}
  .student-schedule td,.student-course-overview td,.student-timetable-card td{display:grid;grid-template-columns:88px minmax(0,1fr);gap:9px;padding:6px 3px;border:0;line-height:1.4;overflow-wrap:anywhere}
  .student-schedule td:before,.student-course-overview td:before,.student-timetable-card td:before{color:var(--student-muted);font-size:8px;font-weight:800;text-transform:uppercase}
  .student-schedule td:nth-child(1):before{content:"Time"}.student-schedule td:nth-child(2):before{content:"Course"}.student-schedule td:nth-child(3):before{content:"Room"}.student-schedule td:nth-child(4):before{content:"Lecturer"}
  .student-course-overview td:nth-child(1):before{content:"Course"}.student-course-overview td:nth-child(2):before{content:"Lecturer"}.student-course-overview td:nth-child(3):before{content:"Materials"}.student-course-overview td:nth-child(4):before{content:"Status"}
  .student-timetable-card td:nth-child(1):before{content:"Day / date"}.student-timetable-card td:nth-child(2):before{content:"Time"}.student-timetable-card td:nth-child(3):before{content:"Course"}.student-timetable-card td:nth-child(4):before{content:"Lecturer"}.student-timetable-card td:nth-child(5):before{content:"Room"}.student-timetable-card td:nth-child(6):before{content:"Type"}
  .self-service-grid{margin-top:14px}
  .self-service-form{gap:13px}
  .self-service-form label{font-size:10px}
  .self-service-form input,.self-service-form select,.self-service-form textarea{border:0;border-radius:12px;background:var(--student-surface);box-shadow:var(--student-inset);padding:12px}
  .self-service-form button{width:100%;min-height:46px;justify-self:stretch}
  .self-service-dates{grid-template-columns:1fr}

  /* App navigation is anchored to the frozen shell. The software keyboard overlays it. */
  .student-mobile-nav{position:absolute;z-index:60;left:10px;right:10px;bottom:calc(8px + env(safe-area-inset-bottom));display:flex;height:64px;align-items:center;justify-content:space-around;padding:7px 8px;border:1px solid rgba(255,255,255,.72);border-radius:20px;background:rgba(233,238,243,.94);box-shadow:8px 8px 24px rgba(79,94,111,.24),-7px -7px 20px rgba(255,255,255,.8);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
  .student-mobile-nav>a,.student-mobile-nav>button{display:flex;min-width:0;flex:1;height:50px;align-items:center;justify-content:center;flex-direction:column;gap:4px;padding:0;border:0;background:transparent;color:#65788b;text-decoration:none;font:inherit;font-size:8px;font-weight:750;line-height:1}
  .student-mobile-nav svg{width:20px;height:20px}
  .student-mobile-nav .active{color:var(--student-gold)}
  .student-mobile-nav .active svg{filter:drop-shadow(0 2px 4px rgba(200,148,26,.22))}
  .student-more-backdrop{display:block;position:absolute;inset:0;z-index:70;background:rgba(7,21,35,.34);backdrop-filter:blur(3px)}
  .student-more-backdrop[hidden]{display:none}
  .student-more-sheet{display:block;position:absolute;z-index:71;left:0;right:0;bottom:0;max-height:88%;overflow:auto;overscroll-behavior:contain;padding:11px 16px calc(108px + env(safe-area-inset-bottom));border:1px solid rgba(255,255,255,.74);border-bottom:0;border-radius:25px 25px 0 0;background:var(--student-bg);box-shadow:0 -16px 50px rgba(7,21,35,.2)}
  .student-more-sheet[hidden]{display:none}
  .student-more-handle{display:block;width:42px;height:4px;margin:0 auto 10px;border-radius:9px;background:#bcc6cf}
  .student-more-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
  .student-more-header small{color:var(--student-gold);font-size:9px;font-weight:800;letter-spacing:.16em}
  .student-more-header h2{margin:3px 0 0;color:var(--student-navy);font-size:20px}
  .student-more-header>button{display:grid;place-items:center;width:40px;height:40px;border:0;border-radius:50%;background:var(--student-bg);box-shadow:var(--student-raised-soft);color:var(--student-navy)}
  .student-more-header>button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8}
  .student-more-profile{display:grid;grid-template-columns:44px minmax(0,1fr) 20px;align-items:center;gap:11px;min-height:65px;padding:10px 12px;border-radius:17px;background:var(--student-bg);box-shadow:var(--student-raised-soft);color:var(--student-navy);text-decoration:none}
  .student-more-avatar{display:grid;place-items:center;width:44px;height:44px;overflow:hidden;border:2px solid rgba(255,255,255,.72);border-radius:50%;background:linear-gradient(145deg,#1d3b50,#071523);color:#fff}.student-more-avatar img{width:100%;height:100%;object-fit:cover}.student-more-avatar b{font-size:16px}
  .student-more-profile>span:nth-child(2){min-width:0}.student-more-profile strong,.student-more-profile small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.student-more-profile strong{font-size:13px}.student-more-profile small{margin-top:2px;color:var(--student-muted);font-size:10px}.student-more-profile>svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}
  .student-more-section{margin-top:15px}.student-more-section h3{margin:0 0 8px;color:var(--student-muted);font-size:8px;font-weight:850;letter-spacing:.14em;text-transform:uppercase}
  .student-more-section nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.student-more-section nav a{display:flex;min-width:0;min-height:49px;align-items:center;gap:8px;padding:8px 10px;border-radius:13px;background:var(--student-bg);box-shadow:var(--student-raised-soft);color:var(--student-navy);text-decoration:none;font-size:10px;font-weight:700;line-height:1.2}.student-more-section nav a>svg:not(.student-more-chevron){width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8}.student-more-section nav a>span{min-width:0;overflow-wrap:anywhere}.student-more-section nav a.active{color:#93680f;box-shadow:var(--student-inset)}.student-more-chevron{width:13px!important;height:13px!important;margin-left:auto;fill:none;stroke:currentColor;stroke-width:1.8}
  .student-more-quick nav{grid-template-columns:repeat(4,minmax(0,1fr))}.student-more-quick nav a{min-height:68px;justify-content:center;flex-direction:column;gap:6px;padding:7px 3px;text-align:center;font-size:9px}.student-more-quick nav a>svg{width:21px!important;height:21px!important;color:#9a6c14}
  .student-more-groups .student-more-section+section{padding-top:13px;border-top:1px solid rgba(103,123,143,.18)}
  .student-more-signout{display:flex;width:100%;min-height:46px;align-items:center;justify-content:center;gap:8px;margin-top:17px;border:0;border-radius:14px;background:linear-gradient(#183d59,#071e3b);box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 5px 12px rgba(7,30,59,.2);color:#fff;font-weight:700}.student-more-signout svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}
  .student-menu-open{overflow:hidden}
  .student-keyboard-open .student-mobile-nav,.student-input-active .student-mobile-nav{
    display:flex!important;visibility:visible!important;opacity:1!important;transform:none!important
  }

  .student-offline-shell{width:100%;margin:0;padding:18px 14px calc(28px + env(safe-area-inset-bottom));overflow:hidden}
  .student-offline-shell>header,.student-offline-unlock,.student-offline-card,.student-offline-drafts{border:0;border-radius:18px;background:var(--student-bg);box-shadow:var(--student-raised-soft)}
  .student-offline-shell>header{padding:14px}
  .student-offline-shell h1{font-size:26px}
  .student-offline-unlock{align-items:stretch;padding:14px;flex-direction:column}
  .student-offline-unlock label,.student-offline-unlock input,.student-offline-unlock button{width:100%}
  .student-offline-unlock input,.student-offline-drafts input,.student-offline-drafts textarea,.student-offline-drafts select{border:0;border-radius:12px;background:var(--student-bg);box-shadow:var(--student-inset)}

  /* Inside MEHIT keeps its own bottom navigation inside the same frozen app frame. */
  .student-shell-immersive .student-topbar,.student-shell-immersive>.student-more-sheet,.student-shell-immersive>.student-more-backdrop{display:none!important}
  .student-shell-immersive .student-content{padding:0 0 calc(90px + env(safe-area-inset-bottom));overflow-x:hidden;overflow-y:auto}
  .student-shell-immersive .community-embedded-shell{position:static;overflow:visible;background:var(--student-bg)}
  .student-shell-immersive .community-social-brand img{width:27px;height:30px}
  .student-shell-immersive .community-social-header,.student-shell-immersive .community-social-tabs,.student-shell-immersive .community-social-post,.student-shell-immersive .community-comment-composer{background:var(--student-bg)!important}
  .student-shell-immersive .community-bottom-nav{position:absolute!important;left:10px!important;right:10px!important;bottom:calc(8px + env(safe-area-inset-bottom))!important;transform:none!important;display:flex!important;width:auto!important;max-width:none!important}
  .student-shell-immersive .community-student-quick-nav{display:none!important}
  .student-shell-immersive .community-comment-entry{border:0;background:var(--student-bg);box-shadow:var(--student-inset)}
  .student-shell-immersive .community-comment-composer.student-composer-floating{position:absolute!important;z-index:80;top:var(--student-composer-top,40%)!important;left:50%!important;width:min(100%,560px)!important;margin:0!important;transform:translateX(-50%);box-shadow:0 -8px 28px rgba(7,21,35,.12)!important}
  .student-composer-placeholder{width:100%;pointer-events:none}
  .student-keyboard-open .student-shell-immersive .student-content{overflow:hidden!important}
  .student-keyboard-open .student-shell-immersive .community-bottom-nav,
  .student-input-active .student-shell-immersive .community-bottom-nav{
    display:flex!important;visibility:visible!important;opacity:1!important;transform:none!important
  }
  .student-keyboard-open .student-shell-immersive .community-social-post,
  .student-keyboard-open .student-shell-immersive .community-post-media,
  .student-keyboard-open .student-shell-immersive .community-post-media>img,
  .student-keyboard-open .student-shell-immersive .community-post-media>video{
    opacity:1!important;filter:none!important;transform:none!important;animation:none!important
  }

  /* Student login */
  .auth-student .auth-shell{display:flex;flex-direction:column;min-height:100dvh;background:var(--student-bg)}
  .auth-student .auth-story{display:block;min-height:190px;padding:calc(20px + env(safe-area-inset-top)) 22px 24px;border-radius:0 0 28px 28px}
  .auth-student .auth-story .brand{gap:9px}
  .auth-student .brand-logo{width:32px;height:36px;object-fit:contain}
  .auth-student .brand strong{font-size:18px}
  .auth-student .auth-story-copy{margin:29px 0 0}
  .auth-student .auth-story-copy .eyebrow,.auth-student .auth-story-copy>p:last-child,.auth-student .auth-values{display:none}
  .auth-student .auth-story-copy h1{max-width:330px;margin:0;font-size:31px;line-height:1.02}
  .auth-student .auth-panel{flex:1;padding:15px 14px calc(20px + env(safe-area-inset-bottom))}
  .auth-student .auth-toolbar{margin:0 5px 13px;font-size:10px}
  .auth-student .auth-card{width:100%;margin:0;padding:23px 18px;border:0;border-radius:22px}
  .auth-student .auth-card>.eyebrow{font-size:9px;margin-bottom:8px}
  .auth-student .auth-card h2{font-size:31px}
  .auth-student .auth-card>.muted{margin:6px 0;font-size:12px}
  .auth-student .form-stack{gap:16px;margin-top:22px}
  .auth-student .form-stack label>span:first-child{font-size:11px}
  .auth-student .form-stack input{height:52px;border-radius:13px}
  .auth-student .password-toggle{top:6px;height:40px}
  .auth-student .form-between{flex-direction:row;align-items:center;gap:8px;font-size:11px}
  .auth-student .check input{width:18px;height:18px}
  .auth-student .button-gold{width:100%;min-height:50px;border-radius:14px}
  .auth-student .security-note{padding:14px 14px 14px 50px;border-radius:15px}
  .auth-student .security-note:before{left:13px;top:15px}
  .auth-student .security-note strong{font-size:11px}
  .auth-student .security-note span,.auth-student .register-link{font-size:10px}
  .auth-student .auth-footer{display:none}
}

@media(max-width:370px){
  .student-content{padding-left:10px;padding-right:10px}
  .student-kpis{gap:8px}
  .student-kpis article{padding:12px 10px}
  .student-more-section nav{gap:7px}
  .auth-student .auth-story{min-height:175px}
}

@media(prefers-reduced-motion:reduce){
  .student-portal-body *,.auth-student *{scroll-behavior:auto!important;transition:none!important}
}
