/* portal-redesign.css - Genius E-learning Academy complete visual refresh
   Safe front-end layer only: does not alter PHP/database logic. */
:root{
  --ink:#07111f;
  --navy:#081628;
  --navy-2:#0d2546;
  --panel:#ffffff;
  --panel-soft:#f6f8fc;
  --muted:#64748b;
  --line:rgba(148,163,184,.26);
  --brand:#20e3b2;
  --brand-2:#18a4ff;
  --gold:#ffd166;
  --rose:#ff5a7a;
  --violet:#8b5cf6;
  --success:#16a34a;
  --danger:#ef4444;
  --warning:#f59e0b;
  --radius:24px;
  --radius-sm:14px;
  --shadow:0 24px 80px rgba(8,22,40,.18);
  --shadow-soft:0 12px 35px rgba(8,22,40,.10);
  --ease:all .25s ease;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0!important;
  min-height:100vh!important;
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif!important;
  color:var(--ink)!important;
  background:
    radial-gradient(circle at 8% 8%, rgba(32,227,178,.20), transparent 26rem),
    radial-gradient(circle at 93% 9%, rgba(24,164,255,.20), transparent 26rem),
    linear-gradient(135deg,#eef7ff 0%,#f7fbff 42%,#fff7ef 100%)!important;
  line-height:1.65!important;
  overflow-x:hidden;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.42;
  background-image:
    linear-gradient(rgba(8,22,40,.055) 1px,transparent 1px),
    linear-gradient(90deg,rgba(8,22,40,.055) 1px,transparent 1px);
  background-size:46px 46px;
  mask-image:linear-gradient(to bottom,#000,transparent 82%);
  z-index:-1;
}
a{color:inherit}
img{max-width:100%}
.portal-shell,.container{width:min(1180px,calc(100% - 32px))!important;margin-inline:auto!important;padding-left:0!important;padding-right:0!important;}
.container{margin-top:28px!important;margin-bottom:42px!important;}
/* completely new homepage */
.portal-home{background:#eef7ff!important;}
.portal-topbar{
  width:min(1180px,calc(100% - 32px));
  margin:18px auto 0;
  padding:12px 14px;
  border:1px solid rgba(255,255,255,.56);
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(18px);
  border-radius:999px;
  box-shadow:0 18px 55px rgba(8,22,40,.10);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  position:sticky;
  top:12px;
  z-index:80;
}
/* Logo fix v6: give the real academy logo enough room and never crop it. */
.brand-lockup{display:flex;align-items:center;gap:14px;text-decoration:none!important;min-width:270px;min-height:74px;}
.brand-logo,.logo{width:76px!important;height:76px!important;max-width:76px!important;max-height:76px!important;object-fit:contain!important;object-position:center!important;border-radius:20px!important;border:3px solid rgba(255,255,255,.92)!important;box-shadow:0 12px 28px rgba(8,22,40,.18)!important;background:#fff!important;padding:4px!important;flex:0 0 76px!important;}
.brand-wordmark{display:flex;flex-direction:column;line-height:1.1;}
.brand-name,.school-name{font-weight:900!important;letter-spacing:-.04em!important;color:#081628!important;text-shadow:none!important;margin:0!important;}
.brand-name{font-size:1rem!important;}
.brand-subtitle,.tagline{font-size:.76rem!important;color:#64748b!important;text-shadow:none!important;margin-top:3px!important;font-weight:700!important;letter-spacing:.01em!important;}
.portal-menu{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:center;}
.portal-menu a,.portal-menu button,.admin-pill,.admin-access-btn,.admin-nav-btn,.nav-link{
  border:0!important;
  text-decoration:none!important;
  color:#0f2038!important;
  background:transparent!important;
  padding:10px 14px!important;
  border-radius:999px!important;
  font-weight:850!important;
  font-size:.91rem!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  transition:var(--ease)!important;
  cursor:pointer!important;
  width:auto!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
}
.portal-menu a:hover,.portal-menu a.active,.nav-link:hover,.nav-link.active{background:#e9f4ff!important;color:#0c6edb!important;transform:translateY(-1px);}
.admin-pill,.admin-access-btn,.admin-nav-btn:not(.logout){background:linear-gradient(135deg,var(--navy),#143a69)!important;color:#fff!important;padding:11px 16px!important;box-shadow:0 12px 26px rgba(8,22,40,.22)!important;}
.admin-pill:hover,.admin-access-btn:hover,.admin-nav-btn:hover{transform:translateY(-2px)!important;box-shadow:0 16px 34px rgba(8,22,40,.27)!important;}
.admin-nav-btn.logout{background:linear-gradient(135deg,#ff5a7a,#ef4444)!important;color:#fff!important;}
.portal-hero{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);gap:26px;align-items:stretch;padding:40px 0 24px;}
.hero-copy,.hero-console,.launchpad-card,.path-card,.feature-card,.mission-card,.vision-card,.team-member,.contact-card,.admin-panel,.dashboard-card,.access-form,.profile-card,.progress-card,.about-content,.team-section,.features-section,.header,.page-card{
  border:1px solid rgba(255,255,255,.70)!important;
  background:rgba(255,255,255,.78)!important;
  backdrop-filter:blur(18px)!important;
  border-radius:var(--radius)!important;
  box-shadow:var(--shadow-soft)!important;
}
.hero-copy{padding:42px!important;position:relative;overflow:hidden;}
.hero-copy::after{content:"";position:absolute;right:-80px;bottom:-100px;width:260px;height:260px;border-radius:50%;background:linear-gradient(135deg,rgba(32,227,178,.25),rgba(24,164,255,.22));filter:blur(2px);}
.hero-badge{display:inline-flex;align-items:center;gap:10px;padding:9px 13px;border-radius:999px;background:#eafff9;color:#057a66;font-weight:900;font-size:.86rem;margin-bottom:18px;border:1px solid rgba(32,227,178,.33);}
.hero-copy h1{font-size:clamp(2.35rem,5vw,5rem)!important;line-height:.98!important;margin:0 0 18px!important;letter-spacing:-.07em!important;color:#07111f!important;font-weight:950!important;}
.hero-copy h1 span{background:linear-gradient(135deg,#089f83,#0d7fe8);-webkit-background-clip:text;background-clip:text;color:transparent;}
.hero-lead{font-size:1.06rem!important;color:#475569!important;max-width:720px;margin:0 0 26px!important;}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:26px;}
.hero-actions .hero-start-learning{
  min-width:250px!important;
  padding-left:34px!important;
  padding-right:34px!important;
}
.btn,.hero-btn,.btn-primary,.btn-success,.btn-info,.btn-danger,.action-btn{
  border:0!important;
  border-radius:16px!important;
  padding:13px 18px!important;
  font-weight:900!important;
  font-size:.95rem!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  text-decoration:none!important;
  cursor:pointer!important;
  transition:var(--ease)!important;
  min-height:46px;
  line-height:1.1;
  width:auto!important;
}
.btn,.hero-btn.primary,.btn-primary{background:linear-gradient(135deg,#10b981,#18a4ff)!important;color:#fff!important;box-shadow:0 18px 35px rgba(24,164,255,.26)!important;}
.hero-btn.secondary,.btn-info{background:#081628!important;color:#fff!important;box-shadow:0 18px 35px rgba(8,22,40,.22)!important;}
.btn-success{background:linear-gradient(135deg,#16a34a,#20e3b2)!important;color:#fff!important;}
.btn-danger,.delete-btn{background:linear-gradient(135deg,#ff5a7a,#ef4444)!important;color:#fff!important;}
.btn:hover,.hero-btn:hover,.action-btn:hover{transform:translateY(-2px)!important;filter:saturate(1.08);}
.hero-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;position:relative;z-index:2;}
.metric-tile{padding:16px;border-radius:18px;background:rgba(248,250,252,.82);border:1px solid var(--line);}
.metric-number{font-size:1.6rem;font-weight:950;color:#081628;display:block;line-height:1;}
.metric-label{font-size:.82rem;font-weight:800;color:#64748b;display:block;margin-top:6px;}
.hero-console{padding:22px!important;background:linear-gradient(160deg,#081628,#0f2d52 58%,#073f45)!important;color:#fff!important;position:relative;overflow:hidden;}
.hero-console::before{content:"";position:absolute;inset:-30%;background:radial-gradient(circle at 20% 10%,rgba(32,227,178,.25),transparent 30%),radial-gradient(circle at 86% 20%,rgba(24,164,255,.24),transparent 28%);}
.console-top{position:relative;display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;}
.console-dots{display:flex;gap:7px}.console-dots span{width:10px;height:10px;border-radius:50%;background:#20e3b2;display:block}.console-dots span:nth-child(2){background:#ffd166}.console-dots span:nth-child(3){background:#ff5a7a}
.console-status{font-weight:900;font-size:.83rem;background:rgba(255,255,255,.12);padding:7px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.16)}
.device-frame{position:relative;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.10);border-radius:24px;padding:18px;box-shadow:inset 0 1px 0 rgba(255,255,255,.20);}
.device-screen{background:rgba(255,255,255,.92);color:#081628;border-radius:18px;padding:18px;min-height:340px;}
.screen-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
.screen-title{font-weight:950;letter-spacing:-.03em;}.screen-pill{font-size:.76rem;font-weight:900;color:#06735e;background:#dffff6;border-radius:999px;padding:6px 9px;}
.journey-step{display:grid;grid-template-columns:38px 1fr;gap:12px;align-items:start;margin:12px 0;padding:12px;border-radius:16px;background:#f7fbff;border:1px solid #e6eef8;}
.step-no{height:38px;width:38px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(135deg,#20e3b2,#18a4ff);color:#fff;font-weight:950;}
.step-text strong{display:block;color:#081628;font-weight:950;}.step-text span{font-size:.84rem;color:#64748b;font-weight:700;}
.launchpad-section{padding:20px 0 40px;}
.section-kicker{font-size:.82rem;text-transform:uppercase;letter-spacing:.16em;color:#089f83;font-weight:950;margin:0 0 8px;}
.section-title,.page-title h1,.features-title{font-size:clamp(1.65rem,3vw,2.7rem)!important;letter-spacing:-.055em!important;line-height:1.08!important;color:#081628!important;margin:0 0 10px!important;text-align:left!important;font-weight:950!important;}
.section-lead,.page-title p{color:#64748b!important;font-weight:700!important;margin:0!important;text-align:left!important;max-width:760px!important;}
.launchpad-head,.page-title{display:flex!important;align-items:end!important;justify-content:space-between!important;gap:24px!important;margin:0 0 22px!important;text-align:left!important;position:relative!important;}
.page-title::after{display:none!important;}
.grades-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;gap:16px!important;margin:0 0 28px!important;}
.grade-card{
  padding:20px!important;
  min-height:176px;
  border-radius:24px!important;
  border:1px solid rgba(255,255,255,.8)!important;
  background:linear-gradient(145deg,rgba(255,255,255,.94),rgba(235,248,255,.86))!important;
  box-shadow:var(--shadow-soft)!important;
  cursor:pointer!important;
  position:relative!important;
  overflow:hidden!important;
  transition:var(--ease)!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  text-align:left!important;
}
.grade-card::before{content:""!important;position:absolute!important;inset:auto -42px -58px auto!important;width:150px!important;height:150px!important;border-radius:50%!important;background:radial-gradient(circle,rgba(32,227,178,.35),transparent 66%)!important;}
.grade-card::after{content:"Launch";position:absolute;right:16px;top:16px;font-size:.72rem;font-weight:950;color:#087f72;background:#e4fff7;border:1px solid rgba(32,227,178,.32);padding:5px 9px;border-radius:999px;}
.grade-card:hover{transform:translateY(-8px) scale(1.01)!important;box-shadow:0 28px 60px rgba(8,22,40,.17)!important;background:linear-gradient(145deg,#fff,#e7fff8)!important;border-color:rgba(32,227,178,.48)!important;}

/* Special homepage card: Generate Teachers Content */
.grade-card.teacher-content-home-card{
  background:linear-gradient(135deg,#f97316 0%,#ea580c 44%,#102a4c 44.5%,#071a33 100%)!important;
  border:2px solid rgba(249,115,22,.72)!important;
  box-shadow:0 22px 48px rgba(7,26,51,.28),0 8px 22px rgba(249,115,22,.18)!important;
  color:#fff!important;
}
.grade-card.teacher-content-home-card::before{
  content:""!important;
  position:absolute!important;
  inset:auto -36px -58px auto!important;
  width:170px!important;
  height:170px!important;
  border-radius:50%!important;
  background:radial-gradient(circle,rgba(255,255,255,.18),transparent 68%)!important;
}
.grade-card.teacher-content-home-card::after{
  content:"TEACHER TOOL"!important;
  color:#071a33!important;
  background:#ffb347!important;
  border:1px solid rgba(255,255,255,.48)!important;
  box-shadow:0 6px 16px rgba(7,26,51,.18)!important;
}
.grade-card.teacher-content-home-card .grade-icon{
  background:#ff8a1f!important;
  color:#fff!important;
  box-shadow:0 12px 26px rgba(0,0,0,.24),inset 0 0 0 1px rgba(255,255,255,.28)!important;
}
.grade-card.teacher-content-home-card .grade-number{color:#fff!important;}
.grade-card.teacher-content-home-card .grade-name{color:#ffe8d1!important;}
.grade-card.teacher-content-home-card:hover{
  transform:translateY(-8px) scale(1.015)!important;
  background:linear-gradient(135deg,#ff861c 0%,#f0640a 44%,#15365f 44.5%,#0a2242 100%)!important;
  border-color:#ff9b42!important;
  box-shadow:0 30px 68px rgba(7,26,51,.34),0 10px 28px rgba(249,115,22,.28)!important;
}
.grade-icon{width:52px!important;height:52px!important;border-radius:18px!important;display:grid!important;place-items:center!important;background:linear-gradient(135deg,#081628,#0f3b68)!important;color:#20e3b2!important;font-size:1.15rem!important;margin:0 0 18px!important;box-shadow:0 14px 28px rgba(8,22,40,.20)!important;}
.grade-number{font-size:1.5rem!important;font-weight:950!important;color:#081628!important;letter-spacing:-.04em!important;margin:0!important;display:block!important;}
.grade-name{font-size:.85rem!important;color:#64748b!important;font-weight:850!important;margin-top:2px!important;display:block!important;}
.path-grid,.features-grid,.dashboard-stats,.stats-grid,.options-grid,.subjects-grid,.chapters-grid,.materials-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(230px,1fr))!important;gap:16px!important;}
.path-card,.feature-card,.stat-card,.option-card,.subject-card,.chapter-card,.material-card,.dashboard-card,.stat-item{padding:22px!important;border-radius:24px!important;background:rgba(255,255,255,.78)!important;border:1px solid rgba(255,255,255,.72)!important;box-shadow:var(--shadow-soft)!important;transition:var(--ease)!important;text-decoration:none!important;color:#081628!important;}
.path-card:hover,.feature-card:hover,.stat-card:hover,.option-card:hover,.subject-card:hover,.chapter-card:hover,.material-card:hover,.dashboard-card:hover{transform:translateY(-6px)!important;box-shadow:0 24px 55px rgba(8,22,40,.15)!important;}
.path-icon,.feature-icon,.stat-icon,.option-icon,.subject-icon,.chapter-icon,.material-icon,.member-icon{width:50px!important;height:50px!important;border-radius:18px!important;display:grid!important;place-items:center!important;background:linear-gradient(135deg,#eafff9,#eaf5ff)!important;color:#0d7fe8!important;font-size:1.2rem!important;margin:0 0 14px!important;}
.path-card h3,.feature-card h3,.feature-text h3,.dashboard-card h3,.option-card h3,.subject-card h3,.chapter-card h3,.material-card h3{font-size:1.08rem!important;color:#081628!important;font-weight:950!important;letter-spacing:-.03em!important;margin:0 0 7px!important;}
.path-card p,.feature-card p,.feature-text p,.dashboard-card p,.option-card p,.subject-card p,.chapter-card p,.material-card p{color:#64748b!important;font-weight:700!important;font-size:.92rem!important;margin:0!important;}
/* Override old header/nav without rewriting every PHP file */
.header-section{background:transparent!important;color:#081628!important;padding:0!important;box-shadow:none!important;overflow:visible!important;position:relative!important;}
.header-section::before{display:none!important;}
.header-top{width:min(1180px,calc(100% - 32px))!important;margin:18px auto 0!important;padding:12px 14px!important;border:1px solid rgba(255,255,255,.56)!important;background:rgba(255,255,255,.72)!important;backdrop-filter:blur(18px)!important;border-radius:999px!important;box-shadow:0 18px 55px rgba(8,22,40,.10)!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;position:sticky!important;top:12px!important;z-index:80!important;}
.logo-container{display:flex!important;align-items:center!important;gap:12px!important;min-width:260px!important;}
.school-info{display:flex!important;flex-direction:column!important;}
.navbar{background:transparent!important;backdrop-filter:none!important;margin:12px 0 0!important;border:0!important;position:relative!important;z-index:30!important;}
.nav-container{width:min(1180px,calc(100% - 32px))!important;margin:0 auto!important;padding:0!important;}
.nav-menu{display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;list-style:none!important;margin:0!important;padding:8px!important;border-radius:999px!important;background:rgba(255,255,255,.58)!important;border:1px solid rgba(255,255,255,.60)!important;box-shadow:0 12px 32px rgba(8,22,40,.08)!important;flex-wrap:wrap!important;}
.nav-link::after{display:none!important;}
/* forms and modals */
.modal{background:rgba(8,22,40,.58)!important;backdrop-filter:blur(10px)!important;z-index:2000!important;padding:18px!important;}
.modal-content{max-width:560px!important;border-radius:28px!important;overflow:hidden!important;background:rgba(255,255,255,.96)!important;border:1px solid rgba(255,255,255,.72)!important;box-shadow:0 34px 90px rgba(8,22,40,.34)!important;margin:5vh auto!important;}
.modal-header{padding:18px 22px!important;background:linear-gradient(135deg,#081628,#0e3c68)!important;color:#fff!important;display:flex!important;justify-content:space-between!important;align-items:center!important;}
.modal-header h3{font-size:1.08rem!important;font-weight:950!important;margin:0!important;color:#fff!important;letter-spacing:-.02em!important;}
.close{color:#fff!important;opacity:.88!important;font-size:1.65rem!important;cursor:pointer!important;line-height:1!important;}
.modal-body{padding:22px!important;}
.syllabus-options{display:grid!important;gap:12px!important;}
.syllabus-option{display:flex!important;gap:12px!important;align-items:center!important;padding:14px!important;border-radius:18px!important;border:1px solid #e5eef7!important;background:#f8fbff!important;transition:var(--ease)!important;cursor:pointer!important;}
.syllabus-option:hover{transform:translateY(-3px)!important;background:#eafff9!important;border-color:rgba(32,227,178,.38)!important;}
.syllabus-icon{width:46px!important;height:46px!important;border-radius:15px!important;display:grid!important;place-items:center!important;background:linear-gradient(135deg,#20e3b2,#18a4ff)!important;color:#fff!important;flex-shrink:0!important;}
.syllabus-info h4{margin:0 0 4px!important;color:#081628!important;font-weight:950!important}.syllabus-info p{margin:0!important;color:#64748b!important;font-weight:700!important;font-size:.86rem!important}
.form-group{margin-bottom:18px!important;}
.form-group label{display:flex!important;align-items:center!important;gap:8px!important;margin-bottom:8px!important;font-weight:900!important;color:#10233d!important;}
.form-control,.form-group input,.form-group select,.form-group textarea,input[type="text"],input[type="password"],input[type="email"],input[type="number"],input[type="url"],input[type="file"],select,textarea{
  width:100%!important;border:1px solid #d9e5f2!important;background:#fff!important;color:#081628!important;border-radius:16px!important;padding:13px 14px!important;font:inherit!important;font-weight:650!important;outline:none!important;transition:var(--ease)!important;box-shadow:none!important;}
.form-control:focus,.form-group input:focus,.form-group select:focus,.form-group textarea:focus,input:focus,select:focus,textarea:focus{border-color:#18a4ff!important;box-shadow:0 0 0 4px rgba(24,164,255,.14)!important;}
textarea{min-height:110px;resize:vertical;}
.message,.success-message,.error-message,.global-error-message,.info-message,.alert{border-radius:18px!important;padding:13px 15px!important;font-weight:850!important;border:1px solid transparent!important;box-shadow:none!important;margin:12px 0!important;}
.success-message{background:#e8fff5!important;color:#067a51!important;border-color:#b7f5d6!important;}.error-message{background:#fff0f2!important;color:#b91c1c!important;border-color:#ffcdd6!important}.global-error-message{width:min(1180px,calc(100% - 32px))!important;background:#fff0f2!important;color:#b91c1c!important;border:1px solid #ffcdd6!important;margin:18px auto!important;text-align:center!important;}.info-message{background:#eff6ff!important;color:#1d4ed8!important;border-color:#bfdbfe!important;}
/* tables/admin */
.admin-panel,.access-form{padding:24px!important;margin-top:22px!important;}
.nav-tabs{display:flex!important;gap:8px!important;flex-wrap:wrap!important;border:0!important;margin:0 0 18px!important;background:#eef6ff!important;border-radius:20px!important;padding:8px!important;}
.nav-tab{border:0!important;border-radius:16px!important;background:transparent!important;color:#334155!important;padding:12px 14px!important;font-weight:900!important;cursor:pointer!important;transition:var(--ease)!important;}
.nav-tab.active,.nav-tab:hover{background:#fff!important;color:#087f72!important;box-shadow:0 10px 28px rgba(8,22,40,.10)!important;border-bottom:0!important;}
.table,.data-table{width:100%!important;border-collapse:separate!important;border-spacing:0 10px!important;background:transparent!important;}
.table th,.data-table th{background:#081628!important;color:#fff!important;font-weight:900!important;padding:13px!important;text-align:left!important;white-space:nowrap!important;}
.table th:first-child,.data-table th:first-child{border-radius:14px 0 0 14px!important}.table th:last-child,.data-table th:last-child{border-radius:0 14px 14px 0!important}
.table td,.data-table td{background:#fff!important;padding:13px!important;border-top:1px solid #e7eef7!important;border-bottom:1px solid #e7eef7!important;color:#0f2038!important;font-weight:650!important;vertical-align:middle!important;}
.table tr td:first-child,.data-table tr td:first-child{border-left:1px solid #e7eef7!important;border-radius:14px 0 0 14px!important}.table tr td:last-child,.data-table tr td:last-child{border-right:1px solid #e7eef7!important;border-radius:0 14px 14px 0!important}
.action-buttons,.btn-group{display:flex!important;gap:8px!important;flex-wrap:wrap!important;align-items:center!important;}
.edit-btn{background:linear-gradient(135deg,#ffd166,#f59e0b)!important;color:#3b2500!important}.view-btn{background:linear-gradient(135deg,#18a4ff,#2563eb)!important;color:#fff!important}
/* upload enhancement */
input[type="file"]{padding:16px!important;background:linear-gradient(135deg,#ffffff,#f2fbff)!important;border:2px dashed #9edbff!important;cursor:pointer!important;}
.ge-upload-note{margin-top:8px;padding:11px 12px;border-radius:14px;background:#eafff9;color:#075f55;font-weight:850;font-size:.85rem;border:1px solid rgba(32,227,178,.26);display:none;}
.ge-upload-note.show{display:flex;align-items:center;gap:8px;}
.ge-submit-loading{opacity:.78;pointer-events:none;}
/* content cards */
.header{padding:28px!important;margin:24px auto!important;text-align:center!important;}
.header .school-name{font-size:clamp(1.6rem,3vw,2.6rem)!important;}.header .tagline{font-size:1rem!important;}
.footer{width:min(1180px,calc(100% - 32px))!important;margin:36px auto 0!important;padding:24px!important;border-radius:24px 24px 0 0!important;border:1px solid rgba(255,255,255,.66)!important;border-bottom:0!important;background:rgba(255,255,255,.70)!important;color:#64748b!important;text-align:center!important;font-weight:800!important;}
/* reading/progress/material pages */
.material-item,.progress-item,.chapter-item,.subject-item,.list-item{background:rgba(255,255,255,.86)!important;border:1px solid #e7eef7!important;border-left:5px solid #20e3b2!important;border-radius:18px!important;padding:16px!important;margin-bottom:12px!important;box-shadow:0 8px 22px rgba(8,22,40,.07)!important;}
.progress-bar{height:12px!important;border-radius:999px!important;background:#e2e8f0!important;overflow:hidden!important}.progress-fill,.progress{height:100%!important;border-radius:inherit!important;background:linear-gradient(90deg,#20e3b2,#18a4ff)!important;}
/* responsive */
@media(max-width:900px){
 .portal-topbar,.header-top{border-radius:26px!important;align-items:flex-start!important;position:relative!important;top:0!important;flex-direction:column!important;}
 .portal-menu{justify-content:flex-start;width:100%;}.portal-menu a,.portal-menu button{flex:1;justify-content:center;}
 .portal-hero{grid-template-columns:1fr!important;padding-top:24px}.hero-copy{padding:28px!important}.hero-metrics{grid-template-columns:1fr!important}.launchpad-head,.page-title{display:block!important}.section-title,.page-title h1,.section-lead,.page-title p{text-align:left!important}.grades-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important}
 .nav-menu{border-radius:22px!important}.nav-link{flex:1;justify-content:center!important}.logo-container{min-width:0!important}.school-name{font-size:1rem!important}.tagline{font-size:.72rem!important}
}
@media(max-width:560px){
 .portal-shell,.container,.portal-topbar,.header-top,.nav-container,.footer{width:calc(100% - 18px)!important}.hero-copy{padding:22px!important}.hero-copy h1{font-size:2.2rem!important}.device-screen{min-height:auto}.grades-grid{grid-template-columns:1fr 1fr!important}.grade-card{min-height:150px;padding:16px!important}.portal-menu a,.portal-menu button,.nav-link{font-size:.82rem!important;padding:9px 10px!important}.path-grid,.features-grid,.dashboard-stats,.stats-grid,.options-grid,.subjects-grid,.chapters-grid,.materials-grid{grid-template-columns:1fr!important}.table-wrap{overflow-x:auto!important}.table,.data-table{min-width:720px!important}.modal-content{margin:2vh auto!important;border-radius:22px!important}
}


/* Header learner shortcut: keeps grade selection one tap away without showing admin login on index */
.portal-menu .top-start-learning{
  background:linear-gradient(135deg,#20e3b2,#18a4ff)!important;
  color:#fff!important;
  box-shadow:0 14px 30px rgba(24,164,255,.26)!important;
  padding:11px 17px!important;
}
.portal-menu .top-start-learning:hover{
  color:#fff!important;
  transform:translateY(-2px)!important;
  box-shadow:0 18px 38px rgba(8,22,40,.22)!important;
}
.portal-menu .top-start-learning i{color:#fff!important;}
@media(max-width:900px){
  .portal-home .portal-topbar{position:sticky!important;top:8px!important;z-index:120!important;}
  .portal-menu .top-start-learning{flex:1 1 100%!important;justify-content:center!important;font-size:.9rem!important;}
}
@media(max-width:560px){
  .portal-home .portal-topbar{width:calc(100% - 14px)!important;margin-top:8px!important;padding:10px!important;}
}

/* v5 accessibility update: header Start Learning shortcut + v4 consistency layer */
.portal-menu .admin-pill{display:none!important;}
.grades-grid{grid-template-columns:repeat(auto-fill,minmax(165px,1fr))!important;align-items:stretch!important;max-height:none!important;overflow:visible!important;}
.grade-card{width:100%!important;}
.welcome-section,.subject-info-card,.chapter-info-card,.tip-box,.account-notice,.info-grid,.dashboard-actions,.material-section,.empty-state,.empty-message,.tab-content,.form-container,.admin-dashboard-section,.upload-section,.content-card,.section-card{
  background:rgba(255,255,255,.78)!important;
  border:1px solid rgba(255,255,255,.72)!important;
  border-radius:24px!important;
  box-shadow:var(--shadow-soft)!important;
  backdrop-filter:blur(18px)!important;
  padding:22px!important;
}
.welcome-section,.subject-info-card,.chapter-info-card,.tip-box,.account-notice{margin-bottom:22px!important;}
.info-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;gap:16px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;}
.info-item{background:#fff!important;border:1px solid #e7eef7!important;border-radius:20px!important;padding:16px!important;box-shadow:0 8px 24px rgba(8,22,40,.07)!important;display:flex!important;align-items:center!important;gap:14px!important;}
.info-icon{width:48px!important;height:48px!important;border-radius:16px!important;display:grid!important;place-items:center!important;background:linear-gradient(135deg,#eafff9,#eaf5ff)!important;color:#0d7fe8!important;font-size:1.1rem!important;flex:0 0 auto!important;}
.info-content h3,.info-content h4,.welcome-section h2,.tip-box h3,.section-header h3{color:#081628!important;font-weight:950!important;letter-spacing:-.035em!important;margin:0 0 6px!important;}
.info-content p,.welcome-section p,.tip-box p,.empty-state p,.empty-message p{color:#64748b!important;font-weight:700!important;margin:0!important;}
.dashboard-actions{display:flex!important;gap:12px!important;flex-wrap:wrap!important;justify-content:flex-start!important;align-items:center!important;}
.logout-btn,.exit-btn,.btn-secondary{background:#081628!important;color:#fff!important;border-radius:16px!important;font-weight:900!important;text-decoration:none!important;box-shadow:0 14px 30px rgba(8,22,40,.20)!important;}
.btn-sm{min-height:38px!important;padding:10px 13px!important;border-radius:13px!important;font-size:.84rem!important;}
.admin-panel{background:rgba(255,255,255,.80)!important;border:1px solid rgba(255,255,255,.70)!important;border-radius:28px!important;box-shadow:var(--shadow)!important;}
.tab-content{margin-top:18px!important;min-height:220px!important;}
.tab-header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;margin-bottom:18px!important;}
.tab-header h3{margin:0!important;color:#081628!important;font-weight:950!important;letter-spacing:-.035em!important;}
.tab-actions{display:flex!important;gap:10px!important;flex-wrap:wrap!important;}
.form-container{margin:0 0 20px!important;}
.form-container h4{color:#081628!important;font-weight:950!important;letter-spacing:-.025em!important;}
.data-table tbody tr,.table tbody tr{transition:var(--ease)!important;}
.data-table tbody tr:hover td,.table tbody tr:hover td{background:#f6fbff!important;transform:none!important;}
.material-section{margin-bottom:24px!important;}
.section-header{display:flex!important;align-items:center!important;gap:12px!important;margin-bottom:16px!important;}
.section-icon{width:48px!important;height:48px!important;border-radius:16px!important;display:grid!important;place-items:center!important;background:linear-gradient(135deg,#20e3b2,#18a4ff)!important;color:#fff!important;box-shadow:0 14px 28px rgba(24,164,255,.20)!important;}
.completion-badge,.option-badge{border-radius:999px!important;padding:7px 11px!important;font-size:.78rem!important;font-weight:950!important;border:1px solid rgba(32,227,178,.25)!important;background:#eafff9!important;color:#06735e!important;}
.profile-header{display:flex!important;align-items:center!important;gap:18px!important;margin-bottom:20px!important;}
.profile-avatar{width:76px!important;height:76px!important;border-radius:24px!important;background:linear-gradient(135deg,#20e3b2,#18a4ff)!important;color:#fff!important;display:grid!important;place-items:center!important;font-size:2rem!important;box-shadow:0 18px 38px rgba(24,164,255,.25)!important;}
.profile-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))!important;gap:16px!important;}
input[type="file"]::file-selector-button{border:0;border-radius:12px;background:#081628;color:#fff;font-weight:900;padding:10px 13px;margin-right:12px;cursor:pointer;}
@media(max-width:700px){
 .tab-header,.profile-header{align-items:flex-start!important;flex-direction:column!important;}
 .dashboard-actions,.tab-actions{width:100%!important;}
 .dashboard-actions .action-btn,.dashboard-actions .btn,.tab-actions .btn{flex:1 1 160px!important;}
 .grades-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

/* v6 logo accommodation: keep full logo visible in every header variant. */
.portal-topbar,.header-top{min-height:92px!important;}
.logo-container,.brand-lockup{min-height:76px!important;overflow:visible!important;}
.logo-container .logo,.brand-logo{object-fit:contain!important;object-position:center!important;padding:4px!important;background:#fff!important;}
@media(max-width:760px){
  .brand-lockup,.logo-container{min-width:0!important;width:100%!important;}
  .brand-logo,.logo{width:68px!important;height:68px!important;max-width:68px!important;max-height:68px!important;flex-basis:68px!important;}
  .portal-topbar,.header-top{min-height:auto!important;}
}
@media(max-width:420px){
  .brand-logo,.logo{width:60px!important;height:60px!important;max-width:60px!important;max-height:60px!important;flex-basis:60px!important;}
  .brand-name,.school-name{font-size:.94rem!important;}
  .brand-subtitle,.tagline{font-size:.68rem!important;}
}


/* v7 subject-card accommodation: prevent long subject names from being cut off. */
.student-subjects-grid,
.subjects-grid{
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr))!important;
  align-items:stretch!important;
}
.student-subjects-grid .subject-card,
.subjects-grid .subject-card,
.subject-card{
  min-width:0!important;
  width:100%!important;
  min-height:178px!important;
  padding:24px 20px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  overflow:visible!important;
}
.subject-card .subject-name,
.subject-name,
.subject-card h3,
.subject-header .subject-name{
  display:block!important;
  max-width:100%!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  hyphens:auto!important;
  line-height:1.12!important;
  text-align:center!important;
  font-size:clamp(1.05rem,2.1vw,1.32rem)!important;
}
.subject-header{
  width:100%!important;
  min-width:0!important;
  gap:10px!important;
  align-items:flex-start!important;
}
.subject-header .subject-name{
  text-align:left!important;
}
.subject-icon{
  flex:0 0 auto!important;
}
@media(max-width:760px){
  .student-subjects-grid,
  .subjects-grid{
    grid-template-columns:repeat(auto-fill,minmax(220px,1fr))!important;
  }
  .student-subjects-grid .subject-card,
  .subjects-grid .subject-card,
  .subject-card{
    min-height:170px!important;
    padding:22px 16px!important;
  }
}
@media(max-width:560px){
  .student-subjects-grid,
  .subjects-grid{
    grid-template-columns:1fr!important;
  }
  .subject-card .subject-name,
  .subject-name,
  .subject-card h3{
    font-size:1.2rem!important;
  }
}


/* v8 search, filtering and simple access-control polish */
.ge-search-panel{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  width:100%!important;
  margin:0 0 18px!important;
  padding:12px!important;
  border:1px solid rgba(148,163,184,.25)!important;
  border-radius:20px!important;
  background:rgba(255,255,255,.76)!important;
  box-shadow:0 12px 32px rgba(15,23,42,.07)!important;
}
.ge-search-box{display:flex!important;align-items:center!important;gap:10px!important;flex:1!important;min-width:220px!important;background:#fff!important;border:1px solid #e2e8f0!important;border-radius:16px!important;padding:0 12px!important;min-height:48px!important;}
.ge-search-box i{color:#18a4ff!important;}
.ge-search-box input{border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;width:100%!important;padding:12px 4px!important;font-weight:800!important;color:#081628!important;}
.ge-search-box input::placeholder{color:#94a3b8!important;}
.ge-search-clear{width:34px!important;height:34px!important;border:0!important;border-radius:12px!important;background:#f1f5f9!important;color:#64748b!important;display:grid!important;place-items:center!important;cursor:pointer!important;}
.ge-search-clear:hover{background:#e2e8f0!important;color:#081628!important;}
.ge-search-count{color:#64748b!important;font-weight:900!important;white-space:nowrap!important;}
.access-badge{display:inline-flex!important;align-items:center!important;gap:6px!important;border-radius:999px!important;padding:7px 11px!important;font-size:.78rem!important;font-weight:950!important;}
.access-active{background:#ecfdf5!important;color:#047857!important;border:1px solid #bbf7d0!important;}
.access-blocked{background:#fef2f2!important;color:#b91c1c!important;border:1px solid #fecaca!important;}
.access-admin{background:#eef2ff!important;color:#4338ca!important;border:1px solid #c7d2fe!important;}
.access-pending{background:#fff7ed!important;color:#9a3412!important;border:1px solid #fed7aa!important;}
.access-help{display:block!important;color:#64748b!important;font-weight:800!important;font-size:.72rem!important;margin-top:4px!important;}
.action-buttons{flex-wrap:wrap!important;}
@media(max-width:700px){
  .ge-search-panel{align-items:stretch!important;flex-direction:column!important;}
  .ge-search-count{white-space:normal!important;}
}

/* v9 faster search/isolation behaviour */
.ge-hidden-by-search{display:none!important;}
.ge-search-panel-v9.has-query{border-color:rgba(24,164,255,.38)!important;box-shadow:0 16px 36px rgba(24,164,255,.13)!important;}
.ge-search-active{scroll-margin-top:110px!important;}
.ge-search-match{position:relative!important;outline:3px solid rgba(24,164,255,.25)!important;box-shadow:0 18px 42px rgba(24,164,255,.14)!important;}
.data-table .ge-search-match{outline:0!important;box-shadow:inset 4px 0 0 #18a4ff!important;background:rgba(24,164,255,.06)!important;}
.ge-search-empty{display:none!important;margin:14px 0 22px!important;padding:24px!important;border:1px dashed rgba(148,163,184,.7)!important;border-radius:22px!important;background:rgba(248,250,252,.92)!important;color:#64748b!important;text-align:center!important;font-weight:900!important;}
.ge-search-empty.show{display:grid!important;gap:8px!important;place-items:center!important;}
.ge-search-empty i{font-size:1.7rem!important;color:#18a4ff!important;}
.ge-search-empty strong{color:#0f172a!important;font-size:1.05rem!important;}
.ge-search-empty span{font-size:.92rem!important;}
.ge-search-count{min-height:20px!important;}
@media(max-width:700px){
  .ge-search-panel-v9{position:sticky!important;top:76px!important;z-index:20!important;backdrop-filter:blur(12px)!important;}
}

/* v10 compact responsive tables: reduce horizontal scrolling on admin/student data lists */
.table,.data-table{
  width:100%!important;
  max-width:100%!important;
  table-layout:auto!important;
  border-spacing:0 6px!important;
  font-size:clamp(.68rem,.76vw,.82rem)!important;
}
.table th,.data-table th{
  padding:8px 7px!important;
  font-size:clamp(.66rem,.72vw,.78rem)!important;
  line-height:1.15!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  vertical-align:middle!important;
}
.table td,.data-table td{
  padding:8px 7px!important;
  font-size:clamp(.67rem,.74vw,.8rem)!important;
  line-height:1.22!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  vertical-align:middle!important;
  max-width:210px!important;
}
.table td:first-child,.data-table td:first-child,
.table th:first-child,.data-table th:first-child{
  width:46px!important;
  max-width:58px!important;
  text-align:center!important;
}
.table td:last-child,.data-table td:last-child,
.table th:last-child,.data-table th:last-child{
  min-width:112px!important;
  max-width:150px!important;
}
.data-table td:nth-child(2),.table td:nth-child(2){
  min-width:118px!important;
  max-width:220px!important;
  font-weight:800!important;
}
.data-table td a,.table td a{
  max-width:100%!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
}
.data-table td [style*="max-height"],.table td [style*="max-height"]{
  max-height:58px!important;
  padding:3px!important;
  font-size:.72rem!important;
}
.action-buttons,.btn-group,.data-table .action-buttons,.table .action-buttons{
  gap:4px!important;
  align-items:center!important;
  justify-content:center!important;
  flex-wrap:wrap!important;
}
.action-btn,.btn,.button,.edit-btn,.delete-btn,.view-btn,.allow-btn,.block-btn,
.action-buttons button,.action-buttons a,.btn-group button,.btn-group a{
  padding:6px 8px!important;
  border-radius:10px!important;
  font-size:clamp(.63rem,.68vw,.74rem)!important;
  line-height:1.1!important;
  gap:4px!important;
  min-height:30px!important;
  white-space:normal!important;
}
.action-btn i,.btn i,.button i{font-size:.8em!important;}
.access-badge{
  padding:5px 8px!important;
  font-size:clamp(.62rem,.66vw,.72rem)!important;
  line-height:1.1!important;
  white-space:normal!important;
}
.access-help{font-size:.62rem!important;line-height:1.15!important;}
.data-table-container,
.table-wrap,
#materialsContainer,
#audioContainer,
#videosContainer,
#syllabusMaterialsContainer,
#usersContainer,
#chaptersContainer,
#subjectsContainer,
#gradesContainer,
[id$="Container"]{
  max-width:100%!important;
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch!important;
}
.data-table-container::-webkit-scrollbar,.table-wrap::-webkit-scrollbar,[id$="Container"]::-webkit-scrollbar{height:8px!important;width:8px!important;}
.data-table-container::-webkit-scrollbar-thumb,.table-wrap::-webkit-scrollbar-thumb,[id$="Container"]::-webkit-scrollbar-thumb{background:#b9c8dc!important;border-radius:999px!important;}
.data-table-container::before,.table-wrap::before{
  content:"Compact table view — scroll sideways only if needed";
  display:block!important;
  margin:0 0 8px!important;
  color:#64748b!important;
  font-weight:850!important;
  font-size:.72rem!important;
}
@media(min-width:1000px){
  .admin-panel,.content-card,.form-container{overflow:visible!important;}
  .data-table,.table{min-width:0!important;}
}
@media(max-width:900px){
  .data-table,.table{min-width:760px!important;}
  .table th,.data-table th,.table td,.data-table td{padding:7px 6px!important;}
}
@media(max-width:560px){
  .data-table,.table{min-width:680px!important;}
  .data-table-container::before,.table-wrap::before{font-size:.68rem!important;}
}

/* v11 Smart Bulk Upload styles */
.bulk-upload-panel,
.bulk-review-container { width: 100%; }
.bulk-hero-card,
.bulk-card,
.bulk-alert {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 28px;
  box-shadow: 0 20px 55px rgba(15, 23, 42, .09);
}
.bulk-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 24px;
  margin-bottom: 20px;
  background: radial-gradient(circle at top left, rgba(27, 214, 181,.18), transparent 38%), radial-gradient(circle at bottom right, rgba(59,130,246,.18), transparent 34%), rgba(255,255,255,.96);
}
.bulk-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14,165,233,.12);
  color: #0369a1;
  font-weight: 900;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.bulk-hero-card h3,
.bulk-card h4 { color: #081628; margin: 10px 0; font-weight: 900; }
.bulk-hero-card p,
.bulk-card p { color: #64748b; font-weight: 700; line-height: 1.65; }
.bulk-hero-actions,
.bulk-review-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bulk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.bulk-card { padding: 22px; margin-bottom: 18px; }
.bulk-form { display: grid; gap: 14px; }
.bulk-dropzone {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  border: 2px dashed rgba(14,165,233,.35);
  border-radius: 24px;
  padding: 28px 18px;
  background: linear-gradient(180deg, rgba(14,165,233,.08), rgba(255,255,255,.9));
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.bulk-dropzone:hover { transform: translateY(-2px); box-shadow: 0 16px 35px rgba(14,165,233,.16); border-color: rgba(14,165,233,.7); }
.bulk-dropzone input { width: 100%; max-width: 270px; }
.bulk-dropzone span { font-size: 2.4rem; color: #0ea5e9; }
.bulk-dropzone strong { font-size: 1.05rem; color: #081628; }
.bulk-dropzone small { color: #64748b; font-weight: 700; }
.bulk-code {
  background: #0f172a;
  color: #e0f2fe;
  border-radius: 16px;
  padding: 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-wrap: anywhere;
  font-weight: 800;
  margin: 10px 0 14px;
}
.bulk-examples { display: grid; gap: 8px; }
.bulk-examples span {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.bulk-alert { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin: 16px 0; font-weight: 800; }
.bulk-alert i { font-size: 1.3rem; margin-top: 2px; }
.bulk-alert-warn { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.bulk-alert-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.bulk-review-table-wrap { max-height: none; overflow: auto; border-radius: 18px; }
.bulk-review-table th { white-space: normal; }
.bulk-review-table td { vertical-align: top; min-width: 120px; }
.bulk-review-table td:nth-child(1) { min-width: 54px; text-align: center; }
.bulk-review-table td:nth-child(2) { min-width: 210px; max-width: 280px; }
.bulk-file-name { font-weight: 900; color: #0f172a; overflow-wrap: anywhere; }
.bulk-small-input { min-width: 190px; }
.bulk-detected-cell { font-size: .78rem; line-height: 1.5; color: #475569; min-width: 190px; }
.bulk-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: .72rem;
  font-weight: 900;
  white-space: nowrap;
}
.bulk-ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.bulk-warn { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.bulk-err { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.bulk-muted { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.bulk-confidence,
.bulk-error-text { display: block; margin-top: 6px; font-size: .72rem; font-weight: 800; }
.bulk-error-text { color: #b45309; overflow-wrap: anywhere; }
.bulk-row-status-needs_review { background: rgba(254,243,199,.24); }
.bulk-row-status-duplicate { background: rgba(254,226,226,.2); }
.bottom-actions { margin-top: 16px; justify-content: flex-end; }
.nav-tab[data-tab-name="bulk_upload"] { background: linear-gradient(135deg, rgba(14,165,233,.13), rgba(16,185,129,.13)); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #b91c1c) !important; color: white !important; border: none !important; }
@media (max-width: 900px) {
  .bulk-hero-card { flex-direction: column; align-items: stretch; }
  .bulk-grid { grid-template-columns: 1fr; }
  .bulk-hero-actions, .bulk-review-actions { width: 100%; }
  .bulk-hero-actions .btn, .bulk-review-actions .btn { flex: 1 1 180px; justify-content: center; }
}

/* ==========================================================
   FIX: Grade -> Curriculum/Syllabus modal with 4+ curricula
   Date: 2026-06-29
   This targets the real index.php modal (#syllabusModal and #syllabusOptions).
   It makes the curriculum list compact, grid-based, and freely scrollable.
   ========================================================== */
#syllabusModal.modal {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 18px !important;
}
#syllabusModal .modal-content {
  width: min(940px, calc(100vw - 28px)) !important;
  max-width: 940px !important;
  max-height: calc(100vh - 36px) !important;
  margin: 18px auto !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
#syllabusModal .modal-header {
  flex: 0 0 auto !important;
}
#syllabusModal .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 18px !important;
  display: flex !important;
  flex-direction: column !important;
}
#syllabusModal .modal-body > p {
  flex: 0 0 auto !important;
  margin-bottom: 12px !important;
}
#syllabusOptions,
#syllabusModal .syllabus-options {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: calc(100vh - 190px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  padding: 4px 10px 4px 4px !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-content: start !important;
}
#syllabusOptions::-webkit-scrollbar,
#syllabusModal .syllabus-options::-webkit-scrollbar {
  width: 10px !important;
}
#syllabusOptions::-webkit-scrollbar-track,
#syllabusModal .syllabus-options::-webkit-scrollbar-track {
  background: #eaf2fb !important;
  border-radius: 999px !important;
}
#syllabusOptions::-webkit-scrollbar-thumb,
#syllabusModal .syllabus-options::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #18a4ff, #20e3b2) !important;
  border-radius: 999px !important;
}
#syllabusOptions .syllabus-option,
#syllabusOptions .syllabus-card,
#syllabusOptions .curriculum-choice-card,
#syllabusModal .syllabus-options .syllabus-option,
#syllabusModal .syllabus-options .syllabus-card,
#syllabusModal .syllabus-options .curriculum-choice-card {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 104px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 14px !important;
  border: 1px solid #dbeafe !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg, #ffffff, #f3f9ff) !important;
  color: #081628 !important;
  box-shadow: 0 10px 24px rgba(8, 22, 40, .08) !important;
  cursor: pointer !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) 24px !important;
  gap: 10px !important;
  align-items: center !important;
  text-align: left !important;
  appearance: none !important;
  font: inherit !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}
#syllabusOptions .syllabus-option:hover,
#syllabusOptions .syllabus-card:hover,
#syllabusOptions .curriculum-choice-card:hover {
  transform: translateY(-3px) !important;
  border-color: #20e3b2 !important;
  box-shadow: 0 16px 34px rgba(8, 22, 40, .14) !important;
}
#syllabusOptions .syllabus-icon,
#syllabusModal .syllabus-options .syllabus-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
  display: grid !important;
  place-items: center !important;
  flex-shrink: 0 !important;
  color: #fff !important;
  background: linear-gradient(135deg, #20e3b2, #18a4ff) !important;
}
#syllabusOptions .syllabus-info,
#syllabusModal .syllabus-options .syllabus-info {
  min-width: 0 !important;
  display: block !important;
}
#syllabusOptions .syllabus-info strong,
#syllabusModal .syllabus-options .syllabus-info strong {
  display: block !important;
  margin: 0 0 4px !important;
  color: #081628 !important;
  font-weight: 950 !important;
  line-height: 1.15 !important;
  font-size: .98rem !important;
  overflow-wrap: anywhere !important;
}
#syllabusOptions .syllabus-info small,
#syllabusModal .syllabus-options .syllabus-info small {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  margin: 0 !important;
  color: #64748b !important;
  font-size: .78rem !important;
  line-height: 1.25 !important;
  font-weight: 750 !important;
}
#syllabusOptions .syllabus-arrow,
#syllabusModal .syllabus-options .syllabus-arrow {
  color: #0d7fe8 !important;
  font-size: .9rem !important;
  display: grid !important;
  place-items: center !important;
}
@media (max-width: 800px) {
  #syllabusModal .modal-content {
    width: calc(100vw - 18px) !important;
    max-height: calc(100vh - 18px) !important;
    margin: 9px auto !important;
    border-radius: 22px !important;
  }
  #syllabusOptions,
  #syllabusModal .syllabus-options {
    max-height: calc(100vh - 176px) !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding-right: 8px !important;
  }
  #syllabusOptions .syllabus-option,
  #syllabusOptions .syllabus-card,
  #syllabusOptions .curriculum-choice-card {
    min-height: 96px !important;
    padding: 12px !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
  }
  #syllabusOptions .syllabus-arrow { display: none !important; }
}
@media (max-width: 460px) {
  #syllabusModal { padding: 7px !important; }
  #syllabusModal .modal-body { padding: 14px !important; }
  #syllabusOptions,
  #syllabusModal .syllabus-options {
    grid-template-columns: 1fr !important;
    max-height: calc(100vh - 165px) !important;
  }
}


/* Public application form entry points */
.portal-menu .top-apply-now{
  background:linear-gradient(135deg,#ffb703,#fb8500)!important;
  color:#081628!important;
  box-shadow:0 14px 30px rgba(251,133,0,.24)!important;
  padding:11px 17px!important;
}
.portal-menu .top-apply-now:hover{
  color:#081628!important;
  transform:translateY(-2px)!important;
  box-shadow:0 18px 38px rgba(8,22,40,.20)!important;
}
.portal-menu .top-apply-now i{color:#081628!important;}
.hero-btn.apply{
  background:linear-gradient(135deg,#ffb703,#fb8500)!important;
  color:#081628!important;
  box-shadow:0 18px 35px rgba(251,133,0,.28)!important;
}
.application-cta-section{padding:12px 0 34px;}
.application-cta-card{
  display:grid;
  grid-template-columns:72px minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  padding:24px!important;
  border-radius:28px!important;
  background:linear-gradient(135deg,rgba(255,255,255,.92),rgba(255,248,230,.86))!important;
  border:1px solid rgba(255,183,3,.35)!important;
  box-shadow:var(--shadow-soft)!important;
}
.application-cta-icon{
  width:72px;
  height:72px;
  display:grid;
  place-items:center;
  border-radius:24px;
  background:linear-gradient(135deg,#081628,#0e3c68);
  color:#ffb703;
  font-size:1.55rem;
  box-shadow:0 16px 32px rgba(8,22,40,.18);
}
.application-cta-copy .section-title{margin-bottom:8px!important;}
.application-cta-button{white-space:nowrap;}
@media(max-width:900px){
  .portal-menu .top-apply-now{flex:1 1 calc(50% - 8px)!important;justify-content:center!important;font-size:.9rem!important;}
  .application-cta-card{grid-template-columns:1fr;text-align:left;}
  .application-cta-button{width:100%!important;}
}


/* Public Demo Zone nav button */
.portal-menu .top-demo-zone{
  background:linear-gradient(135deg,#7c3aed,#0c6edb)!important;
  color:#fff!important;
  box-shadow:0 14px 28px rgba(124,58,237,.25)!important;
}
.portal-menu .top-demo-zone:hover{
  background:linear-gradient(135deg,#6d28d9,#0b63c5)!important;
  color:#fff!important;
}
.portal-menu .top-demo-zone i{color:#fff!important;}
@media(max-width:720px){
  .portal-menu .top-demo-zone{flex:1 1 calc(50% - 8px)!important;justify-content:center!important;font-size:.9rem!important;}
}

/* ==========================================================
   Smart Upload review table fit fix
   Keeps all review fields visible without forcing bottom-only
   horizontal scrolling. Wide screens use a compact table;
   smaller screens switch to readable review cards.
   ========================================================== */
.bulk-review-container{
  max-width: min(1880px, calc(100vw - 18px)) !important;
  width: min(1880px, calc(100vw - 18px)) !important;
  padding-left: 9px !important;
  padding-right: 9px !important;
}
.bulk-review-table-tools{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:wrap !important;
  margin:12px 0 12px !important;
  padding:12px !important;
  border:1px solid rgba(148,163,184,.28) !important;
  border-radius:18px !important;
  background:rgba(248,250,252,.98) !important;
}
.bulk-review-search-label{
  display:inline-flex !important;
  align-items:center !important;
  gap:7px !important;
  margin:0 !important;
  color:#0f172a !important;
  font-weight:900 !important;
  white-space:nowrap !important;
}
.bulk-review-search{
  flex:1 1 320px !important;
  min-width:220px !important;
  max-width:560px !important;
  height:38px !important;
  padding:8px 12px !important;
  border-radius:12px !important;
  font-size:.86rem !important;
}
.bulk-review-fit-note{
  display:inline-flex !important;
  align-items:center !important;
  gap:7px !important;
  color:#475569 !important;
  font-weight:800 !important;
  font-size:.78rem !important;
  line-height:1.35 !important;
}
.bulk-review-table-wrap{
  width:100% !important;
  max-width:100% !important;
  overflow-x:visible !important;
  overflow-y:visible !important;
  border-radius:18px !important;
}
.bulk-review-table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
  border-spacing:0 7px !important;
  font-size:.72rem !important;
}
.bulk-review-table th,
.bulk-review-table td{
  padding:7px 5px !important;
  min-width:0 !important;
  max-width:none !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  word-break:normal !important;
  line-height:1.3 !important;
}
.bulk-review-table th{
  font-size:.67rem !important;
  letter-spacing:.02em !important;
  text-align:center !important;
}
.bulk-review-table td:nth-child(1), .bulk-review-table th:nth-child(1){width:3.2% !important; text-align:center !important;}
.bulk-review-table td:nth-child(2), .bulk-review-table th:nth-child(2){width:13.5% !important;}
.bulk-review-table td:nth-child(3), .bulk-review-table th:nth-child(3){width:7.3% !important;}
.bulk-review-table td:nth-child(4), .bulk-review-table th:nth-child(4){width:14.5% !important;}
.bulk-review-table td:nth-child(5), .bulk-review-table th:nth-child(5){width:13.2% !important;}
.bulk-review-table td:nth-child(6), .bulk-review-table th:nth-child(6){width:14.3% !important;}
.bulk-review-table td:nth-child(7), .bulk-review-table th:nth-child(7){width:9.6% !important;}
.bulk-review-table td:nth-child(8), .bulk-review-table th:nth-child(8){width:8.6% !important;}
.bulk-review-table td:nth-child(9), .bulk-review-table th:nth-child(9){width:10.3% !important;}
.bulk-review-table td:nth-child(10), .bulk-review-table th:nth-child(10){width:5.5% !important;}
.bulk-review-table .form-control,
.bulk-review-table select,
.bulk-review-table input[type="text"],
.bulk-review-table input[type="search"]{
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
  padding:6px 6px !important;
  min-height:34px !important;
  border-radius:10px !important;
  font-size:.72rem !important;
  line-height:1.2 !important;
}
.bulk-review-table select{
  appearance:auto !important;
}
.bulk-review-table .bulk-small-input{
  min-width:0 !important;
}
.bulk-review-table .bulk-file-name{
  font-size:.7rem !important;
  font-weight:900 !important;
  line-height:1.28 !important;
}
.bulk-review-table .bulk-detected-cell{
  min-width:0 !important;
  font-size:.66rem !important;
  line-height:1.35 !important;
}
.bulk-review-table .bulk-badge{
  padding:4px 6px !important;
  font-size:.62rem !important;
  white-space:normal !important;
  justify-content:center !important;
}
.bulk-review-table .bulk-confidence,
.bulk-review-table .bulk-error-text{
  font-size:.63rem !important;
}
.bulk-review-table .bulk-new-chapter-box{
  padding:6px !important;
  border-radius:10px !important;
  margin-top:6px !important;
}
.bulk-review-table .bulk-create-toggle,
.bulk-review-table .bulk-create-help,
.bulk-review-table .bulk-chapter-create-badge,
.bulk-review-table .bulk-exists-text,
.bulk-review-table .bulk-create-text,
.bulk-review-table .bulk-muted-text{
  font-size:.63rem !important;
  line-height:1.25 !important;
}
.bulk-review-actions{
  position:sticky !important;
  top:8px !important;
  z-index:5 !important;
  padding:8px !important;
  border-radius:16px !important;
  background:rgba(255,255,255,.92) !important;
  backdrop-filter:blur(10px) !important;
  box-shadow:0 10px 30px rgba(15,23,42,.08) !important;
}
.bulk-review-actions.bottom-actions{
  position:sticky !important;
  bottom:8px !important;
  justify-content:flex-end !important;
}
@media (max-width: 1180px){
  .bulk-review-table-wrap{overflow-x:visible !important;}
  .bulk-review-table,
  .bulk-review-table thead,
  .bulk-review-table tbody,
  .bulk-review-table tr,
  .bulk-review-table th,
  .bulk-review-table td{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
  }
  .bulk-review-table{border-spacing:0 !important;}
  .bulk-review-table thead{display:none !important;}
  .bulk-review-table tbody{display:grid !important; gap:14px !important;}
  .bulk-review-table tr{
    background:#fff !important;
    border:1px solid #e2e8f0 !important;
    border-radius:20px !important;
    padding:10px !important;
    box-shadow:0 12px 30px rgba(15,23,42,.08) !important;
  }
  .bulk-review-table td{
    display:grid !important;
    grid-template-columns:155px minmax(0,1fr) !important;
    gap:10px !important;
    align-items:start !important;
    border:0 !important;
    border-bottom:1px dashed #e2e8f0 !important;
    border-radius:0 !important;
    padding:9px 4px !important;
    background:transparent !important;
    text-align:left !important;
  }
  .bulk-review-table td:last-child{border-bottom:0 !important;}
  .bulk-review-table td::before{
    content:attr(data-label);
    color:#334155;
    font-size:.74rem;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.04em;
  }
  .bulk-review-table .bulk-use-cell{align-items:center !important;}
  .bulk-review-table .form-control,
  .bulk-review-table select,
  .bulk-review-table input{
    font-size:.82rem !important;
  }
  .bulk-review-table .bulk-file-name,
  .bulk-review-table .bulk-detected-cell{font-size:.82rem !important;}
}
@media (max-width: 640px){
  .bulk-review-container{width:calc(100vw - 10px) !important; padding-left:5px !important; padding-right:5px !important;}
  .bulk-review-table td{grid-template-columns:1fr !important; gap:5px !important;}
  .bulk-review-table td::before{font-size:.7rem !important;}
  .bulk-review-actions{position:static !important;}
  .bulk-review-table-tools{padding:10px !important;}
}

/* v13 Admin table paging: 50 rows at a time for large management lists */
.ge-paged-table-container{
  max-height:none!important;
  overflow-y:visible!important;
  overflow-x:auto!important;
  border-radius:18px!important;
}
.ge-paged-table-container::before{
  content:"Showing 50 rows at a time — use the controls above or below the table"!important;
}
.ge-table-pager-panel{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  width:100%!important;
  margin:12px 0!important;
  padding:12px!important;
  border:1px solid rgba(148,163,184,.28)!important;
  border-radius:20px!important;
  background:rgba(255,255,255,.88)!important;
  box-shadow:0 14px 34px rgba(15,23,42,.08)!important;
}
.ge-table-pager-top{
  position:sticky!important;
  top:76px!important;
  z-index:35!important;
  backdrop-filter:blur(14px)!important;
}
.ge-table-pager-controls{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}
.ge-table-pager-controls label{
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  color:#475569!important;
  font-weight:950!important;
  font-size:.78rem!important;
  white-space:nowrap!important;
}
.ge-table-pager-controls select{
  width:auto!important;
  min-width:84px!important;
  max-width:150px!important;
  padding:8px 10px!important;
  border-radius:12px!important;
  font-size:.78rem!important;
  font-weight:900!important;
}
.ge-table-pager-controls button{
  border:0!important;
  border-radius:12px!important;
  padding:9px 11px!important;
  background:linear-gradient(135deg,#081628,#0e3c68)!important;
  color:#fff!important;
  font-weight:950!important;
  cursor:pointer!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  font-size:.78rem!important;
  min-height:38px!important;
}
.ge-table-pager-controls button:hover:not(:disabled){
  transform:translateY(-1px)!important;
  box-shadow:0 10px 22px rgba(8,22,40,.16)!important;
}
.ge-table-pager-controls button:disabled{
  opacity:.42!important;
  cursor:not-allowed!important;
  filter:grayscale(.4)!important;
}
.ge-table-page-count{
  color:#64748b!important;
  font-weight:950!important;
  white-space:nowrap!important;
  min-width:180px!important;
  text-align:right!important;
}
.ge-table-search-box{
  max-width:420px!important;
}
.ge-paged-table tbody tr.ge-hidden-by-page{
  display:none!important;
}
@media(max-width:980px){
  .ge-table-pager-panel{
    align-items:stretch!important;
    flex-direction:column!important;
  }
  .ge-table-search-box{
    max-width:none!important;
    width:100%!important;
  }
  .ge-table-pager-controls{
    justify-content:flex-start!important;
  }
  .ge-table-page-count{
    text-align:left!important;
    white-space:normal!important;
  }
}
@media(max-width:560px){
  .ge-table-pager-top{top:60px!important;}
  .ge-table-pager-controls label,
  .ge-table-pager-controls button{
    width:100%!important;
    justify-content:center!important;
  }
  .ge-table-pager-controls select{
    flex:1!important;
    max-width:none!important;
  }
}


/* Performance pass 2026-07-21: smoother scrolling and interaction without changing layout. */
body::before{position:absolute!important;height:100vh!important;}
.portal-topbar,.ge-search-panel-v9{
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
.portal-topbar{background:rgba(255,255,255,.96)!important;}
html{scroll-behavior:auto!important;}
body{background-attachment:scroll!important;}
.grades-grid>.grade-card,
.student-subjects-grid>.subject-card,
.subjects-grid>.subject-card,
.chapters-grid>.chapter-card,
.options-grid>.option-card,
.path-grid>.path-card{contain:layout style;}
@supports (content-visibility:auto){
  .material-item,.material-card,.resource-card,.syllabus-material,.audio-item,.video-item{
    content-visibility:auto;
    contain-intrinsic-size:1px 180px;
  }
}
@media (max-width:900px), (pointer:coarse){
  body::before{display:none!important;}
  .portal-topbar,.navbar,.action-btn,.ge-search-panel-v9,.modal-content,
  .welcome-section,.subject-card,.grade-card{
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }
  .grade-card:hover,.subject-card:hover,.path-card:hover,.option-card:hover,
  .material-card:hover,.resource-card:hover{
    transform:none!important;
  }
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}


/* ============================================================
   Smooth Performance Mode v3 — 2026-07-21
   Removes expensive glass/blur painting and nonessential motion.
   Functional loaders remain compositor-friendly.
   ============================================================ */
:root{
  --ease:none;
  --shadow:0 8px 24px rgba(8,22,40,.10);
  --shadow-soft:0 4px 16px rgba(8,22,40,.08);
}
html{scroll-behavior:auto!important;}
body{
  background:#eef7ff!important;
  background-image:none!important;
  background-attachment:scroll!important;
  text-rendering:optimizeSpeed;
}
body::before,body::after{display:none!important;content:none!important;}

/* Blur and translucent fixed layers are among the most expensive paints. */
*,*::before,*::after{
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
.portal-topbar,.header-top,.hero-copy,.hero-console,.launchpad-card,.path-card,
.feature-card,.mission-card,.vision-card,.team-member,.contact-card,.admin-panel,
.dashboard-card,.access-form,.profile-card,.progress-card,.about-content,
.team-section,.features-section,.header,.page-card,.modal-content,
.welcome-section,.subject-card,.grade-card,.chapter-card,.material-card,
.option-card,.stat-card,.data-table td,.table td{
  background-color:#fff!important;
}

/* Instant controls avoid the repeated micro-pauses caused by broad "transition: all" rules. */
body *{transition:none!important;}
.btn:hover,.hero-btn:hover,.action-btn:hover,.nav-tab:hover,.nav-link:hover,
.portal-menu a:hover,.admin-nav-btn:hover,.grade-card:hover,.subject-card:hover,
.path-card:hover,.option-card:hover,.chapter-card:hover,.material-card:hover,
.resource-card:hover,.stat-card:hover,.dashboard-card:hover{
  transform:none!important;
  filter:none!important;
}

/* Lighter shadows reduce repaint cost while preserving separation. */
.portal-topbar,.header-top,.hero-copy,.hero-console,.admin-panel,.modal-content,
.grade-card,.subject-card,.path-card,.option-card,.chapter-card,.material-card,
.resource-card,.stat-card,.dashboard-card,.data-table td,.table td{
  box-shadow:var(--shadow-soft)!important;
}

/* Isolate large repeating components so one card/table area does not repaint the whole page. */
.grade-card,.subject-card,.path-card,.option-card,.chapter-card,.material-card,
.resource-card,.stat-card,.dashboard-card,.material-item,.data-table-container,
.admin-panel,.tab-content{
  contain:layout paint style;
}
@supports (content-visibility:auto){
  .material-item,.material-card,.resource-card,.syllabus-material,.audio-item,.video-item,
  .chapter-card,.subject-card{
    content-visibility:auto;
    contain-intrinsic-size:1px 180px;
  }
}

/* Keep loaders smooth even if JavaScript is busy inserting a large response. */
@keyframes gePerfSpin{to{transform:translateZ(0) rotate(360deg)}}
.fa-spin,.loading-spinner,.spinner{
  animation:gePerfSpin .72s linear infinite!important;
  will-change:transform;
  transform:translateZ(0);
  backface-visibility:hidden;
  contain:paint;
}
.ge-loading-dots{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:22px;contain:layout paint;}
.ge-loading-dots>i{display:block;width:8px;height:8px;border-radius:50%;background:currentColor;opacity:.35;will-change:transform,opacity;transform:translateZ(0);animation:gePerfDot 1s ease-in-out infinite!important;}
.ge-loading-dots>i:nth-child(2){animation-delay:.13s!important}.ge-loading-dots>i:nth-child(3){animation-delay:.26s!important}
@keyframes gePerfDot{0%,80%,100%{transform:translateZ(0) scale(.72);opacity:.32}40%{transform:translateZ(0) scale(1);opacity:1}}

/* Tables: avoid hover repainting every cell and keep scrolling native. */
.data-table tr:hover,.table tr:hover{background:transparent!important;}
.data-table-container,.table-responsive{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}

/* Hide content until a loaded admin fragment is ready, avoiding a huge one-frame layout flash. */
.ge-fragment-loading{min-height:120px;contain:layout paint;}


/* ============================================================
   Smooth Interaction Patch v4 — 2026-07-21
   Final overrides: controls scroll away instead of covering content,
   and horizontally wide tables no longer trap vertical wheel input.
   ============================================================ */
html,body{
  overscroll-behavior-y:auto!important;
}

/* Headers, navigation, search and action bars remain in their document position.
   They naturally disappear above the viewport as the user scrolls. */
.portal-topbar,
.portal-home .portal-topbar,
.header-top,
.navbar,
.ge-search-panel,
.ge-search-panel-v9,
.ge-table-pager-top,
.bulk-review-actions,
.bulk-review-actions.bottom-actions{
  position:relative!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  inset:auto!important;
}

/* Smart Upload: horizontal movement belongs to the table, vertical movement belongs to the page. */
.bulk-review-table-wrap,
.table-responsive.bulk-review-table-wrap{
  overflow-x:auto!important;
  overflow-y:visible!important;
  overscroll-behavior-x:contain!important;
  overscroll-behavior-y:auto!important;
  touch-action:pan-x pan-y!important;
  scrollbar-gutter:stable both-edges;
}
.bulk-review-table-tools,
.bulk-review-actions{
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  background:#fff!important;
}

/* Avoid creating a paint-containment wall around scrollable tables. */
.data-table-container,
.table-responsive,
.smart-table-wrap,
.bulk-review-table-wrap{
  contain:layout style!important;
}

/* More off-screen work is skipped on long card/material pages without changing layout. */
@supports (content-visibility:auto){
  .grade-card,.subject-card,.chapter-card,.path-card,.option-card,
  .material-item,.material-card,.resource-card,.syllabus-material,
  .audio-item,.video-item,.dashboard-card,.stat-card{
    content-visibility:auto;
    contain-intrinsic-size:1px 180px;
  }
}


/* Hero action update: removed in-card Apply button; widened Start Learning */
@media(max-width:560px){
  .hero-actions .hero-start-learning{
    width:100%!important;
    min-width:0!important;
  }
}


/* ==========================================================
   Chromium smoothness / paint-cost optimization — 2026-08-11
   Keeps dimensions/layout intact. The goal is to reduce large-area repaint work,
   especially in Admin tables and dynamic tab content.
   ========================================================== */

/* Long admin screens do not need a full-viewport fixed decorative grid repainting
   beneath every translucent panel while the page scrolls. */
body.ge-admin-performance::before{
  display:none!important;
}

/* backdrop-filter over large/scrolling surfaces is one of the highest paint costs in
   Chromium. Use visually equivalent opaque/translucent fills on Admin pages. */
body.ge-admin-performance .header-top,
body.ge-admin-performance .navbar,
body.ge-admin-performance .admin-panel,
body.ge-admin-performance .dashboard-card,
body.ge-admin-performance .stat-card,
body.ge-admin-performance .content-card,
body.ge-admin-performance .form-container,
body.ge-admin-performance .access-form,
body.ge-admin-performance .profile-card,
body.ge-admin-performance .progress-card,
body.ge-admin-performance .modal,
body.ge-admin-performance .modal-content,
body.ge-admin-performance .bulk-hero-card,
body.ge-admin-performance .bulk-card,
body.ge-admin-performance .bulk-alert{
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
body.ge-admin-performance .admin-panel,
body.ge-admin-performance .dashboard-card,
body.ge-admin-performance .stat-card,
body.ge-admin-performance .content-card,
body.ge-admin-performance .form-container,
body.ge-admin-performance .access-form,
body.ge-admin-performance .profile-card,
body.ge-admin-performance .progress-card{
  background:#fff!important;
}
body.ge-admin-performance .header-top{
  background:rgba(255,255,255,.96)!important;
}
body.ge-admin-performance .navbar{
  background:transparent!important;
}
body.ge-admin-performance .modal{
  background:rgba(8,22,40,.58)!important;
}

/* Avoid expensive filter effects and transform animations on controls while preserving
   the same colors, spacing and hover feedback. */
body.ge-admin-performance .btn,
body.ge-admin-performance .hero-btn,
body.ge-admin-performance .action-btn,
body.ge-admin-performance .nav-tab,
body.ge-admin-performance .admin-nav-btn,
body.ge-admin-performance .data-table tbody tr,
body.ge-admin-performance .table tbody tr{
  transition:background-color .14s ease,color .14s ease,border-color .14s ease,box-shadow .14s ease!important;
}
body.ge-admin-performance .btn:hover,
body.ge-admin-performance .hero-btn:hover,
body.ge-admin-performance .action-btn:hover,
body.ge-admin-performance .admin-nav-btn:hover{
  filter:none!important;
  transform:none!important;
}
body.ge-admin-performance .data-table tbody tr,
body.ge-admin-performance .table tbody tr{
  transform:none!important;
}

/* Keep dynamic Admin fragments isolated from the rest of the dashboard's style/layout
   calculation. Paint containment is intentionally avoided because it can clip menus/shadows. */
body.ge-admin-performance .tab-content.active,
body.ge-admin-performance .tab-content.active > [id$="Content"]{
  contain:layout style;
}
body.ge-admin-performance .tab-content:not(.active){
  display:none!important;
}

/* Chrome handles table scrolling more smoothly when the wide wrapper is explicitly
   horizontal and vertical wheel scrolling is left to the page/compositor. */
body.ge-admin-performance .bulk-review-table-wrap,
body.ge-admin-performance .data-table-container,
body.ge-admin-performance .table-wrap{
  overscroll-behavior-x:contain;
  overscroll-behavior-y:auto;
  scroll-behavior:auto!important;
}

/* The decorative sticky/blur combination is attractive but disproportionately costly on
   long management screens. Retain the same header location without a blur layer. */
body.ge-admin-performance .header-top{
  -webkit-transform:translateZ(0);
  transform:translateZ(0);
}

/* Off-screen card/list content can be skipped by Chromium until it approaches the viewport.
   This is safe for normal cards and details groups and does not change their measured layout. */
@supports (content-visibility:auto){
  body.ge-admin-performance .sm-group,
  body.ge-admin-performance .bulk-card,
  body.ge-admin-performance .material-item,
  body.ge-admin-performance .subject-item,
  body.ge-admin-performance .chapter-item{
    content-visibility:auto;
    contain-intrinsic-size:auto 120px;
  }
}

/* Keep motion modest on pointer-hover devices; animations should never hold up scrolling. */
@media (hover:hover) and (pointer:fine){
  body.ge-admin-performance .stat-card:hover,
  body.ge-admin-performance .dashboard-card:hover,
  body.ge-admin-performance .material-card:hover,
  body.ge-admin-performance .subject-card:hover,
  body.ge-admin-performance .chapter-card:hover{
    transform:none!important;
  }
}


/* Long learner/content pages get the same low-paint treatment for consistent Chrome/Edge scrolling,
   while the marketing/home pages keep the richer glass effect. */
body.ge-scroll-performance::before{
  display:none!important;
}
body.ge-scroll-performance .portal-topbar,
body.ge-scroll-performance .header-top,
body.ge-scroll-performance .dashboard-card,
body.ge-scroll-performance .profile-card,
body.ge-scroll-performance .progress-card,
body.ge-scroll-performance .access-form,
body.ge-scroll-performance .admin-panel,
body.ge-scroll-performance .page-card,
body.ge-scroll-performance .material-card,
body.ge-scroll-performance .subject-card,
body.ge-scroll-performance .chapter-card{
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
body.ge-scroll-performance .portal-topbar,
body.ge-scroll-performance .header-top{
  background:rgba(255,255,255,.96)!important;
}
body.ge-scroll-performance .dashboard-card,
body.ge-scroll-performance .profile-card,
body.ge-scroll-performance .progress-card,
body.ge-scroll-performance .access-form,
body.ge-scroll-performance .admin-panel,
body.ge-scroll-performance .page-card,
body.ge-scroll-performance .material-card,
body.ge-scroll-performance .subject-card,
body.ge-scroll-performance .chapter-card{
  background:#fff!important;
}
body.ge-scroll-performance .btn:hover,
body.ge-scroll-performance .hero-btn:hover,
body.ge-scroll-performance .action-btn:hover{
  filter:none!important;
}
@supports (content-visibility:auto){
  body.ge-scroll-performance .material-card,
  body.ge-scroll-performance .subject-card,
  body.ge-scroll-performance .chapter-card,
  body.ge-scroll-performance .material-item,
  body.ge-scroll-performance .subject-item,
  body.ge-scroll-performance .chapter-item{
    content-visibility:auto;
    contain-intrinsic-size:auto 110px;
  }
}


/* =======================================================================
   GENIUS Start Learning spotlight - November 2026
   Visual-only enhancement: preserves both existing #grades links.
   The amber action is deliberately more prominent than the blue secondary
   actions. Reduced-motion users receive a static high-contrast button.
   ======================================================================= */
@keyframes geniusStartLearningHalo {
  0%, 100% { box-shadow: 0 9px 24px rgba(185,94,12,.22), 0 0 0 0 rgba(255,187,40,.32); }
  50% { box-shadow: 0 17px 38px rgba(185,94,12,.30), 0 0 0 9px rgba(255,187,40,0); }
}
@keyframes geniusStartLearningArrow {
  0%, 77%, 100% { transform: translateX(0); }
  84% { transform: translateX(5px); }
  91% { transform: translateX(0); }
}
@keyframes geniusStartLearningKicker {
  0%, 86%, 100% { transform: translateY(0); }
  91% { transform: translateY(-3px); }
}
.portal-home .hero-actions {
  margin-top: 29px!important;
}
.portal-home .hero-actions .hero-start-learning {
  position: relative!important;
  overflow: visible!important;
  isolation: isolate!important;
  min-width: 265px!important;
  min-height: 71px!important;
  padding: 18px 54px 18px 28px!important;
  border: 2px solid #fff3c2!important;
  border-radius: 19px!important;
  background: linear-gradient(135deg,#ffe780 0%,#ffc533 53%,#ffdc62 100%)!important;
  color: #082447!important;
  font-size: clamp(1.02rem,1.8vw,1.20rem)!important;
  font-weight: 950!important;
  letter-spacing: .01em!important;
  text-decoration: none!important;
  text-shadow: none!important;
  transform-origin: center!important;
  animation: geniusStartLearningHalo 3.4s ease-in-out infinite!important;
  transition: transform .2s ease, filter .2s ease!important;
}
.portal-home .hero-actions .hero-start-learning i {
  color: #082447!important;
  font-size: 1.24em!important;
}
.portal-home .hero-actions .hero-start-learning::before {
  content: 'STEP 1  ·  START HERE';
  position: absolute;
  top: -21px;
  left: 18px;
  z-index: 1;
  padding: 5px 11px;
  background: #082447;
  color: #fff;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 999px;
  box-shadow: 0 6px 15px rgba(7,28,59,.18);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.15;
  white-space: nowrap;
  animation: geniusStartLearningKicker 4.2s ease-in-out infinite;
}
.portal-home .hero-actions .hero-start-learning::after {
  content: '➜';
  position: absolute;
  right: 18px;
  top: 50%;
  margin-top: -.67em;
  color: #082447;
  font-size: 1.32em;
  line-height: 1;
  pointer-events: none;
  animation: geniusStartLearningArrow 3.2s ease-in-out infinite;
}
.portal-home .hero-actions .hero-start-learning:hover {
  transform: translateY(-4px) scale(1.035)!important;
  filter: saturate(1.08)!important;
}
.portal-home .hero-actions .hero-start-learning:focus-visible,
.portal-home .portal-menu .top-start-learning:focus-visible {
  outline: 4px solid #0759c8!important;
  outline-offset: 4px!important;
}
/* Match the top navigation shortcut to the prominent hero action. */
.portal-home .portal-menu .top-start-learning {
  position: relative!important;
  background: linear-gradient(135deg,#ffe780,#ffc533)!important;
  color: #082447!important;
  border: 2px solid #ffeb9a!important;
  border-radius: 13px!important;
  padding: 11px 34px 11px 16px!important;
  font-weight: 950!important;
  box-shadow: 0 6px 17px rgba(172,94,12,.20)!important;
  transition: transform .2s ease,box-shadow .2s ease!important;
}
.portal-home .portal-menu .top-start-learning i {
  color: #082447!important;
}
.portal-home .portal-menu .top-start-learning::after {
  content: '➜';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
}
.portal-home .portal-menu .top-start-learning:hover {
  transform: translateY(-2px)!important;
  box-shadow: 0 10px 28px rgba(172,94,12,.28)!important;
  color: #082447!important;
}
/* On clicking Start Learning, orient the visitor at the actual grade list. */
.portal-home #grades {
  scroll-margin-top: 115px;
}
.portal-home #grades:target .section-kicker {
  color: #92400e!important;
  font-weight: 900!important;
}
@media (max-width: 560px) {
  .portal-home .hero-actions .hero-start-learning {
    width: 100%!important;
    min-width: 0!important;
    min-height: 68px!important;
    padding: 17px 45px 17px 18px!important;
  }
  .portal-home .hero-actions .hero-start-learning::before {
    left: 12px;
    top: -18px;
    font-size: .6rem;
  }
  .portal-home .hero-actions .hero-start-learning::after {
    right: 13px;
  }
  .portal-home .portal-menu .top-start-learning {
    flex: 1 1 100%!important;
    justify-content: center!important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .portal-home .hero-actions .hero-start-learning,
  .portal-home .hero-actions .hero-start-learning::before,
  .portal-home .hero-actions .hero-start-learning::after {
    animation: none!important;
    transition: none!important;
  }
  .portal-home .hero-actions .hero-start-learning:hover {
    transform: none!important;
  }
}
