html:is(.student-sessions-active,.student-overview-active,.student-classes-active,.student-panel-active),html:is(.student-sessions-active,.student-overview-active,.student-classes-active,.student-panel-active) body{height:100dvh;overflow:hidden}
:is(.student-sessions-active,.student-overview-active,.student-classes-active,.student-panel-active) footer{display:flex;justify-content:center;align-items:center;gap:6px 18px;flex-wrap:nowrap;height:34px;margin:0;padding:0 12px;box-sizing:border-box;overflow:hidden;white-space:nowrap}
:is(.student-sessions-active,.student-overview-active,.student-classes-active,.student-panel-active) footer p{margin:0;font-size:12px;line-height:1}
:is(.student-sessions-active,.student-overview-active,.student-classes-active,.student-panel-active) .student-dashboard{height:calc(var(--class-workspace-height,calc(100dvh - 120px)) - 23px);min-height:0;padding-bottom:12px;box-sizing:border-box}
:is(.student-sessions-active,.student-overview-active,.student-classes-active,.student-panel-active) .student-dash-layout{height:100%;min-height:0;align-items:stretch;margin-top:0}
:is(.student-sessions-active,.student-overview-active,.student-classes-active,.student-panel-active) .student-dash-main{height:100%;min-height:0;min-width:0;overflow:hidden}
#student-view-sessions.is-active{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}
#student-view-sessions .student-page-head{flex:0 0 auto;margin-bottom:16px}
#student-session-calendar{display:flex;flex-direction:column;flex:1 1 0;min-height:0;overflow:hidden;box-sizing:border-box;padding:18px}
.session-calendar-toolbar,.session-calendar-legend,.calendar-error{flex:0 0 auto}
.session-calendar-toolbar{margin-bottom:12px}.session-calendar-legend{margin-bottom:12px}
.session-calendar-layout{flex:1 1 0;min-height:0;overflow:hidden;grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr) minmax(210px,26%)}
.calendar-month{min-height:0;grid-auto-rows:minmax(0,1fr);align-content:stretch}
.calendar-weekday{padding:6px 2px}.calendar-day{min-height:0;overflow:hidden;padding:5px;gap:3px}.calendar-day-number{padding:1px 3px}.calendar-chip{flex-shrink:0;padding:3px;font-size:9px}.calendar-more{font-size:8px}
.calendar-agenda{min-height:0;height:100%;max-height:none;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#acc5ca transparent;box-sizing:border-box;padding:14px}
@media(min-width:901px){:is(.student-sessions-active,.student-overview-active,.student-classes-active,.student-panel-active) .student-dash-sidebar{display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto;align-self:stretch;height:100%;box-sizing:border-box;max-height:none;padding-top:18px;padding-bottom:18px}:is(.student-sessions-active,.student-overview-active,.student-classes-active,.student-panel-active) .student-sidebar-heading{margin-top:14px}:is(.student-sessions-active,.student-overview-active,.student-classes-active,.student-panel-active) .student-workspace-label{padding-bottom:16px;margin-bottom:12px}:is(.student-sessions-active,.student-overview-active,.student-classes-active,.student-panel-active) .student-sidebar-help{margin-top:auto;padding:12px}}
@media(max-width:1100px){.session-calendar-layout{grid-template-columns:minmax(0,1fr) 210px;grid-template-rows:minmax(0,1fr)}}
@media(max-width:900px){:is(.student-sessions-active,.student-overview-active,.student-classes-active,.student-panel-active) .student-dash-layout{grid-template-rows:auto minmax(0,1fr);gap:14px}:is(.student-sessions-active,.student-overview-active,.student-classes-active,.student-panel-active) .student-dash-sidebar{max-height:76px;min-height:0}:is(.student-sessions-active,.student-overview-active,.student-classes-active,.student-panel-active) .student-dash-main{height:100%}}
@media(max-width:650px){#student-view-sessions .student-page-head{margin-bottom:10px}#student-view-sessions .student-page-description{display:none}#student-view-sessions .student-page-head h1{font-size:24px}#student-session-calendar{padding:10px}.session-calendar-toolbar{gap:6px;margin-bottom:6px}.session-calendar-toolbar h2{font-size:17px}.session-calendar-toolbar p{font-size:9px}.session-calendar-toolbar button{padding:6px 9px}.session-calendar-legend{gap:7px;font-size:9px;margin-bottom:7px}.session-calendar-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(100px,.48fr);gap:10px}.calendar-weekday{font-size:9px}.calendar-day{padding:3px;gap:2px}.calendar-day-number{font-size:10px}.calendar-chip{font-size:7px;padding:2px}.calendar-agenda h3{font-size:13px}.calendar-agenda>p{margin:6px 0}.calendar-agenda-event{padding:8px;margin-top:7px}.calendar-agenda{padding:10px}}
.session-calendar-toolbar>div:last-child{display:flex;align-items:center;flex-wrap:wrap;gap:0}
.calendar-book{margin-left:12px;padding:9px 14px;border-radius:8px;background:#087e8b;color:#fff;font-size:13px;font-weight:700;text-decoration:none;white-space:nowrap}
.calendar-book:hover{background:#066a75;color:#fff}
@media(max-width:650px){.calendar-book{margin-left:8px;padding:6px 10px;font-size:12px}}

/* Overview: one screen, no page scroll. If space runs out only the cards area scrolls. */
#student-view-overview.is-active{display:flex;flex-direction:column;gap:14px;height:100%;min-height:0;overflow:hidden}
#student-view-overview .student-welcome-banner{flex:0 0 auto;margin:0;padding:18px 22px;align-items:center}
#student-view-overview .student-welcome-name-row{margin-bottom:8px}
#student-view-overview .student-welcome-book{flex:0 0 auto;white-space:nowrap}
#student-view-overview .ov-stat-grid{flex:0 0 auto;margin:0;gap:12px;grid-template-columns:repeat(4,minmax(0,1fr))}
#student-view-overview .ov-grid-3col{flex:1 1 0;min-height:0;margin:0;gap:12px;align-items:stretch;overflow-y:auto;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:minmax(0,1fr)}
#student-view-overview .ov-card{min-width:0;min-height:0;overflow-y:auto;padding:16px;box-sizing:border-box}
#student-view-overview .ov-card-head{margin-bottom:10px}
.ov-study-row{display:flex;gap:8px;margin:0 0 8px;font-size:.84rem;line-height:1.35;color:#19343f;overflow-wrap:anywhere}
.ov-study-row span{color:#087e8b;flex:0 0 auto}.ov-study-row.is-done{color:#8aa0a8;text-decoration:line-through}
.ov-study-live{margin:0 0 8px;font-size:.8rem;font-weight:700;color:#d97706}.ov-study-missed{margin:0 0 8px;font-size:.78rem;color:#8e631c}
@media(max-width:1250px){#student-view-overview .ov-grid-3col{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:minmax(150px,1fr)}}
@media(max-width:650px){#student-view-overview{gap:10px}#student-view-overview .student-welcome-banner{padding:12px 14px;gap:10px}#student-view-overview .student-welcome-name-row{margin-bottom:4px}#student-view-overview .student-welcome-book{width:100%;box-sizing:border-box;text-align:center;min-height:0;padding:9px}#student-view-overview .ov-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#student-view-overview .ov-grid-3col{grid-template-columns:minmax(0,1fr);grid-auto-rows:auto}}

/* Study, Resources, Profile: same frame, the tab's content scrolls inside it. */
html.student-panel-active .student-dash-main{overflow-y:auto;scrollbar-width:thin}

/* Profile: one compact card; discounts live in a popup. */
#student-view-profile #student-profile-section{max-width:none;margin:0;padding:22px 24px;box-sizing:border-box}
.student-profile-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.student-profile-head .section-title{margin:0}
.student-rewards-btn{font:inherit;font-size:13px;font-weight:600;padding:9px 14px;border-radius:8px;border:1px solid #b8eaf3;background:#e5f7fb;color:#0a766e;cursor:pointer}
.student-profile-identity{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:14px 16px;margin-bottom:18px;background:#f6f9fa;border-radius:12px}
.student-profile-identity p{margin:0;min-width:0}.student-profile-identity span{display:block;font-size:12px;color:#6b818a;margin-bottom:3px}.student-profile-identity strong{display:block;font-size:14px;color:#19343f;overflow-wrap:anywhere}
.student-profile-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}
.student-profile-form .is-wide{grid-column:1/-1}
.student-profile-form label>span{display:block;font-size:13px;font-weight:600;color:#3d5862;margin-bottom:5px}.student-profile-form em{font-style:normal;font-weight:400;color:#94a3b8}
.student-profile-form input,.student-profile-form select,.student-profile-form textarea{width:100%;box-sizing:border-box;padding:9px 10px;margin:0;border:1px solid #d5e2e6;border-radius:8px;font:inherit;font-size:14px;background:#fff}
.student-profile-save{font:inherit;font-size:14px;font-weight:700;color:#fff;background:#087e8b;border:0;border-radius:8px;padding:10px 18px;cursor:pointer}
.student-rewards-dialog{width:min(600px,calc(100vw - 32px));max-height:calc(100dvh - 48px);overflow:auto;border:0;border-radius:16px;padding:24px;box-sizing:border-box;color:#334155}
.student-rewards-dialog::backdrop{background:rgba(15,35,42,.45)}
.student-rewards-dialog h2{margin:0 0 12px;font-size:20px;color:#19343f}
.student-rewards-dialog form{display:flex;justify-content:flex-end;margin-top:16px}
.student-rewards-dialog form button{font:inherit;font-size:14px;font-weight:600;padding:9px 16px;border-radius:8px;border:1px solid #d5e2e6;background:#f5f9fa;color:#087580;cursor:pointer}
@media(max-width:650px){#student-view-profile #student-profile-section{padding:14px}.student-profile-identity,.student-profile-form{grid-template-columns:minmax(0,1fr)}.student-rewards-dialog{padding:16px}}
.student-profile-form small{display:block;margin-top:4px;font-size:11px;line-height:1.35;color:#6b818a}

/* Profile, refreshed */
.student-profile-head{justify-content:flex-start;flex-wrap:nowrap}
.student-profile-head>b{display:grid;place-items:center;flex:0 0 auto;width:46px;height:46px;border-radius:13px;background:#e5f7fb;color:#066a75}
.student-profile-head>b svg{width:26px;height:26px}
.student-profile-head>div{flex:1 1 auto;min-width:0}
.student-profile-head .section-title{font-size:22px;font-weight:800;padding:0;border:0}
.student-profile-head .section-title::after{display:none}
.student-profile-head p{margin:2px 0 0;font-size:13px;color:#5d747d}
.student-rewards-btn{display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;border-radius:12px}
.student-rewards-btn svg{width:18px;height:18px}
.student-profile-identity{grid-template-columns:auto minmax(0,1fr) minmax(0,1.2fr);align-items:center;gap:22px;padding:14px 20px;background:#e5f7fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 90' preserveAspectRatio='none'%3E%3Cpath d='M300 10C250 20 230 60 150 90H300Z' fill='%23b8eaf3'/%3E%3C/svg%3E") right bottom/42% 100% no-repeat;border-radius:14px}
.student-profile-avatar{display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:#b8eaf3;color:#066a75;font-size:20px;font-weight:800;margin:0!important}
.student-profile-identity p.has-icon{position:relative;padding-left:36px}
.student-profile-identity p.has-icon i{position:absolute;left:0;top:8px;color:#087e8b}
.student-profile-identity i svg{width:25px;height:25px}
.student-profile-form label{display:grid;grid-template-columns:28px minmax(0,1fr);column-gap:8px;align-items:start}
.student-profile-form label>i{grid-row:1/span 2;color:#087e8b;padding-top:1px}
.student-profile-form label>i svg{width:24px;height:24px}
.student-profile-form label>span,.student-profile-form label>input,.student-profile-form label>select,.student-profile-form label>textarea,.student-profile-form label>small{grid-column:2}
.student-profile-form u{color:#d92d20;text-decoration:none}
.student-profile-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.student-profile-save{display:inline-flex;align-items:center;gap:8px;background:linear-gradient(100deg,#087e8b,#066a75)}
.student-profile-save svg{width:18px;height:18px}
#profile-save-status{font-size:13px;color:#0a766e}
@media(max-width:650px){.student-profile-head{flex-wrap:wrap}.student-profile-head>div{flex-basis:60%}.student-profile-identity{grid-template-columns:auto minmax(0,1fr);background-size:60% 60%}.student-profile-identity p.has-icon{grid-column:1/-1}}

#profile-content .student-profile-identity{border:0;background:#e5f7fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 90' preserveAspectRatio='none'%3E%3Cpath d='M300 10C250 20 230 60 150 90H300Z' fill='%23b8eaf3'/%3E%3C/svg%3E") right bottom/42% 100% no-repeat}
#profile-content #profile-avatar{display:grid;place-items:center;width:58px;height:58px;font-size:20px;color:#066a75;margin:0}
#profile-content .student-profile-identity p.has-icon{padding-left:36px}
#profile-content .student-profile-identity strong{color:#19343f;text-transform:none}
#profile-content .student-profile-form input,#profile-content .student-profile-form select,#profile-content .student-profile-form textarea{margin:0}
#profile-content>div.student-profile-identity:first-child{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,1.2fr);gap:22px;padding:14px 20px;border:0;border-radius:14px;background:#e5f7fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 90' preserveAspectRatio='none'%3E%3Cpath d='M300 10C250 20 230 60 150 90H300Z' fill='%23b8eaf3'/%3E%3C/svg%3E") right bottom/42% 100% no-repeat}
#profile-content>div.student-profile-identity:first-child p{padding:0}
#profile-content>div.student-profile-identity:first-child p.has-icon{padding-left:36px}
#profile-content>div.student-profile-identity:first-child strong{margin:0;font-size:15px;font-weight:800;letter-spacing:0;text-transform:none;color:#19343f}
.student-profile-form label{align-content:start}
@media(max-width:650px){#profile-content>div.student-profile-identity:first-child{grid-template-columns:auto minmax(0,1fr);background-size:60% 60%}}

/* Overview may be taller than the screen: it scrolls inside the frame, and cards show everything. */
html.student-overview-active .student-dash-main{overflow-y:auto;scrollbar-width:thin}
#student-view-overview.is-active{height:auto;overflow:visible}
#student-view-overview .ov-grid-3col{flex:0 0 auto;overflow:visible;grid-template-rows:none;grid-auto-rows:auto}
#student-view-overview .ov-card{overflow:visible}

/* Phones: one-row top bar and every section visible without sideways scrolling. */
@media(max-width:600px){
 .navbar{flex-wrap:nowrap}
 .navbar .navbar-logo-text{display:none}
 .navbar .navbar-links{margin:0 0 0 auto;flex-wrap:nowrap;gap:12px;width:auto}
 #dashboard-content .student-dash-sidebar{padding:4px;gap:0;overflow:hidden;max-height:none}
 #dashboard-content .student-sidebar-nav{display:contents}
 #dashboard-content .student-sidebar-heading,#dashboard-content .student-workspace-label,#dashboard-content .student-sidebar-help{display:none}
 #dashboard-content .student-sidebar-nav-btn{flex:1 1 0;min-width:0;width:auto;min-height:50px;margin:0;padding:5px 1px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:10px;line-height:1.1;white-space:normal;text-align:center}
 #dashboard-content .student-nav-icon{width:18px;height:18px;margin:0}
}
/* Touch screens: text boxes at 16px stop iPhones zooming in; controls are big enough to tap. */
@media(max-width:820px){.student-profile-form input,.student-profile-form select,.student-profile-form textarea,.class-shelf-search input,.course-dialog :is(input,textarea,select){font-size:16px}}
