@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Sinhala:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');
:root{--navy:#0e1528;--blue:#18243c;--sky:#f1f3f7;--gold:#fcb316;--gold-soft:#f9e4b3;--gold-ink:#87600b;--ink:#162139;--muted:#65788a;--line:#d9e3eb;--paper:#f7fafc;--white:#fff;--green:#147a55;--orange:#b16a11}
html[data-play-channel="true"] #packBankSettings,html[data-play-channel="true"] #packCart,html[data-play-channel="true"] #packCheckout,html[data-play-channel="true"] #packCardPage{display:none!important}
*{box-sizing:border-box}
body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.65 "Noto Sans Sinhala",sans-serif}
.hidden{display:none!important}
.shell{min-height:100vh}
.brand{color:inherit;text-decoration:none;display:flex;align-items:center;gap:.7rem;font-family:"Plus Jakarta Sans",sans-serif}
.atom{width:40px;height:40px;border:1px solid var(--gold);border-radius:50%;display:grid;place-items:center;color:var(--gold);font:700 1.35rem "Playfair Display",serif}
.brand strong{display:block;letter-spacing:-.04em;font-size:1.05rem}
.brand small{display:block;font-size:.63rem;letter-spacing:.07em;color:#9eb1c1}
.auth-layout{min-height:100vh;display:grid;grid-template-columns:1.1fr .9fr;background:radial-gradient(circle at 14% 85%,#263550,transparent 35%),var(--navy);color:#fff}
.auth-intro{padding:clamp(2rem,8vw,8rem);display:flex;flex-direction:column;justify-content:center}
.auth-intro .eyebrow{margin-top:4rem}
.eyebrow{color:var(--gold);font:800 .72rem/1.2 "Plus Jakarta Sans",sans-serif;letter-spacing:.14em;margin:0 0 .75rem}
.auth-intro h1,.topbar h1,.view h2{font-family:"Playfair Display","Noto Sans Sinhala",serif;line-height:1.15;letter-spacing:-.035em}
.auth-intro h1{font-size:clamp(2.7rem,5vw,5rem);margin:.25rem 0 1.2rem}
.auth-intro h1 em{color:var(--gold)}
.auth-intro>p{max-width:560px;color:#ccdae6;font-size:1.08rem}
.auth-intro ul{padding:0;list-style:none;color:#d8e4ee;margin:2rem 0 0}
.auth-intro li{padding:.7rem 0;border-top:1px solid rgba(255,255,255,.18);max-width:570px}
.auth-card{align-self:center;justify-self:center;width:min(100%,590px);margin:2rem;padding:clamp(1.4rem,4vw,3rem);background:var(--white);color:var(--ink);box-shadow:0 22px 70px rgba(0,0,0,.25)}
.auth-tabs{display:flex;border-bottom:1px solid var(--line);margin-bottom:1.5rem}
.tab{border:0;border-bottom:3px solid transparent;background:transparent;padding:.7rem 1rem;color:var(--muted);font:700 .9rem "Plus Jakarta Sans",sans-serif;cursor:pointer}
.tab.active{color:var(--ink);border-color:var(--gold)}
.form-panel{display:none}
.form-panel.active{display:block}
.registration-complete{padding:.4rem 0 1rem}
.registration-complete h2{font:700 1.7rem "Playfair Display","Noto Sans Sinhala",serif;margin:0}
.registration-complete>p{color:var(--muted);font-size:.9rem}
.registration-complete .eyebrow{color:var(--gold-ink)}
.muted{color:var(--muted)!important}
.form-panel h2{font:700 1.7rem "Playfair Display","Noto Sans Sinhala",serif;margin:0}
.form-panel>p{color:var(--muted);font-size:.88rem;margin:.25rem 0 1.3rem}
label{display:block;font-size:.8rem;font-weight:800;margin:.78rem 0}
input,select,textarea{display:block;width:100%;margin-top:.3rem;border:1px solid #cbd8e2;border-radius:5px;padding:.7rem .75rem;background:#fff;color:var(--ink);font:400 .9rem "Noto Sans Sinhala",sans-serif}
textarea{resize:vertical}
.split{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}
.check{display:flex;gap:.55rem;align-items:flex-start;font-size:.76rem;font-weight:500}
.check input{width:auto;margin:.25rem 0 0}
.primary{border:0;border-radius:5px;background:var(--gold);color:var(--navy);width:100%;padding:.83rem 1rem;margin-top:.7rem;font:800 .85rem "Plus Jakarta Sans","Noto Sans Sinhala",sans-serif;cursor:pointer}
.primary:hover{filter:brightness(.95)}
.message{min-height:1.2rem;color:var(--green);font-size:.82rem;margin:.8rem 0}
.message.error{color:#b32929}
.app{min-height:100vh;display:flex}
.sidebar{width:258px;flex:none;background:var(--navy);color:#fff;padding:1.5rem;display:flex;flex-direction:column}
.sidebar nav{margin-top:3rem;display:grid;gap:.35rem}
.nav-link,.signout{border:0;background:transparent;color:#b5c6d6;text-align:left;padding:.78rem .85rem;border-radius:5px;font:700 .82rem "Noto Sans Sinhala",sans-serif;cursor:pointer}
.nav-link.active,.nav-link:hover{background:#263550;color:#fff}
.signout{margin-top:auto;border-top:1px solid rgba(255,255,255,.18);border-radius:0;padding-left:0;color:#d5e2ed}
.workspace{width:100%;padding:clamp(1.3rem,4vw,3.7rem);max-width:1450px;margin:auto}
.topbar{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;margin-bottom:1.75rem}
.topbar h1{font-size:clamp(1.9rem,3vw,3rem);margin:0}
.badge{padding:.45rem .7rem;border-radius:999px;background:#edf2f6;color:var(--muted);font:800 .7rem "Plus Jakarta Sans",sans-serif;letter-spacing:.04em}
.badge.approved{background:#dff3e9;color:var(--green)}
.badge.pending{background:#fff0d5;color:var(--orange)}
.notice{display:grid;gap:.25rem;padding:1rem 1.1rem;background:#fff2da;border-left:4px solid var(--gold);margin-bottom:1.3rem;font-size:.9rem}
.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem}
.metric-grid article,.panel,.resource-card,.list-item{background:#fff;border:1px solid var(--line);border-radius:7px}
.metric-grid article{padding:1.1rem}
.metric-grid span{display:block;color:var(--muted);font-size:.75rem}
.metric-grid strong{font:700 2rem "Playfair Display",serif;color:var(--blue)}
.panel{padding:1.3rem;margin-top:1rem}
.panel h3{margin:0 0 1rem;font:700 1.2rem "Playfair Display","Noto Sans Sinhala",serif}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.panel-head h2{font-size:1.4rem;margin:0}
.panel-head span,#profileAddress{font-size:.85rem;color:var(--muted)}
.view{display:none}
.view.active{display:block}
.view-head{margin:0 0 1.5rem}
.view h2{font-size:clamp(1.7rem,3vw,2.5rem);margin:0}
.resource-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
.pack-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}
.pack-card strong{font:800 1.15rem "Plus Jakarta Sans",sans-serif;color:var(--blue)}
.pack-select{display:flex;align-items:center;gap:.55rem;margin:1rem 0 0!important}
.pack-select input{width:auto;margin:0}
.pack-bank-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:.8rem;margin:1rem 0}
.pack-bank-choice,.pack-bank-edit{display:flex;gap:.7rem;border:1px solid var(--line);border-radius:7px;background:#fff;padding:.9rem;overflow-wrap:anywhere}
.pack-bank-choice{cursor:pointer;align-items:flex-start}
.pack-bank-choice:has(input:checked){border-color:var(--blue);box-shadow:0 0 0 2px #f9e4b3}
.pack-bank-choice>input{width:auto;margin:.5rem 0 0;flex:none}
.pack-bank-content{display:grid;gap:.45rem;min-width:0;font-size:.9rem}
.pack-bank-heading{display:flex;align-items:center;gap:.6rem;min-height:40px}
.pack-bank-heading strong{font-size:.95rem}
.pack-bank-logo{position:relative;display:grid;place-items:center;width:50px;height:38px;flex:none;border:1px solid var(--line);border-radius:5px;background:#fff;overflow:hidden}
.pack-bank-logo img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#fff}
.pack-bank-initials{font:bold .65rem "Plus Jakarta Sans",sans-serif;color:var(--blue);text-transform:uppercase}
.pack-account-number{font-size:1.02rem;letter-spacing:.025em;user-select:text}
.pack-reference{font-weight:700;background:var(--sky);border:1px solid var(--line);padding:.8rem;border-radius:5px;overflow-wrap:anywhere}
.pack-bank-edit{display:grid;gap:.5rem}
.pack-bank-edit label{font-size:.85rem}
.pack-bank-edit input{margin-top:.2rem}
.pack-active{display:flex;align-items:center;gap:.5rem}
.pack-active input{width:auto;margin:0}
.bank-details{padding:1rem;border:1px solid var(--line);background:var(--sky);border-radius:5px;margin:1rem 0;overflow-wrap:anywhere}
.bank-details p{margin:.5rem 0 0}
.pack-review{flex-wrap:wrap}
.pack-review .resource-actions{margin:0}
.resource-card{padding:1.25rem;display:flex;flex-direction:column;min-height:190px}
.resource-card .type{font:800 .67rem "Plus Jakarta Sans",sans-serif;color:var(--gold-ink);letter-spacing:.1em}
.resource-card h3{font:700 1.2rem/1.35 "Playfair Display","Noto Sans Sinhala",serif;margin:.7rem 0}
.resource-card p{font-size:.82rem;color:var(--muted);margin:0}
.resource-card a{margin-top:auto;padding-top:1rem;color:var(--blue);font-weight:800;font-size:.82rem;text-decoration:none}
.list{display:grid;gap:.75rem}
.list-item{padding:1rem 1.15rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}
.list-item h3{font-size:1rem;margin:0}
.list-item p{font-size:.8rem;color:var(--muted);margin:.25rem 0 0}
.list-item a,.secondary{border:1px solid var(--blue);border-radius:4px;background:white;color:var(--blue);padding:.5rem .7rem;font:800 .75rem "Plus Jakarta Sans",sans-serif;text-decoration:none;white-space:nowrap;cursor:pointer}
.empty{padding:2rem;border:1px dashed #bdcad5;color:var(--muted);text-align:center;font-size:.88rem}
.admin-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem}
.admin-grid .panel:first-child{grid-row:span 2}
.stack label{margin:.45rem 0}
.compact .list-item{align-items:flex-start}
.student-detail{font-size:.72rem;color:var(--muted);line-height:1.5}
.quiz-player{background:#fff;border:1px solid var(--line);padding:clamp(1.2rem,4vw,2.5rem);margin-top:1rem}
.quiz-player h3{font:700 1.6rem "Playfair Display","Noto Sans Sinhala",serif;margin:0 0 .5rem}
.question{padding:1.25rem 0;border-top:1px solid var(--line)}
.question p{font-weight:800}
.option{display:flex;gap:.6rem;align-items:flex-start;padding:.45rem 0;font-size:.88rem}
.option input{width:auto;margin:.3rem 0}
.quiz-result{background:#dff3e9;padding:1rem;color:var(--green);font-weight:800}
.quiz-builder{grid-column:span 2}
.quiz-question-list{display:grid;gap:1rem;margin:.8rem 0}
.quiz-builder-question{padding:1rem;border:1px solid var(--line);background:#f9fcff}
.quiz-builder-question h4{margin:0 0 .4rem;font:700 1rem "Playfair Display","Noto Sans Sinhala",serif}
.question-actions{display:flex;justify-content:flex-end}
.danger{border:0;background:transparent;color:#a32b2b;font:700 .75rem "Plus Jakarta Sans",sans-serif;cursor:pointer;padding:.3rem 0}
.text-button{border:0;background:transparent;color:var(--blue);font:700 .85rem "Noto Sans Sinhala",sans-serif;cursor:pointer;padding:.7rem 0}
.teacher-entry{display:block;margin:1.6rem auto 0}
#otpForm .secondary{display:block;width:100%;margin-top:.8rem}
.otp-fieldset{border:0;padding:0;margin:.78rem 0;min-width:0}
.otp-fieldset legend{font-size:.8rem;font-weight:800;margin-bottom:.35rem}
.otp-digits{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:clamp(.25rem,1.5vw,.65rem)}
.otp-digits input{width:100%;height:3.5rem;margin:0;padding:.35rem;text-align:center;font:700 1.5rem "Plus Jakarta Sans",sans-serif;font-variant-numeric:tabular-nums}
button:disabled{opacity:.55;cursor:not-allowed}
.profile-required .view{display:none}
#firstLogin,#staffFirstLogin{max-width:760px;margin:0 auto 2rem}
.resource-card .secondary{margin-top:1rem;align-self:flex-start;white-space:normal}
.resource-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:auto}
.resource-actions .secondary{margin-top:1rem}
.media-host iframe{width:100%;aspect-ratio:16/9;border:0;margin-top:1rem;border-radius:5px}
.media-host iframe.pdf-preview{aspect-ratio:3/4;min-height:420px}
.student-actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.ai-answer{white-space:pre-wrap;line-height:1.8;margin-top:1rem;overflow-wrap:anywhere}
.public-help{margin-top:1.3rem;padding-top:1rem;border-top:1px solid var(--line)}
.public-help h3{font-size:1rem;margin:0}
.public-help .secondary{width:100%;margin-top:.5rem}
.public-help p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.85rem}
.permission-choices{border:1px solid var(--line);padding:.8rem;margin:1rem 0;min-width:0}
.permission-choices legend{font-size:.9rem;font-weight:800;padding:0 .35rem}
.permission-choices>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem 1rem}
.permission-choice{display:flex;gap:.6rem;align-items:center;margin:0;font-size:.85rem;font-weight:500}
.permission-choice input{width:auto;margin:0;flex:none}
.staff-access{display:grid;grid-template-columns:1fr 150px;align-items:start}
.staff-access .permission-choices,.staff-access button{grid-column:1/-1}
.teacher-phone{max-width:690px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.chat-launcher{position:fixed;right:1.4rem;bottom:1.4rem;z-index:100;display:flex;align-items:center;gap:.55rem;border:0;border-radius:999px;padding:.55rem 1rem .55rem .55rem;background:var(--navy);color:#fff;box-shadow:0 9px 28px #0e152866;font:800 .83rem "Noto Sans Sinhala",sans-serif;cursor:pointer}
.chat-mark{display:grid;place-items:center;flex:none;width:2.35rem;height:2.35rem;border-radius:50%;background:var(--gold);color:var(--navy);font:800 1.3rem "Playfair Display",serif}
.chat-panel{position:fixed;right:1.25rem;bottom:1.25rem;z-index:100;width:min(390px,calc(100vw - 2.5rem));height:min(610px,calc(100dvh - 2.5rem));display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 20px 70px #0e152855}
.chat-header{display:flex;align-items:center;gap:.7rem;padding:.85rem 1rem;background:var(--navy);color:#fff}
.chat-header>div{min-width:0;flex:1}.chat-header strong,.chat-header small{display:block}.chat-header strong{font-size:.94rem}.chat-header small{font-size:.66rem;color:#b9cad8}
.chat-header button{border:0;background:transparent;color:#fff;font-size:1.6rem;line-height:1;cursor:pointer;padding:.35rem}
.chat-header,.chat-usage,.chat-form,.chat-disclosure{flex-shrink:0}
.chat-usage{padding:.65rem 1rem .6rem;background:#18243c;color:#e5ebf5;border-top:1px solid #ffffff18}
.chat-usage-heading,.chat-usage-detail{display:flex;justify-content:space-between;gap:.5rem;flex-wrap:wrap;font-size:.875rem;line-height:1.65}
.chat-usage-heading strong{color:var(--gold);font-variant-numeric:tabular-nums}
.chat-usage-track{height:6px;margin:.35rem 0;border-radius:999px;background:#ffffff25;overflow:hidden}
.chat-usage-track span{display:block;width:0;height:100%;background:var(--gold);border-radius:inherit;transition:width .3s ease}
.chat-usage-detail{font-size:.75rem;color:#c1ccdc}
.chat-usage p{margin:.15rem 0 0;font-size:.75rem;line-height:1.65;color:#c1ccdc}
.chat-usage p:empty{display:none}
.chat-usage.exhausted .chat-usage-heading strong{color:#ffdb87}
@media(prefers-reduced-motion:reduce){.chat-usage-track span{transition:none}}
.chat-messages{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:.7rem;padding:1.1rem;background:#f5f8fb}
.chat-message{align-self:flex-start;max-width:90%;padding:.75rem .9rem;border-radius:13px 13px 13px 3px;background:#fff;border:1px solid var(--line);white-space:pre-wrap;overflow-wrap:anywhere;font-size:.82rem;line-height:1.65}
.chat-message.user{align-self:flex-end;background:var(--blue);border-color:var(--blue);color:#fff;border-radius:13px 13px 3px 13px}
.chat-message.error{color:#a32b2b;background:#fff4f3;border-color:#efc6c3}
.chat-loading{min-width:4.2rem}
.chat-loading-dots{display:flex;align-items:center;gap:.35rem;height:1.15rem;padding:.12rem .05rem}
.chat-loading-dots>span{width:.42rem;height:.42rem;border-radius:50%;background:var(--blue);animation:chat-dot-bounce 1.2s ease-in-out infinite}
.chat-loading-dots>span:nth-child(2){background:var(--gold);animation-delay:.15s}
.chat-loading-dots>span:nth-child(3){animation-delay:.3s}
.chat-revealing:not(.formatted-reply)::after,.chat-revealing.formatted-reply>:last-child::after{content:"";display:inline-block;width:2px;height:1em;margin-left:.2rem;vertical-align:text-bottom;background:var(--gold);animation:chat-caret-pulse .8s ease-in-out infinite}
@keyframes chat-dot-bounce{0%,60%,100%{transform:translateY(0);opacity:.6}30%{transform:translateY(-3px);opacity:1}}
@keyframes chat-caret-pulse{0%,100%{opacity:1}50%{opacity:.25}}
@media(prefers-reduced-motion:reduce){.chat-loading-dots>span,.chat-revealing::after,.chat-revealing>:last-child::after{animation:none;opacity:1}}
.chat-message.formatted-reply{white-space:normal;min-width:0;font-size:.9rem}
.formatted-reply p{margin:0 0 .85em;line-height:1.75}
.formatted-reply>:last-child{margin-bottom:0}
.formatted-reply h1,.formatted-reply h2,.formatted-reply h3,.formatted-reply h4,.formatted-reply h5,.formatted-reply h6{font-family:inherit;font-size:1em;line-height:1.65;margin:1.1em 0 .55em;font-weight:700}
.formatted-reply>:first-child{margin-top:0}
.formatted-reply ul,.formatted-reply ol{padding-left:1.4em;margin:.6em 0}
.formatted-reply li{margin:.35em 0}
.formatted-reply .chat-equation{display:block;max-width:100%;overflow-x:auto;overflow-y:hidden;padding:.3em 0;margin:.6em 0}
.formatted-reply .katex{font-size:1.05em;white-space:nowrap;overflow-wrap:normal}
.formatted-reply .katex-display{margin:.3em 0;text-align:left}
.formatted-reply .katex-display>.katex{text-align:left}
.formatted-reply pre{max-width:100%;overflow-x:auto;white-space:pre-wrap}
.formatted-reply table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;font-size:inherit}
.formatted-reply td,.formatted-reply th{border:1px solid var(--line);padding:.4em;text-align:left}
.formatted-reply .chat-math-fallback{white-space:pre-wrap}
.chat-form{display:flex;flex-direction:column;gap:.45rem;padding:.7rem .85rem .4rem;border-top:1px solid var(--line)}
.chat-compose{display:flex;gap:.45rem;align-items:flex-end;width:100%}
.chat-attachments{display:flex;gap:.2rem;align-self:flex-end}
.chat-attach{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.05rem;width:2.6rem;height:2.8rem;margin:0;border:1px solid var(--line);border-radius:9px;color:var(--navy);font-size:1.05rem;line-height:1.1;cursor:pointer}
.chat-attach span{font-size:.55rem;font-weight:700}
.chat-attach:focus-within{outline:3px solid var(--gold);outline-offset:2px}
.chat-form textarea{flex:1;min-width:0;min-height:2.8rem;max-height:7rem;margin:0;resize:vertical;font-size:.82rem}
.chat-compose>button{flex:none;border:0;border-radius:50%;width:2.8rem;height:2.8rem;background:var(--gold);color:var(--navy);font-size:1.15rem;cursor:pointer}
.chat-form button:disabled,.chat-attach.disabled{opacity:.5;pointer-events:none}
.chat-image-preview{display:flex;align-items:center;gap:.55rem;width:100%;min-width:0;padding:.35rem;background:#f5f8fb;border:1px solid var(--line);border-radius:9px}
.chat-image-preview img{width:3.5rem;height:3.5rem;object-fit:cover;border-radius:5px}
.chat-image-preview span{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.75rem}
.chat-image-preview button{border:0;background:transparent;color:var(--navy);font-size:1.5rem;cursor:pointer}
.chat-image-error{margin:0;color:#a32b2b;font-size:.75rem}
.chat-message img{display:block;max-width:min(200px,100%);max-height:180px;object-fit:contain;border-radius:7px;margin-bottom:.4rem}
.chat-disclosure{margin:0;padding:0 .85rem .8rem;color:var(--muted);font-size:.64rem;line-height:1.5}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid var(--gold);outline-offset:2px}

@media(max-width:1000px){.auth-layout{grid-template-columns:1fr}
.auth-intro{padding:2rem}
.auth-intro .eyebrow{margin-top:2rem}
.auth-card{width:calc(100% - 2rem);margin:0 1rem 2rem}
.sidebar{width:215px}
.metric-grid{grid-template-columns:repeat(2,1fr)}
.resource-grid{grid-template-columns:repeat(2,1fr)}
}

@media(max-width:680px){.app{display:block}
.sidebar{width:100%;min-height:auto;padding:1rem}
.sidebar nav{margin:1rem 0;grid-template-columns:repeat(2,1fr)}
.signout{margin-top:0;padding:.7rem}
.workspace{padding:1.2rem}
.split,.admin-grid{grid-template-columns:1fr}
.admin-grid .panel:first-child{grid-row:auto}
.quiz-builder{grid-column:auto}
.metric-grid,.resource-grid{grid-template-columns:1fr}
.list-item{align-items:flex-start;flex-direction:column}
.topbar{align-items:flex-start}
.auth-intro h1{font-size:2.8rem}
.permission-choices>div{grid-template-columns:1fr}
.staff-access{grid-template-columns:1fr}
.chat-panel{right:.55rem;bottom:.55rem;width:calc(100vw - 1.1rem);height:min(620px,calc(100dvh - 1.1rem))}
.chat-launcher{right:1rem;bottom:1rem}
}

/* Premium interface pass: preserve existing LMS flows and state classes */
:root{--paper:#f4f7fa;--line:#d6e0e8;--muted:#536a7e;--blue:#18243c}
.auth-layout{background:radial-gradient(circle at 10% 85%,rgba(38,53,80,.42),transparent 38%),radial-gradient(circle at 74% 12%,rgba(252,179,22,.11),transparent 35%),var(--navy)}
.auth-intro h1{max-width:710px;text-wrap:balance}
.auth-card{border-radius:22px;border:1px solid rgba(255,255,255,.65);box-shadow:0 30px 85px rgba(0,13,29,.32);overflow:hidden}
.auth-card h2{letter-spacing:-.02em}
.form-panel>p{font-size:.92rem;line-height:1.7}
label{font-size:.88rem}
input,select,textarea{border-radius:10px;min-height:45px;transition:border-color .2s ease,box-shadow .2s ease}
input:focus,select:focus,textarea:focus{outline:0;border-color:var(--gold-ink);box-shadow:0 0 0 3px rgba(252,179,22,.18)}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.primary{border-radius:10px;min-height:48px;box-shadow:0 6px 18px rgba(158,111,20,.13);transition:transform .2s ease,filter .2s ease}
.primary:hover:not(:disabled){transform:translateY(-1px);filter:brightness(1.03)}
.sidebar{border-right:1px solid rgba(252,179,22,.22);box-shadow:8px 0 32px rgba(14,21,40,.08)}
.sidebar .brand{padding:.2rem .3rem}
.sidebar nav{gap:.45rem}
.nav-link,.signout{font-size:.89rem;border-radius:10px;transition:background .2s ease,color .2s ease}
.nav-link.active{background:#263550;color:#fff;box-shadow:inset 3px 0 0 var(--gold)}
.workspace{padding-top:clamp(1.8rem,4vw,4rem)}
.topbar{padding-bottom:1.1rem;border-bottom:1px solid var(--line);margin-bottom:1.6rem}
.topbar h1,.view h2{text-wrap:balance}
.badge{font-size:.78rem;padding:.5rem .85rem}
.notice{border-radius:0 10px 10px 0}
.metric-grid{gap:1.15rem}
.metric-grid article,.panel,.resource-card,.list-item{border-radius:15px;border-color:var(--line);box-shadow:0 10px 28px rgba(14,21,40,.045)}
.metric-grid article{padding:1.35rem;border-top:3px solid rgba(252,179,22,.65)}
.metric-grid span{font-size:.84rem}
.metric-grid strong{font-size:2.15rem;line-height:1.3}
.panel{padding:clamp(1.2rem,2vw,1.65rem);margin-top:1.2rem}
.panel-head{padding-bottom:.8rem;border-bottom:1px solid #e7edf2;margin-bottom:1rem}
.resource-grid,.pack-grid,.admin-grid{gap:1.15rem}
.resource-card{padding:1.45rem;transition:transform .2s ease,box-shadow .2s ease}
.resource-card:hover{transform:translateY(-3px);box-shadow:0 18px 36px rgba(14,21,40,.1)}
.resource-card p,.list-item p{font-size:.88rem}
.resource-card a,.list-item a{font-size:.88rem}
.list-item{padding:1.15rem 1.3rem}
.secondary,.list-item a{border-radius:9px;min-height:38px}
.quiz-player{border-radius:16px;box-shadow:0 10px 28px rgba(14,21,40,.05)}
.empty{border-radius:12px;background:rgba(255,255,255,.6)}
@media(max-width:680px){.auth-card{border-radius:18px}.workspace{padding:1.2rem}.topbar{gap:.7rem}.metric-grid{gap:.75rem}.metric-grid article,.panel,.resource-card,.list-item{border-radius:13px}.panel{padding:1.1rem}.list-item{padding:1rem}.sidebar{box-shadow:none;border-right:0}}
@media(prefers-reduced-motion:reduce){.primary,.resource-card,.nav-link,input,select,textarea{transition:none}.primary:hover:not(:disabled),.resource-card:hover{transform:none}}

/* Keep a deliberate frame around the sign-in card on laptop widths. */
@media(min-width:1001px){
  .auth-layout{grid-template-columns:minmax(0,1.07fr) minmax(420px,.93fr);gap:clamp(1rem,3vw,3rem);padding-right:clamp(1.25rem,4vw,4rem)}
  .auth-intro{min-width:0;padding-right:clamp(1rem,3vw,3rem)}
  .auth-card{width:min(100%,590px);margin:2rem 0}
}

/* Shared portrait identity; the sign-in form stays the primary action. */
:root{--paper:#f5f7f8;--gold:#fcb316;--gold-soft:#f9e4b3;--gold-ink:#87600b;--line:#dbe2e7;--muted:#51677c}
.auth-layout{grid-template-columns:minmax(0,1fr) minmax(390px,.95fr);grid-template-rows:auto auto;align-content:center;gap:2rem clamp(2rem,7vw,7rem);padding:3rem clamp(1.25rem,6vw,7rem);background:linear-gradient(125deg,#0e1528,#18243c);min-height:100svh}
.auth-intro{grid-column:1;grid-row:1;padding:0;min-width:0;justify-content:flex-start}
.auth-intro .eyebrow{margin-top:2.6rem;color:var(--gold);font-size:.75rem;letter-spacing:.13em}
.auth-intro h1{font-size:clamp(2.2rem,3.4vw,3.6rem);line-height:1.4;letter-spacing:0;margin:.25rem 0 1rem}
.auth-intro h1 em{font-style:normal}
.auth-intro>p:not(.eyebrow){font-size:1rem;line-height:1.95;margin:0;max-width:540px}
.auth-intro .brand small{font-size:.75rem;letter-spacing:0;line-height:1.7}
.portal-portrait{grid-column:1;grid-row:2;margin:0;max-width:540px;display:grid;grid-template-columns:155px minmax(0,1fr);align-items:center;gap:1.5rem;padding:0;border-top:1px solid rgba(252,179,22,.35);padding-top:1.75rem}
.portal-portrait img{display:block;width:155px;height:165px;object-fit:cover;object-position:70% 23%;border-radius:4px;border:1px solid rgba(252,179,22,.4)}
.portal-portrait figcaption{display:grid;gap:.3rem;line-height:1.8;min-width:0}
.portal-portrait figcaption>span{color:#b5c5d3;font-size:.8125rem}
.portal-portrait figcaption strong{font-size:1.1rem;font-weight:600;color:#fff}
.portal-portrait figcaption small{font:500 .75rem/1.7 "Plus Jakarta Sans",sans-serif;color:var(--gold)}
.auth-card{grid-column:2;grid-row:1/3;width:min(100%,550px);margin:0;padding:clamp(1.4rem,3vw,2.7rem);align-self:center;border-radius:10px;background:#fff;overflow:visible;border:1px solid #e3e7e7;box-shadow:0 24px 65px rgba(0,12,28,.24)}
.auth-kicker{font:700 .75rem/1.5 "Plus Jakarta Sans",sans-serif;letter-spacing:.12em;color:var(--gold-ink);margin:0 0 1.25rem;padding-bottom:1rem;border-bottom:1px solid #e3e7e7}
.auth-card h2{font-size:1.7rem;line-height:1.65;letter-spacing:0;margin:0 0 .6rem}
.auth-card .form-panel>p{font-size:1rem;line-height:1.85}
.auth-card label{font-size:.9375rem;line-height:1.8}
.auth-card input{min-height:52px;border-radius:6px;background:#fafbfc;font-size:1rem}
.auth-card .primary{border-radius:6px;min-height:52px;font-size:1rem;box-shadow:none}
.auth-card .teacher-entry{font-size:.875rem;margin-top:1rem}
.auth-guidance{margin-top:1.25rem;border-top:1px solid var(--line);padding-top:1rem;font-size:.875rem;color:var(--muted)}
.auth-guidance summary{cursor:pointer;font-weight:600;line-height:1.9}
.auth-guidance ul{padding-left:1.2rem;line-height:1.9;margin:.8rem 0 0}
.auth-guidance li+li{margin-top:.65rem}
.sidebar{background:#0e1528}
.sidebar .brand small{font-size:.75rem;letter-spacing:.06em}
.nav-link.active{background:#263550;box-shadow:inset 3px 0 0 var(--gold)}
.topbar h1,.view h2{letter-spacing:0;line-height:1.5}
.metric-grid article{border-top-width:2px;box-shadow:0 5px 18px rgba(14,21,40,.035)}
.panel,.resource-card,.list-item{box-shadow:0 6px 20px rgba(14,21,40,.035);border-radius:10px}
@media(max-width:1000px){.auth-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;gap:2rem;padding:2rem clamp(1.25rem,6vw,4rem)}.auth-intro{grid-column:1;grid-row:1;width:min(100%,650px);justify-self:center}.auth-intro .eyebrow{margin-top:1.75rem}.auth-intro h1{font-size:clamp(2.1rem,5vw,3rem)}.auth-card{grid-column:1;grid-row:2;width:min(100%,650px);margin:0}.portal-portrait{grid-column:1;grid-row:3;width:min(100%,650px);max-width:650px;justify-self:center;grid-template-columns:115px minmax(0,1fr);gap:1.25rem;padding-top:1.5rem}.portal-portrait img{width:115px;height:125px}.portal-portrait figcaption strong{font-size:1rem}}
@media(max-width:480px){.auth-layout{padding:1.4rem 1.25rem 2rem;gap:1.5rem}.auth-intro .eyebrow{margin-top:1.6rem}.auth-intro h1{font-size:2.05rem}.auth-intro>p:not(.eyebrow){font-size:1rem;line-height:1.8}.auth-card{padding:1.35rem;border-radius:8px}.auth-card h2{font-size:1.4rem}.auth-kicker{margin-bottom:1rem}.portal-portrait{gap:1rem}.auth-card .otp-digits input{min-height:45px}}
/* Monthly tuition */
.tuition-dialog{width:min(740px,calc(100vw - 24px));max-height:92dvh;overflow:auto}.tuition-option{padding:18px;margin-bottom:12px;border:1px solid #d9deea;border-radius:16px;background:#f8f9fc}.tuition-option .check{align-items:flex-start}.tuition-option .check input{width:20px;height:20px;flex-shrink:0}.tuition-option small{display:block;color:#59657a;margin-top:5px}.tuition-option select{margin-top:12px;width:100%;max-width:100%}.tuition-price{padding:18px 22px;border-radius:18px;background:#0e1528;color:#eef2fa}.tuition-price p{display:flex;justify-content:space-between;gap:16px;margin:12px 0;line-height:1.5}.tuition-price p span:last-child,.tuition-price strong{white-space:nowrap}.tuition-saving{color:#80e0bb}.tuition-due{border-top:1px solid #35405a;padding-top:16px;font-size:1.15rem}.tuition-due strong{color:#ffba16;font-size:1.5rem}.class-price{font-size:1.4rem;font-weight:700}.class-price small{font-size:.8rem;font-weight:400}.class-card details{padding:12px 0;border-top:1px solid #e2e6ef}.class-card summary{cursor:pointer;font-size:.9rem}.class-card .resource-actions{margin-top:18px}.text-button{background:none;border:0;color:#59657a;text-decoration:underline;padding:12px;cursor:pointer}.tuition-reminder{display:block;margin-bottom:24px}.tuition-reminder strong{display:block}.tuition-reminder p{margin:10px 0}#archiveMonth{max-width:320px;margin:10px 0 24px}#otherClassesList{margin-top:22px}@media(max-width:500px){.tuition-price{padding:14px}.tuition-price p{font-size:.86rem}.tuition-due strong{font-size:1.15rem}.tuition-option{padding:14px}.tuition-dialog header{align-items:flex-start}.tuition-dialog h2{font-size:1.5rem}}
