/* DS Classes: soft blue luxury palette with light academic graphics. */
:root {
  --lux-navy: #17385C;
  --lux-royal: #1688D5;
  --lux-blue: #45B8EA;
  --lux-cyan: #73D4F3;
  --lux-gold: #C5A35B;
  --lux-gold-soft: #F7EED9;
  --lux-ivory: #F5FAFD;
  --lux-surface: #FFFFFF;
  --lux-line: #D8EAF5;
  --lux-ink: #17304B;
  --lux-muted: #61758B;
  --lux-shadow: 0 9px 26px rgba(28, 96, 145, .09);
  --lux-shadow-strong: 0 14px 34px rgba(28, 96, 145, .13);
}

html, body { background: radial-gradient(ellipse at 4% 5%, #E5F7FF 0, transparent 31%), linear-gradient(180deg, #F4FAFD 0%, #FCFDFE 52%, #EEF8FC 100%); color: #17304B; }
.sidebar { background: rgba(255,255,255,.96); border-color: #DDECF4; box-shadow: 8px 0 30px rgba(28,96,145,.06); }
.brand-mark, .auth-mobile-brand .brand-mark { background: linear-gradient(145deg,#78D2F2,#218FD4); color:#fff; box-shadow:0 7px 18px rgba(33,143,212,.18); }
.brand-mark span { color:#FFF1C7; }
.nav-item.active,.nav-item:hover { background:#E7F6FD; color:#167EBB; }
.nav-item.active .nav-icon { color:#C5A35B; }

.topbar,.feature-modal-head,.admin-dashboard-mode .feature-modal-head { background:linear-gradient(105deg,#74D3F3 0%,#38AFE5 47%,#1688D5 100%); border-color:rgba(255,255,255,.56); color:#fff; box-shadow:0 7px 20px rgba(38,145,202,.14); }
.topbar .breadcrumb,.topbar .breadcrumb b,.topbar .top-name,.feature-modal-head>div>span,.feature-modal-head h2 { color:#fff; }
.topbar .icon-button,.topbar .menu-toggle,.close-feature { background:rgba(255,255,255,.19); border-color:rgba(255,255,255,.4); color:#fff; }
.welcome-row h1,.home-course-heading h2,.section-heading h2,.panel-heading h2,.feature-form h3 { color:#17304B!important; }

.hero-card,.classroom-banner { position:relative; overflow:hidden; isolation:isolate; border-color:rgba(197,163,91,.35); background:radial-gradient(circle at 88% 18%,rgba(255,255,255,.57) 0 7%,transparent 7.4%),radial-gradient(circle at 92% 24%,rgba(255,255,255,.22) 0 15%,transparent 15.4%),linear-gradient(118deg,#74D3F3 0%,#38AFE5 55%,#1688D5 100%); box-shadow:var(--lux-shadow-strong); }
.hero-card::after,.classroom-banner::after { content:""; position:absolute; z-index:-1; width:210px; height:210px; right:-70px; bottom:-120px; border:1px solid rgba(255,255,255,.46); border-radius:50%; box-shadow:0 0 0 22px rgba(255,255,255,.08),0 0 0 46px rgba(255,255,255,.06); pointer-events:none; }
.hero-art { background:radial-gradient(circle at 80% 18%,rgba(255,255,255,.48) 0 8%,transparent 8.5%),linear-gradient(135deg,#8DDEF6,#42B5E8 62%,#218FD4); }
.hero-card h2 em { color:#FFF0B7; }
.classroom-banner h3,.classroom-banner p,.classroom-banner .type-badge { color:#fff; }

.home-update-heading,.home-upcoming .home-update-heading { background:linear-gradient(100deg,#64CAF0,#1688D5); }
.home-notice-card { border-left-color:#C5A35B; background:linear-gradient(115deg,#fff,#F0F9FD); }
.home-upcoming-card { background:linear-gradient(135deg,#F4FBFE,#E8F6FC); }
.home-course-rail { scrollbar-color:#76CBEF transparent; }
.home-course-cover,.course-cover,.course-thumbnail-preview { position:relative; overflow:hidden; background:radial-gradient(circle at 82% 23%,rgba(255,255,255,.43) 0 8%,transparent 8.5%),radial-gradient(circle at 87% 31%,rgba(255,255,255,.18) 0 18%,transparent 18.5%),linear-gradient(120deg,#77D5F3 0%,#37B2E7 57%,#1688D5 100%); }
.home-course-card.course-card-lime .home-course-cover { background:radial-gradient(circle at 80% 22%,rgba(255,255,255,.58) 0 8%,transparent 8.5%),radial-gradient(circle at 86% 28%,rgba(255,255,255,.22) 0 17%,transparent 17.5%),linear-gradient(120deg,#A8DFF3 0%,#77C5E8 56%,#438FCE 100%); }
.home-course-cover::after,.course-cover::after { content:""; position:absolute; width:155px; height:155px; right:-50px; top:-78px; border:1px solid rgba(255,255,255,.47); border-radius:50%; box-shadow:0 0 0 17px rgba(255,255,255,.10),0 0 0 36px rgba(255,255,255,.06); pointer-events:none; }
.home-course-class { background:rgba(23,56,92,.83); }
.home-course-button,.feature-submit,.primary-button,.auth-submit,.admin-photo-edit,.small-action.secondary,.course-context-bar button,.admin-inline-back,.download-button { border-color:rgba(197,163,91,.34)!important; background:linear-gradient(100deg,#238FCC,#087BBF 72%,#0E73B0)!important; color:#fff!important; box-shadow:0 7px 17px rgba(24,127,184,.16); }
.small-action { border-color:#D6E9F2!important; background:#EAF6FB!important; color:#176F9F!important; }
.feature-form input,.feature-form select,.feature-form textarea,.feature-input,.comment-form input,.profile-form input,.profile-form select,.student-filter-panel input,.student-filter-panel select,.community-compose textarea,#authForm input,#adminAuthForm input { border-color:#D5E8F1!important; background:#FBFEFF!important; }
.feature-form input:focus,.feature-form select:focus,.feature-form textarea:focus,.feature-input:focus,.comment-form input:focus { border-color:#59B6E4!important; box-shadow:0 0 0 3px rgba(69,184,234,.16)!important; }
.course-thumbnail-editor { border-color:#D9EAF2; background:linear-gradient(130deg,#FCFEFF,#EFF8FC); }
.course-thumbnail-picker { border-color:rgba(197,163,91,.34)!important; background:linear-gradient(100deg,#3DB2E5,#1688D5)!important; color:#fff!important; }
.admin-page-header { border-color:#D6EAF4; background:linear-gradient(105deg,#F2FBFE,#fff); box-shadow:0 6px 17px rgba(28,96,145,.055); }
.admin-dashboard-mode .feature-content,.feature-content { background:linear-gradient(180deg,#F1F9FC,#FCFDFE); }
.admin-dashboard-intro { position:relative; overflow:hidden; border-radius:22px; background:radial-gradient(circle at 96% 22%,rgba(69,184,234,.10) 0 7%,transparent 7.5%),linear-gradient(110deg,#E7F7FD,#F9FCFE 70%); }
.admin-dashboard-intro::after { content:""; position:absolute; right:-45px; top:-63px; width:150px; height:150px; border:1px solid rgba(47,160,212,.18); border-radius:50%; box-shadow:0 0 0 20px rgba(47,160,212,.06),0 0 0 42px rgba(47,160,212,.04); pointer-events:none; }
.admin-dashboard-card { box-shadow:0 8px 20px rgba(28,96,145,.08)!important; }
.feature-tile,.feature-card,.notice-preview,.assessment-question,.video-library-card,.subject-card,.profile-preview,.admin-record-card,.admin-student-card,.student-filter-panel,.community-compose,.post-card,.admin-profile-card,.admin-profile-access { border-color:#DCEAF1!important; box-shadow:0 7px 19px rgba(28,96,145,.06)!important; }
.feature-tile:hover { border-color:#9BD6EF!important; box-shadow:0 11px 24px rgba(28,125,177,.11)!important; }
.tile-icon { border-color:#D6EAF3; background:#E4F5FC!important; color:#2789BC!important; }
.empty-state { border-color:#D7E8F0; background:linear-gradient(135deg,#fff,#F4FAFD); }
.auth-screen { background:radial-gradient(ellipse at 10% 8%,#DDF4FE,#F5FAFD 56%,#EFF8FC); }
.auth-visual { background:radial-gradient(circle at 85% 14%,rgba(255,255,255,.36) 0 8%,transparent 8.4%),linear-gradient(145deg,#68CEF1,#1688D5); }
.mobile-bottom-nav { background:rgba(255,255,255,.97); border-color:#D9EAF2; box-shadow:0 -6px 22px rgba(28,96,145,.10); }
.mobile-nav-item { color:#6E8194; }
.mobile-nav-item.active,.mobile-nav-item.active>span { color:#1688D5; }
.bottom-more-sheet,.account-menu { border-color:#DCEAF1; background:#fff; color:#17304B; }
.legal-hero { background:linear-gradient(110deg,#67CDF0,#1688D5); }
.legal-back,.legal-contact { background:#1688D5; color:#fff; }
.download-wrap { border-color:#DCEAF1; background:linear-gradient(145deg,#fff,#F2FAFD); }
.session-checking .session-splash { background:radial-gradient(circle at 50% 34%,#C9EDFB 0,#E4F6FD 36%,#F6FAFC 76%); color:#17304B; }
.session-splash-mark { border-color:rgba(197,163,91,.55); background:linear-gradient(145deg,#79D6F4,#218FD4); box-shadow:0 0 30px rgba(69,184,234,.20),0 0 0 8px rgba(197,163,91,.08); }
.session-splash>b { color:#17385C; }
.session-splash small { color:#57738C; }
.admin-dashboard-mode .admin-page-header { padding:0; margin:0 0 12px; border:0; background:transparent; box-shadow:none; }
.admin-dashboard-mode .admin-page-header>div { display:none; }

@media(max-width:760px) {
  .topbar { margin:0 -14px 17px; padding:12px 14px; border-radius:0 0 19px 19px; }
  .feature-modal-head { padding:14px 16px; }
  .feature-content { padding:16px 14px calc(82px + env(safe-area-inset-bottom)); }
  .admin-dashboard-mode .feature-content { padding:15px 13px calc(82px + env(safe-area-inset-bottom)); }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; } }

/* Student Profile: compact read mode, explicit edit mode, and a non-overlapping scroll header. */
.feature-modal.student-profile-mode .feature-sheet{display:flex;flex-direction:column;max-height:min(94dvh,900px);overflow:hidden}
.feature-modal.student-profile-mode .feature-modal-head{position:relative;z-index:2;flex:0 0 auto}
.feature-modal.student-profile-mode .feature-content{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scroll-padding-top:12px}
.student-profile-summary{display:grid;grid-template-columns:112px minmax(0,1fr);gap:18px;align-items:center;padding:18px;border:1px solid #D7E6F4;border-radius:20px;background:linear-gradient(140deg,#fff,#F5F9FE);box-shadow:0 10px 26px rgba(16,61,111,.09)}
.student-profile-photo-column{display:grid;justify-items:center;gap:8px;min-width:0}
.student-profile-avatar{width:94px;height:94px;border:3px solid #fff;box-shadow:0 0 0 2px #9DCBF0,0 7px 18px rgba(24,94,155,.15);background:#E8F4FF;color:#145B9B;font-size:30px;object-fit:cover}
.student-profile-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;min-width:0}
.student-profile-field{display:grid;gap:3px;min-width:0;padding-bottom:7px;border-bottom:1px solid #E7EEF5}
.student-profile-field>span{color:#65778D;font-size:10px;font-weight:700;letter-spacing:.02em}
.student-profile-field>strong{color:#172E4B;font-size:13px;font-weight:750;line-height:1.35;overflow-wrap:anywhere}
.student-profile-name{grid-column:1/-1}
.student-profile-name>strong{font-size:18px;color:#123D70}
.student-profile-actions{display:flex;justify-content:center;margin:15px 0 20px}
.student-profile-actions .feature-submit{width:min(100%,340px);min-height:46px}
.profile-edit-panel{display:grid;grid-template-columns:140px minmax(0,1fr);gap:20px;align-items:start;padding:18px;border:1px solid #D7E6F4;border-radius:20px;background:#fff;box-shadow:0 8px 22px rgba(16,61,111,.07)}
.profile-edit-photo{display:grid;justify-items:center;gap:10px;text-align:center}
.profile-edit-photo .student-profile-avatar{width:104px;height:104px}
.profile-edit-panel .profile-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.profile-edit-panel .profile-form>label{min-width:0}
.profile-edit-panel .profile-form input:disabled{opacity:.75}
.student-profile-edit-actions{grid-column:1/-1;display:flex;gap:10px;align-items:center}
.student-profile-edit-actions .feature-submit{flex:1}
.student-profile-edit-actions .small-action{min-width:100px;min-height:46px}
@media(max-width:520px){.student-profile-summary{grid-template-columns:76px minmax(0,1fr);gap:12px;padding:14px}.student-profile-avatar{width:68px;height:68px;font-size:24px}.student-profile-details{gap:8px 10px}.student-profile-field>span{font-size:9px}.student-profile-field>strong{font-size:11px}.student-profile-name>strong{font-size:16px}.profile-edit-panel{grid-template-columns:1fr;gap:14px;padding:15px}.profile-edit-photo{grid-template-columns:auto 1fr;justify-items:start;text-align:left;align-items:center}.profile-edit-photo .student-profile-avatar{grid-row:span 2;width:72px;height:72px}.profile-edit-photo .small-action{align-self:end}.profile-edit-panel .profile-form{grid-template-columns:1fr;gap:10px}.student-profile-edit-actions{position:sticky;bottom:-14px;padding:10px 0 max(2px,env(safe-area-inset-bottom));background:linear-gradient(180deg,rgba(255,255,255,.88),#fff 35%);z-index:1}}
