:root{--blue:#0176d3;--navy:#032d60;--ink:#16325c;--bg:#f4f8fc;--line:#dce5f0;--green:#2e844a}
*{box-sizing:border-box}
body{margin:0;font-family:'Segoe UI',system-ui,-apple-system,Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg)}
.hidden{display:none !important}
.muted{color:#5b6b85}
.topbar{display:flex;justify-content:space-between;align-items:center;padding:14px 24px;background:linear-gradient(135deg,var(--navy),var(--blue));color:#fff}
.brand{font-size:22px;font-weight:800;letter-spacing:.3px}
.brand span{opacity:.8}
.userbox{display:flex;align-items:center;gap:14px;font-size:14px}
.btn{background:var(--blue);color:#fff;border:none;border-radius:9px;padding:12px 18px;font-size:15px;font-weight:700;cursor:pointer}
.btn:hover{filter:brightness(1.07)}
.btn-ghost{background:transparent;border:1px solid rgba(255,255,255,.5);color:#fff;border-radius:9px;padding:8px 14px;cursor:pointer;font-size:13px}
.player .btn-ghost{border-color:var(--line);color:#5b6b85}
/* auth */
.auth-view{display:flex;justify-content:center;padding:60px 20px}
.auth-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:32px;width:100%;max-width:380px;box-shadow:0 8px 30px rgba(3,45,96,.08)}
.auth-card h1{margin:0 0 4px;font-size:24px}
.auth-card input{width:100%;padding:12px 14px;margin:10px 0;border:1px solid var(--line);border-radius:9px;font-size:15px}
.auth-card .btn{width:100%;margin-top:6px}
.switch{font-size:14px;margin-top:16px;text-align:center}
.switch a{color:var(--blue);font-weight:700;text-decoration:none}
.msg{font-size:14px;min-height:18px;margin:10px 0 0}
.msg.error{color:#c23934}
.msg.ok{color:var(--green)}
/* app */
.app-view{display:grid;grid-template-columns:320px 1fr;gap:22px;max-width:1200px;margin:24px auto;padding:0 20px}
.sidebar{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px;height:fit-content}
.progress-summary{display:flex;align-items:center;gap:14px;padding-bottom:14px;border-bottom:1px solid var(--line);margin-bottom:12px}
.ring{width:58px;height:58px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;background:conic-gradient(var(--green) 0deg,#e3eaf3 0deg)}
.ring span{background:#fff;color:var(--ink);width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px}
.lesson-list{margin:0;padding:0}
.sec-group{border-bottom:1px solid var(--line)}
.sec-head{display:flex;align-items:center;gap:8px;padding:11px 6px;cursor:pointer;font-weight:700;font-size:14px;color:var(--navy)}
.sec-head:hover{background:var(--bg)}
.caret{display:inline-block;width:20px;font-size:16px;line-height:1;color:var(--blue);text-align:center;transition:transform .12s}
.sec-name{flex:1}
.sec-count{font-size:11px;color:#8294ad;font-weight:600}
.sec-body{padding:2px 0 8px 6px}
.subhead{font-size:10.5px;font-weight:800;letter-spacing:.5px;color:var(--blue);text-transform:uppercase;margin:8px 0 3px 6px}
.lesson-item{display:flex;align-items:center;gap:9px;padding:8px 8px 8px 14px;border-radius:8px;cursor:pointer;font-size:13.5px}
.lesson-item:hover{background:var(--bg)}
.lesson-item.active{background:#e9f3ff;font-weight:700}
.lesson-item.soon{cursor:default;opacity:.55}
.l-title{flex:1}
.tag{font-size:9px;font-weight:800;letter-spacing:.4px;padding:2px 6px;border-radius:10px}
.tag.free{background:#d6f0df;color:var(--green)}
.tag.soon{background:#eef0f4;color:#8294ad}
.dot{width:18px;height:18px;border-radius:50%;border:2px solid var(--line);flex:0 0 auto}
.dot.done{background:var(--green);border-color:var(--green);position:relative}
.dot.done::after{content:"✓";color:#fff;font-size:11px;position:absolute;left:3px;top:-2px}
.player{background:#fff;border:1px solid var(--line);border-radius:14px;padding:22px;min-height:420px}
.player h2{margin:0 0 14px}
.video-wrap{position:relative;width:100%;aspect-ratio:16/9;background:#0b1b33;border-radius:12px;overflow:hidden}
.video-wrap iframe{width:100%;height:100%;border:0}
.placeholder{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#9fb3cc;text-align:center;padding:20px}
.player-actions{display:flex;align-items:center;gap:14px;margin-top:16px;flex-wrap:wrap}
.badge{background:var(--green);color:#fff;border-radius:20px;padding:5px 12px;font-size:12px;font-weight:700}
@media(max-width:760px){.app-view{grid-template-columns:1fr}.sidebar{position:static;max-height:none;overflow:visible}}
/* ---- mobile polish (phone browser + installed app) ---- */
@media(max-width:640px){
  .topbar{flex-wrap:wrap;gap:8px;padding:12px 15px}
  .brand{font-size:19px}
  .userbox{flex-wrap:wrap;gap:7px;width:100%;justify-content:flex-start;margin-top:2px}
  .userbox .btn-ghost{padding:7px 11px;font-size:12px}
  #user-email{display:none}
  .app-view{margin:14px auto;padding:0 12px;gap:14px}
  .player{padding:15px}
  .player h2{font-size:20px}
  .sidebar{padding:13px}
  .modal{padding:10px}
  .modal-card{padding:18px;border-radius:14px;max-height:92vh}
  .modal-head span{font-size:16px}
  .admin-lookup{flex-wrap:wrap}
  .admin-lookup input{min-width:0}
  .admin-lookup .btn{width:100%}
  .admin-tree{max-height:50vh}
  .au-row{flex-wrap:wrap;gap:6px}
  .au-email{min-width:0}
  .an-num{font-size:24px}
  .an-chart{height:165px}
  .rep-acts{flex-wrap:wrap}
  .quiz-card{padding:13px}
  .paywall{padding:16px}
  .paywall h3{font-size:16px}
}
/* quiz */
.quiz{margin-top:22px;border-top:1px solid var(--line);padding-top:18px}
.quiz-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.quiz-head h3{margin:0;font-size:18px}
.quiz-score{font-size:13px;font-weight:700;color:var(--green)}
.quiz-card{border:1px solid var(--line);border-radius:12px;padding:16px;margin:12px 0;background:#fff}
.quiz-q{font-weight:600;margin-bottom:10px}
.quiz-opts{display:flex;flex-direction:column;gap:8px}
.quiz-opt{text-align:left;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:#fff;cursor:pointer;font-size:14px}
.quiz-opt:hover:not(:disabled){border-color:var(--blue);background:#f3f8ff}
.quiz-opt:disabled{cursor:default}
.quiz-opt.right{background:#d9f2e3;border-color:var(--green);font-weight:700}
.quiz-opt.wrong{background:#fbe3e1;border-color:#c23934}
.quiz-exp{margin-top:10px;font-size:13.5px;color:#33425e;background:#f4f8fc;border-radius:8px;padding:10px 12px}
.review-missed{width:100%;margin-bottom:12px;background:#ff9a3c;color:#3a1e00}
.smart-review{width:100%;margin-bottom:10px;background:linear-gradient(135deg,#6a5cff,#8b5cf6);color:#fff}
.rev-count{background:#fff;color:#6a5cff;border-radius:10px;padding:1px 8px;font-size:12px;font-weight:800;margin-left:6px}
.reminders-btn{width:100%;margin-bottom:10px;background:#fff;color:#4b3fd6;border:1.5px solid #cdd6ff;font-weight:700}
.reminders-btn.rem-on{background:#eef1ff;border-color:#4b3fd6}
/* review modal */
.modal{position:fixed;inset:0;background:rgba(3,45,96,.55);display:flex;align-items:center;justify-content:center;z-index:2147483001;padding:20px}
/* PayPal renders in an iframe that can paint above modal dialogs regardless of z-index. While any
   full-screen dialog is open (it has its own dark backdrop), hide the PayPal buttons so they can't bleed through. */
body:has(.modal:not(.hidden)) #pp-section,
body:has(.modal:not(.hidden)) #pp-all,
body:has(.modal:not(.hidden)) #pp-vip,
body.modal-paypal-hide #pp-section,
body.modal-paypal-hide #pp-all,
body.modal-paypal-hide #pp-vip{visibility:hidden !important}
.modal-card{background:#fff;border-radius:16px;max-width:640px;width:100%;padding:24px;max-height:88vh;overflow:auto}
.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.modal-head span{font-size:18px;font-weight:800;color:var(--navy)}
#review-close{border:1px solid var(--line);color:#5b6b85;background:#fff}
/* make any modal close button readable on the white card (default ghost is white-on-dark) */
.modal .btn-ghost{border:1px solid var(--line);color:#5b6b85;background:#fff}
.modal .btn-ghost:hover{background:var(--bg)}
.review-progress{font-size:13px;color:#5b6b85;margin-bottom:10px}
.reset-link{background:none;border:none;color:#c23934;font-size:12.5px;cursor:pointer;padding:0;text-decoration:underline}
/* owner analytics dashboard */
.analytics-card{max-width:880px}
.an-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:6px 0 8px}
.an-card{background:#f4f8fc;border:1px solid var(--line);border-radius:12px;padding:16px;text-align:center}
.an-num{font-size:30px;font-weight:900;color:var(--navy)}
.an-lab{font-size:12px;color:#5b6b85;margin-top:2px}
.an-h{font-size:15px;color:var(--navy);margin:16px 0 8px}
.an-note{font-size:12px;color:#8294ad;margin:-4px 0 8px}
.an-chart{height:200px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px}
.an-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:4px}
@media(max-width:700px){.an-grid{grid-template-columns:1fr}.an-cards{grid-template-columns:1fr}}
.an-table,.an-feed{max-height:240px;overflow-y:auto;border:1px solid var(--line);border-radius:10px}
.an-row{display:flex;align-items:center;gap:8px;padding:8px 11px;border-top:1px solid var(--line);font-size:13px}
.an-row:first-child{border-top:none}
.an-em{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.an-pct{font-weight:800;color:var(--blue)}
.an-meta{color:#8294ad;font-size:11.5px}
.an-acc{font-size:11px;color:var(--green);font-weight:700}
.an-frow{padding:8px 11px;border-top:1px solid var(--line);font-size:13px;line-height:1.4}
.an-frow:first-child{border-top:none}
.an-when{display:block;color:#8294ad;font-size:11px}
/* owner admin panel */
.admin-card{max-width:720px}
.admin-lookup{display:flex;gap:10px;margin:12px 0 4px}
.admin-lookup input{flex:1;padding:11px 13px;border:1px solid var(--line);border-radius:9px;font-size:15px}
.admin-lookup .btn{white-space:nowrap}
.admin-users{max-height:210px;overflow-y:auto;border:1px solid var(--line);border-radius:10px;margin:4px 0 6px}
.au-count{font-size:11px;font-weight:700;color:#8294ad;padding:7px 12px 4px;text-transform:uppercase;letter-spacing:.5px}
.au-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 12px;cursor:pointer;font-size:14px;border-top:1px solid var(--line)}
.au-row:hover{background:var(--bg)}
.au-row.sel{background:#e9f3ff;font-weight:700}
.au-email{color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto;min-width:0;text-align:left}
.au-date{color:#8294ad;font-size:12px;flex:0 0 80px;text-align:right;font-variant-numeric:tabular-nums}
.au-empty{padding:14px;color:#8294ad;font-size:13px;text-align:center}
.admin-student{font-size:15px;margin:14px 0 8px;color:var(--navy)}
.admin-tree{max-height:48vh;overflow-y:auto;border:1px solid var(--line);border-radius:10px;padding:6px}
.blk{margin:8px 0 12px}
.blk.blocked{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fbe3e1;border:1px solid #f3b6b1;border-radius:10px;padding:10px 14px;font-weight:700;color:#a3271f;font-size:13.5px}
.btn.danger{background:#c23934}
.btn.danger:hover{filter:brightness(1.05)}
.au-badge{font-size:10px;font-weight:800;letter-spacing:.3px;padding:2px 7px;border-radius:10px;flex:0 0 auto}
.au-badge.blk-b{background:#fbe3e1;color:#c23934}
.au-badge.dup-b{background:#fff0e0;color:#b25a00}
.au-badge.card-b{background:#ffe0e0;color:#b3261e}
.blk.warn{background:#fff7ee;border:1px solid #ffe0bd;border-radius:10px;padding:9px 13px;font-size:13px;color:#8a5200;margin-bottom:8px}
.blk-actions{display:flex;gap:10px;justify-content:space-between;margin-top:10px}
.admin-tabs{display:flex;justify-content:flex-end;margin:2px 0 6px}
.admin-foot{display:flex;justify-content:flex-end;margin-top:14px;border-top:1px solid var(--line);padding-top:12px}
.au-act{font-size:12px;font-weight:700;border:1px solid var(--line);background:#fff;color:var(--navy);border-radius:8px;padding:5px 11px;cursor:pointer;flex:0 0 auto}
.au-act:hover{background:var(--bg)}
.au-act.danger{border-color:#e7a6a1;color:#c23934}
.au-act.danger:hover{background:#fbe3e1}
/* notification badge + problem reports */
.nbadge{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:10px;background:#c23934;color:#fff;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;line-height:1}
#report-modal textarea{width:100%;border:1px solid var(--line);border-radius:9px;padding:11px 13px;font-size:14px;font-family:inherit;resize:vertical}
.reports-card{max-width:640px}
#reports-body{max-height:64vh;overflow-y:auto}
.rep-card{border:1px solid var(--line);border-radius:11px;padding:13px 15px;margin-bottom:10px;background:#fff}
.rep-card.done{opacity:.6;background:#f7faff}
.rep-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:4px}
.rep-email{font-weight:800;color:var(--navy);font-size:13.5px}
.rep-date{font-size:11.5px;color:#8294ad}
.rep-lesson{font-size:12px;font-weight:700;color:var(--blue);margin-bottom:6px}
.rep-msg{font-size:14px;color:#33425e;line-height:1.5;white-space:pre-wrap;margin-bottom:10px}
.rep-acts{display:flex;gap:8px}
/* my account panel */
.account-card{max-width:560px}
.acct-who{font-size:14px;color:#5b6b85;margin-bottom:10px}
.acct-h{font-size:11px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;margin:16px 0 6px}
.acct-list{border:1px solid var(--line);border-radius:10px}
.acct-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 13px;border-top:1px solid var(--line);font-size:14px}
.acct-row:first-child{border-top:none}
.acct-name{font-weight:700;color:var(--navy)}
.acct-exp{font-size:12.5px;color:#5b6b85;text-align:right}
.acct-row.exp .acct-name{color:#b25a00}
.acct-note{margin-top:14px}
.admin-row{display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:7px;cursor:pointer;font-size:14px}
.admin-row:hover{background:var(--bg)}
.admin-row input{width:17px;height:17px;flex:0 0 auto;cursor:pointer}
.admin-row .ar-label{flex:1}
.admin-row .ar-eff{font-size:10px;font-weight:800;letter-spacing:.3px;color:var(--green);background:#d6f0df;border-radius:10px;padding:2px 8px}
.admin-row.lvl-course{font-weight:800;color:var(--navy);background:#eef5ff;margin-bottom:4px}
.admin-row.lvl-section{font-weight:700;color:var(--navy);margin-top:6px;border-top:1px solid var(--line)}
.admin-row.lvl-lesson .ar-label{padding-left:18px;color:#33425e}
/* paywall / locked */
.lesson-item.locked{opacity:.72;cursor:pointer}
.tag.lock{background:#fff0e0;color:#b25a00}
.paywall{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff;padding:24px}
.paywall .lock-ico{font-size:42px;margin-bottom:4px}
.paywall h3{margin:0 0 6px;font-size:18px}
.paywall p{margin:4px 0;opacity:.92;font-size:14px}
.paywall-btns{display:flex;flex-direction:column;gap:10px;margin:14px 0 6px;width:100%;max-width:360px}
.paywall .btn{width:100%}
.paywall .btn.hero{background:#ff9a3c;color:#3a1e00}
.paywall-note{font-size:12px;opacity:.7}
.pay-option{display:flex;flex-direction:column;gap:10px;padding:14px;border:2px solid rgba(255,255,255,.22);border-radius:14px;background:rgba(255,255,255,.05)}
.pay-option.best{border-color:#ffb43c;background:rgba(255,180,60,.10)}
.pay-option.vip{border-color:#9b8cff;background:rgba(122,102,255,.12)}
.pay-vip-sub{font-size:12px;opacity:.85;margin-top:-4px}
.pw-was{opacity:.6;font-weight:600;margin-right:2px}
.pay-head{font-size:15px;font-weight:700;opacity:.97}
.pay-head b{font-size:19px;font-weight:800}
.pay-head small{font-weight:500;opacity:.8}
.pay-sub{font-size:11px;opacity:.6;margin-top:-6px;text-align:center}
.btn-stripe{background:#635bff;color:#fff}
.pp-box{width:100%}
.pp-box:empty{display:none}
.pp-box:not(:empty)::before{content:'or';display:block;text-align:center;font-size:12px;opacity:.75;margin:4px 0 6px}
/* when showing the paywall, let the box grow to fit instead of cramming into the 16:9 video frame */
.video-wrap.paywall-wrap{aspect-ratio:auto;overflow:visible}
.paywall-wrap .paywall{position:relative;inset:auto}
#reset-all-btn{display:block;width:100%;text-align:center;margin:0 0 12px}
/* Start Here — free practice org */
.start-here-btn{display:block;width:100%;text-align:center;border:none;border-radius:12px;padding:13px 15px;font-weight:800;font-size:13.5px;cursor:pointer;margin-bottom:14px;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.3);
  background:linear-gradient(90deg,#ff9a3c,#ff5e8a,#6a5cff,#19c3e6,#2eb45a,#ff9a3c);background-size:300% 100%;
  box-shadow:0 6px 18px rgba(106,92,255,.4);animation:shGrad 7s linear infinite, shPulse 2.6s ease-in-out infinite}
.start-here-btn:hover{transform:translateY(-2px);filter:brightness(1.07)}
.start-here-btn:active{transform:translateY(0)}
/* calm, static look while a video is playing or the panel is open (no distraction) */
.start-here-btn.calm,.start-here-btn.active{animation:none;background:linear-gradient(135deg,#ff9a3c,#ff7a00);box-shadow:0 5px 14px rgba(255,154,60,.35)}
.start-here-btn.active{outline:2px solid #ff7a00;outline-offset:1px}
@keyframes shGrad{0%{background-position:0% 50%}100%{background-position:300% 50%}}
@keyframes shPulse{0%,100%{box-shadow:0 6px 18px rgba(106,92,255,.4)}50%{box-shadow:0 10px 30px rgba(255,94,138,.6)}}
@media(prefers-reduced-motion:reduce){.start-here-btn{animation:none}}
.video-wrap.setup-wrap{aspect-ratio:auto;background:#fff;border:1px solid var(--line);border-radius:12px;display:block;overflow:visible;padding:20px 22px}
.setup-video{aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#000;margin-bottom:18px}
.setup-video iframe{width:100%;height:100%;border:0}
.setup-intro{font-size:15.5px;color:#33425e;line-height:1.6;margin:0 0 18px}
.setup-steps{display:flex;flex-direction:column;gap:13px;margin-bottom:20px}
.setup-step{display:flex;gap:12px;align-items:flex-start;font-size:14.5px;color:#33425e;line-height:1.55}
.setup-step .ss-n{flex:0 0 28px;height:28px;border-radius:8px;background:linear-gradient(135deg,var(--blue),#6a5cff);color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;font-size:14px}
.setup-step code{background:#eef3fa;border-radius:5px;padding:1px 6px;font-size:13px;color:var(--navy)}
.setup-cta{display:inline-block;text-decoration:none;font-size:16px;padding:14px 24px}
.setup-skip{margin-top:16px;font-size:13.5px;color:#33425e;background:#fff7ee;border:1px solid #ffe0bd;border-radius:9px;padding:11px 13px}
.quiz-head .reset-link{margin-left:12px}

/* ---------- AI Tutor pop-up ---------- */
.tutor-fab{position:fixed;bottom:20px;right:20px;z-index:2147483000;background:linear-gradient(135deg,var(--blue),#6a5cff);color:#fff;border:none;border-radius:30px;padding:13px 20px;font-weight:800;font-size:15px;cursor:pointer;box-shadow:0 10px 30px rgba(106,92,255,.42)}
.tutor-fab:hover{filter:brightness(1.06)}
.tutor-panel{position:fixed;bottom:20px;right:20px;z-index:2147483000;width:376px;max-width:calc(100vw - 24px);height:540px;max-height:calc(100vh - 32px);background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 64px rgba(3,45,96,.28);display:flex;flex-direction:column;overflow:hidden}
.tutor-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:13px 16px;background:linear-gradient(135deg,var(--navy),#6a5cff);color:#fff}
.tutor-head small{opacity:.85;font-size:11.5px}
.tutor-x{background:rgba(255,255,255,.18);border:none;color:#fff;font-size:14px;width:28px;height:28px;border-radius:8px;cursor:pointer;flex:none}
.tutor-msgs{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:#f7faff}
.tm{max-width:86%;padding:10px 13px;border-radius:14px;font-size:14px;line-height:1.5;white-space:pre-wrap;word-wrap:break-word}
.tm-user{align-self:flex-end;background:var(--blue);color:#fff;border-bottom-right-radius:4px}
.tm-bot{align-self:flex-start;background:#fff;border:1px solid var(--line);color:var(--ink);border-bottom-left-radius:4px}
.tm-think{color:#8aa0c0;letter-spacing:3px}
.tutor-input{display:flex;gap:8px;padding:11px;border-top:1px solid var(--line);background:#fff}
.tutor-input input{flex:1;border:1px solid #d5deee;border-radius:10px;padding:11px 12px;font-size:14px;outline:none}
.tutor-input input:focus{border-color:var(--blue)}
.tutor-input button{background:var(--blue);color:#fff;border:none;border-radius:10px;padding:0 16px;font-weight:700;cursor:pointer;flex:none}
.tm-text{white-space:pre-wrap}
.tm-lessons{display:flex;flex-direction:column;gap:7px;margin-top:10px}
.tm-lesson{text-align:left;background:#eff5ff;border:1px solid #cfe0fb;color:#0b4a8f;border-radius:10px;padding:9px 12px;font-size:13.5px;font-weight:700;cursor:pointer;line-height:1.35}
.tm-lesson:hover{background:#e3eeff;border-color:#a9caf5}
.tm-lesson.locked{background:#fff7ee;border-color:#ffdfb8;color:#9a5a12}
.tm-lesson.locked:hover{background:#fff0dd}
.tm-note{align-self:center;font-size:12px;font-weight:700;color:#6a5cff;background:#f0eeff;border:1px solid #ddd8ff;border-radius:20px;padding:4px 12px}
@media(max-width:480px){.tutor-panel{width:calc(100vw - 16px);right:8px;bottom:8px;height:calc(100vh - 16px)}}

/* ---------- Live chat ---------- */
.chat-fab{position:fixed;bottom:20px;left:20px;z-index:2147483000;background:linear-gradient(135deg,#1f8f5f,#2e844a);color:#fff;border:none;border-radius:30px;padding:13px 20px;font-weight:800;font-size:15px;cursor:pointer;box-shadow:0 10px 30px rgba(46,132,74,.4);display:flex;align-items:center;gap:8px}
.chat-fab:hover{filter:brightness(1.06)}
.chat-fab.pop{animation:fabpop .9s ease}
@keyframes fabpop{0%{transform:scale(1)}30%{transform:scale(1.12);box-shadow:0 0 0 12px rgba(46,204,113,.28)}100%{transform:scale(1)}}
.chat-badge{background:#e0483b;color:#fff;border-radius:20px;min-width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;padding:0 6px}
.chat-panel{position:fixed;bottom:20px;left:20px;z-index:2147483000;width:380px;max-width:calc(100vw - 24px);height:560px;max-height:calc(100vh - 32px);background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 64px rgba(3,45,96,.28);display:flex;flex-direction:column;overflow:hidden}
.chat-head{display:flex;align-items:center;gap:10px;padding:12px 14px;background:linear-gradient(135deg,#0b6b43,#2e844a);color:#fff}
.chat-head #chat-title{flex:1;font-size:15px}
.chat-status{opacity:.85;font-weight:400;font-size:12px}
.chat-back,.chat-x{background:rgba(255,255,255,.18);border:none;color:#fff;width:28px;height:28px;border-radius:8px;cursor:pointer;font-size:15px;flex:none}
.chat-toggle{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:700;cursor:pointer;background:rgba(255,255,255,.16);padding:5px 9px;border-radius:8px}
.chat-toggle input{margin:0;cursor:pointer}
.chat-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#b8c2d0;margin-right:4px}
.chat-dot.on{background:#2ecc71;box-shadow:0 0 0 2px rgba(46,204,113,.25)}
.chat-list{flex:1;overflow-y:auto;padding:8px}
.chat-empty{color:#5b6b85;font-size:14px;padding:20px;text-align:center;line-height:1.5}
.chat-listitem{display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:#fff;border:none;border-bottom:1px solid #eef2f8;padding:12px 10px;font-size:14px;cursor:pointer}
.chat-listitem:hover{background:#f5f9ff}
.chat-who{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#16325c;font-weight:600}
.chat-badge2{background:#e0483b;color:#fff;border-radius:20px;min-width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;padding:0 6px;margin-left:6px}
.chat-unpaid{background:#ffe0b8;color:#8a5200;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;padding:2px 7px;border-radius:20px;margin-left:6px;white-space:nowrap}
.chat-vip{background:#e6e0ff;color:#3d2c7d;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;padding:2px 7px;border-radius:20px;margin-left:6px;white-space:nowrap}
.acct-vip{margin-top:16px;background:linear-gradient(135deg,#f5f3ff,#fdf1f9);border:1.5px solid #ded5ff;border-radius:12px;padding:14px 16px;font-size:14px;line-height:1.55}

/* per-student study activity (Manage students) */
.adm-act-head{font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#5b6b85;margin:14px 0 8px}
.adm-act-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
.aa-chip{background:#f5f9ff;border:1px solid #dfe9f6;border-radius:11px;padding:10px 12px;display:flex;flex-direction:column;gap:2px}
.aa-chip b{font-size:17px;color:var(--navy)}
.aa-chip span{font-size:12px;color:#5b6b85;line-height:1.35}
.adm-act-recent{margin-top:9px;border:1px solid #e7eef7;border-radius:11px;overflow:hidden}
.aa-row{display:flex;justify-content:space-between;gap:10px;padding:8px 12px;font-size:13.5px;color:#16325c;border-bottom:1px solid #eef3fa}
.aa-row:last-child{border-bottom:none}
.aa-row span{color:#7d8ca4;font-size:12.5px;white-space:nowrap}
.adm-act-loading{font-size:13px;color:#7d8ca4;margin:10px 0}
.aa-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:8px;flex:none}
.aa-dot.g{background:#2e844a}.aa-dot.y{background:#e8a71a}.aa-dot.r{background:#e0483b}
.aa-legend{font-weight:600;text-transform:none;letter-spacing:0;margin-left:8px;font-size:11.5px}
.aa-legend i{display:inline-block;width:8px;height:8px;border-radius:50%;margin:0 3px 0 8px}
.aa-legend i.g{background:#2e844a}.aa-legend i.y{background:#e8a71a}.aa-legend i.r{background:#e0483b}
.aa-qrow{border-bottom:1px solid #eef3fa}
.aa-qrow:last-child{border-bottom:none}
.aa-qrow summary{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 12px;font-size:13.5px;color:#16325c;cursor:pointer;list-style:none}
.aa-qrow summary::-webkit-details-marker{display:none}
.aa-qrow summary span{color:#7d8ca4;font-size:12.5px;white-space:nowrap}
.aa-qrow summary:hover{background:#f7faff}
.aa-wrong{padding:7px 12px 7px 30px;font-size:12.5px;color:#8a4a12;background:#fffaf3;border-top:1px solid #f5ead8;line-height:1.45}

/* VIP session tracker (owner panel + student account) */
.admin-vip-box{margin:12px 0;background:linear-gradient(135deg,#f5f3ff,#fdf1f9);border:1.5px solid #ded5ff;border-radius:12px;padding:12px 14px}
.avb-head{font-size:13px;font-weight:800;color:#3d2c7d;margin-bottom:8px}
.avb-head small{font-weight:600;color:#6a5d99}
.avb-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.vs-dot{width:28px;height:28px;border-radius:50%;border:2px solid #cfc4f5;background:#fff;color:#8a7fc0;display:inline-flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;flex:none}
.vs-dot.held{background:linear-gradient(135deg,#6a5cff,#e85bb7);border-color:transparent;color:#fff}
.avb-lab{font-size:13px;font-weight:700;color:#3d2c7d;margin:0 4px}
.acct-vipsess{margin:6px 0 16px;background:linear-gradient(135deg,#f5f3ff,#fdf1f9);border:1.5px solid #ded5ff;border-radius:12px;padding:13px 15px;font-size:14px}
.acct-vipsess small{color:#6a5d99}
.acct-vipsess .avb-row{margin-top:9px}
.acct-vipsess-note{margin-top:9px;font-size:13px;color:#4a5a78}
.chat-newbies{border-bottom:1px solid #e7edf5;background:#fbfdff;max-height:150px;overflow-y:auto;flex:none}
.nb-head{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;color:#5b6b85;padding:9px 12px 3px}
.nb-row{display:flex;align-items:center;gap:8px;padding:6px 12px;font-size:13.5px;color:#7d8ba0;font-style:italic;width:100%;text-align:left;background:none;border:none}
.nb-click{cursor:pointer;font-style:normal;color:#16325c;font-weight:600}
.nb-click:hover{background:#eef6ff}
.chat-thread{flex:1;display:flex;flex-direction:column;overflow:hidden}
.chat-msgs{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:8px;background:#f7faf8}
.cm{max-width:82%;padding:9px 13px;border-radius:14px;font-size:14px;line-height:1.45;white-space:pre-wrap;word-wrap:break-word}
.cm-me{align-self:flex-end;background:#2e844a;color:#fff;border-bottom-right-radius:4px}
.cm-them{align-self:flex-start;background:#fff;border:1px solid var(--line);color:#0b1b34;border-bottom-left-radius:4px}
.cm-sys{align-self:center;color:#5b6b85;font-size:12.5px;text-align:center;padding:6px 10px;line-height:1.4}
.chat-actions{padding:7px 11px 0;background:#fff;border-top:1px solid var(--line)}
.chat-nudge{width:100%;background:#f2f9f4;border:1px dashed #b5dcc2;color:#1a6b3c;border-radius:9px;padding:8px 10px;font-size:12.5px;font-weight:700;cursor:pointer}
.chat-nudge:hover{background:#e6f4ea}
.chat-input{display:flex;gap:8px;padding:11px;border-top:1px solid var(--line);background:#fff}
.chat-actions + .chat-input{border-top:none}
.chat-input input{flex:1;border:1px solid #d5deee;border-radius:10px;padding:11px 12px;font-size:14px;outline:none}
.chat-input input:focus{border-color:#2e844a}
.chat-input button{background:#2e844a;color:#fff;border:none;border-radius:10px;padding:0 16px;font-weight:700;cursor:pointer;flex:none}
@media(max-width:480px){.chat-panel{width:calc(100vw - 16px);left:8px;bottom:8px;height:calc(100vh - 16px)}.chat-fab{left:8px;bottom:8px}}
