/* Academy Management System — hand-rolled CSS, mobile-first */
:root {
  --green: #0B5D3B;
  --green-dark: #07402A;
  --green-deep: #0C2C24;
  --green-light: #E7F4EC;
  --gold: #F2B705;
  --gold-dark: #D9A404;
  --bg: #F3FAF5;
  --card: #ffffff;
  --text: #1E2A24;
  --muted: #5B6B62;
  --border: #DCE8DF;
  --red: #b3261e;
  --red-bg: #fdecea;
  --amber: #8a6d00;
  --amber-bg: #fff6d6;
  --radius: 18px;
  --shadow-sm: 0 4px 14px rgba(7,64,42,.08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--green); }
.wrap { max-width: 880px; margin: 0 auto; padding: 16px; }

/* Header */
.topbar {
  background: #fff;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.topbar .logo { height: 40px; width: 40px; border-radius: 50%; object-fit: cover; background: #fff; border: 2px solid var(--gold); }
.topbar h1 { font-size: 1.15rem; margin: 0; flex: 1; min-width: 140px; color: var(--green-deep); }
.topbar .sub { font-size: .8rem; color: var(--muted); }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; background: var(--gold); color: #231d00;
  text-transform: uppercase; letter-spacing: .4px;
}
.badge.free { background: var(--green-light); color: var(--green-dark); }

/* Buttons — big tap targets */
.btn {
  display: inline-block; border: 2px solid transparent; cursor: pointer; text-decoration: none;
  background: var(--green); color: #fff; font-size: 1rem; font-weight: 700;
  padding: 13px 26px; border-radius: 999px; min-height: 50px;
  text-align: center;
}
.btn:hover { background: var(--green-dark); }
.btn.secondary { background: #fff; color: var(--green); border: 2px solid var(--green); }
.btn.gold { background: var(--gold); color: #231d00; }
.btn.small { padding: 8px 14px; min-height: 40px; font-size: .9rem; }
.btn.danger { background: var(--red); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.wa { background: #25D366; color: #fff; }

/* Cards & layout */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.card h2, .card h3 { margin-top: 0; }
.grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .grid.cols3 { grid-template-columns: repeat(3, 1fr); } .grid.cols2 { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; }
.stat .num { font-size: 1.9rem; font-weight: 800; color: var(--green); }
.stat .lbl { color: var(--muted); font-size: .9rem; }

/* Forms */
label { display: block; font-weight: 600; margin: 12px 0 5px; font-size: .95rem; }
input, select, textarea {
  width: 100%; padding: 12px; font-size: 1rem; border: 1.5px solid var(--border);
  border-radius: 11px; background: #fff; color: var(--text); min-height: 48px;
}
textarea { min-height: 76px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-light); }
.msg { padding: 12px 14px; border-radius: 10px; margin: 12px 0; display: none; }
.msg.error { background: var(--red-bg); color: var(--red); display: block; }
.msg.ok { background: var(--green-light); color: var(--green-dark); display: block; }
.msg.info { background: #e8f0fe; color: #174ea6; display: block; }

/* Tabs */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--border); }
.tabs button {
  flex: 0 0 auto; border: 1.5px solid var(--border); background: #fff; color: var(--text);
  padding: 10px 16px; border-radius: 999px; font-size: .95rem; font-weight: 600; cursor: pointer; min-height: 44px;
}
.tabs button.active { background: var(--green); color: #fff; border-color: var(--green); }
section.tabpage { display: none; }
section.tabpage.active { display: block; }

/* Student / list rows */
.row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.row:last-child { border-bottom: none; }
.row .grow { flex: 1; min-width: 150px; }
.row .name { font-weight: 700; }
.row .meta { color: var(--muted); font-size: .85rem; }

/* Attendance segmented buttons */
.seg { display: inline-flex; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.seg button {
  border: none; background: #fff; padding: 10px 13px; font-size: .9rem; font-weight: 700;
  cursor: pointer; min-height: 44px; color: var(--muted);
}
.seg button.on-present { background: var(--green); color: #fff; }
.seg button.on-absent { background: var(--red); color: #fff; }
.seg button.on-leave { background: var(--gold); color: #231d00; }

.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.pill.paid { background: var(--green-light); color: var(--green-dark); }
.pill.pending { background: var(--red-bg); color: var(--red); }

.lockbox {
  background: var(--amber-bg); border: 1px solid var(--gold); color: #5c4a00;
  padding: 14px; border-radius: var(--radius); margin: 12px 0;
}
table.plans { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.plans th, table.plans td { border: 1px solid var(--border); padding: 10px; text-align: left; vertical-align: top; }
table.plans th { background: var(--green-light); }
.price { font-size: 1.6rem; font-weight: 800; color: var(--green); }
.small { font-size: .85rem; color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 14px; }
.hidden { display: none !important; }

/* Landing */
.hero {
  background: linear-gradient(135deg, var(--green-dark), var(--green) 60%, #0E7047);
  color: #fff; padding: 44px 16px 36px; text-align: center;
}
.hero h1 { font-size: 1.9rem; margin: 0 0 8px; }
.hero p { max-width: 640px; margin: 0 auto 20px; opacity: .93; }
.hero .btn { margin: 4px; }
.feature h3 { margin: 0 0 6px; color: var(--green-dark); }

/* --- Academy look overrides (../styles.css loads first) --- */
.card.stat { background: var(--green-light); }
section.tabpage { padding: 0; }
.tabs { flex-wrap: nowrap; }
.btn.secondary:hover { background: var(--green-light); }
.btn.gold:hover { background: var(--gold-dark); }
.price { font-family: "Quicksand", "Nunito", sans-serif; }

/* Signup page — trial-form card ke andar trial spacing (base label margins ko override) */
.trial-form .field { margin-bottom: 14px; }
.trial-form .field > label { margin-top: 0; }
.trial-form .radio-pill { margin: 0; }

/* Header CTA fix: dono Free Trial buttons aik sath na dikhen (manage .btn display academy ke .cta-mobile rule ko override kar raha tha) */
.cta-mobile { display: none; }
@media (max-width: 1020px) {
  .cta-desktop { display: none; }
  .cta-mobile { display: inline-flex; padding: 9px 14px; font-size: .88rem; white-space: nowrap; }
}

/* Study area (moved from portal) */
/* Portal variables the study rules need that the manage pages do not
   already define (values copied from portal.html :root). --gold,
   --muted, --line and --ink are NOT redefined here: the academy
   template values already loaded on manage pages apply. */
:root {
  --surface: #ffffff;
  --surface-soft: #eef3ef;
  --brand: #123d32;
  --brand-deep: #0c2c24;
  --brand-soft: #dcebe4;
  --gold-soft: #f6ead2;
  --white: #ffffff;
  --danger: #9e2f2f;
  --radius-sm: 10px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-deep);
  font-weight: 700;
  font-size: .84rem;
  letter-spacing: .03em;
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--gold); }
.btn-primary { background: var(--brand-deep); color: var(--white); }
.btn-primary:hover { background: var(--gold); color: #17211d; }
.btn-secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-deep); }
.error { color: var(--danger); font-size: .8rem; margin: 10px 0 0; min-height: 1.2em; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 34px; }
.section-head p { color: var(--muted); max-width: 560px; margin: 0; }
.lesson-area { margin-top: 34px; }
.lesson-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.lesson-card { background: var(--surface-soft); padding: 24px; border-top: 3px solid var(--brand); }
.lesson-card:nth-child(2n) { border-top-color: var(--gold); }
.lesson-label { color: var(--gold); font-size: .76rem; font-weight: 800; margin-bottom: 12px; }
.lesson-list { margin: 16px 0 0; padding-left: 20px; color: var(--muted); }
.lesson-list li { margin: 8px 0; }
.course-book {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 24px;
  border: 4px double var(--gold);
  background: var(--surface);
  box-shadow: 0 10px 25px rgba(21, 56, 45, .09);
}
.course-book::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .055;
  background:
    repeating-conic-gradient(from 45deg at 12px 12px, var(--gold) 0 10deg, transparent 10deg 35deg, var(--gold) 35deg 45deg),
    repeating-conic-gradient(from 225deg at 36px 36px, var(--gold) 0 10deg, transparent 10deg 35deg, var(--gold) 35deg 45deg);
  background-size: 48px 48px;
}
.book-band {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  align-items: center;
  padding: 17px 18px;
  background: #0e3b2f;
  color: #fff;
  border-bottom: 2px solid var(--gold);
}
.book-band::after {
  content: "";
  position: absolute;
  right: -26px;
  top: 50%;
  width: 110px;
  height: 78px;
  transform: translateY(-50%);
  border: 1px solid rgba(225, 184, 103, .28);
  border-radius: 55px 55px 0 0;
  box-shadow: inset 0 0 0 8px rgba(225, 184, 103, .05);
}
.book-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--gold);
  border-radius: 50% 50% 8px 8px;
  background: rgba(255, 255, 255, .06);
  font-size: 1.35rem;
  line-height: 1;
}
.book-band h4 { position: relative; z-index: 1; margin: 0; font-family: "Libre Baskerville", serif; font-size: 1rem; line-height: 1.35; }
.book-body { padding: 17px 18px 18px; }
.book-caption { margin: 0 0 14px; color: var(--muted); font-size: .78rem; }
.book-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.book-actions .btn { min-height: 40px; padding: 9px 13px; font-size: .78rem; }
.sample-note { color: var(--muted); font-size: .78rem; margin-top: 20px; }
.live-class-area { margin-top: 34px; }
.live-class-area .section-head { margin-bottom: 22px; }
.live-class-area .section-head h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
.live-class-grid { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: stretch; }
.live-class-card { overflow: hidden; background: var(--surface-soft); border-top: 3px solid var(--brand); }
.live-class-card.backup { border-top-color: var(--gold); padding-bottom: 22px; }
.live-class-card.backup .backup-form { max-width: 560px; }
.live-class-card-head { display: grid; grid-template-columns: 44px 1fr; gap: 13px; align-items: start; padding: 20px 22px; }
.classroom-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; }
.classroom-body > * { min-width: 0; }
.student-chat-panel { min-width: 0; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); }
.student-chat-head { padding: 15px 16px 12px; border-bottom: 1px solid var(--line); }
.student-chat-head strong { display: block; font-family: "Libre Baskerville", serif; font-size: .96rem; }
.student-chat-head span { display: block; margin-top: 2px; color: var(--muted); font-size: .7rem; }
.student-chat-messages { flex: 1 1 0; min-height: 220px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { margin: auto; max-width: 24ch; color: var(--muted); text-align: center; font-size: .78rem; }
.chat-message { align-self: flex-start; max-width: 88%; }
.chat-message.mine { align-self: flex-end; }
.chat-message-meta { margin: 0 4px 3px; color: var(--muted); font-size: .64rem; font-weight: 800; }
.chat-message.mine .chat-message-meta { text-align: right; }
.chat-message-bubble { padding: 9px 11px; border-radius: 4px 12px 12px 12px; background: var(--surface-soft); color: var(--ink); font-size: .8rem; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-message.mine .chat-message-bubble { border-radius: 12px 4px 12px 12px; background: var(--brand-deep); color: var(--white); }
.student-chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 11px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.student-chat-form input { min-width: 0; padding: 9px 10px; background: var(--surface); font-size: .78rem; }
.student-chat-form .btn { min-height: 40px; padding: 8px 12px; font-size: .75rem; }
.student-chat-form input:disabled, .student-chat-form button:disabled { opacity: .55; cursor: not-allowed; }
.student-chat-feedback { grid-column: 1 / -1; min-height: 0; margin: 0; color: var(--muted); font-size: .68rem; }
.student-chat-feedback:not(:empty) { margin-top: -2px; }
.live-class-card-head svg { width: 30px; height: 30px; color: var(--gold); margin-top: 2px; }
.live-class-card-head h3 { margin: 0 0 5px; }
.live-class-card-head p { margin: 0; color: var(--muted); font-size: .84rem; }
.live-video-stage { position: relative; height: clamp(440px, 66vh, 780px); display: block; overflow: hidden; background: #07110e; color: #fff; }
.live-video-stage > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-video-placeholder { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(470px, 92%); max-width: 470px; padding: 34px 28px; text-align: center; }
.live-video-placeholder svg { width: 54px; height: 54px; color: var(--gold); margin-bottom: 15px; }
.live-video-placeholder h3 { margin-bottom: 8px; color: #fff; }
.live-video-placeholder p { margin: 0 0 20px; color: #c8d6d0; font-size: .85rem; }
.live-class-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 13px 16px; background: #0e3b2f; border-top: 1px solid rgba(255,255,255,.16); }
.live-class-controls .btn { min-height: 40px; padding: 8px 13px; font-size: .78rem; }
.live-class-controls .btn:disabled { opacity: .48; cursor: not-allowed; }
.live-chat-button { border-color: var(--gold); background: transparent; color: #fff; }
.live-chat-button:hover:not(:disabled) { background: var(--gold); color: #17211d; }
.live-class-status { margin: 0; color: #dbe8e2; font-size: .75rem; flex: 1 1 220px; }
.backup-form { display: grid; gap: 11px; padding: 0 22px; }
.backup-form label { color: var(--ink); }
.backup-form .btn { width: 100%; }
.backup-help { margin: 0; color: var(--muted); font-size: .78rem; }
.provider-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 22px 14px; }
.provider-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; background: var(--surface); color: var(--muted); font-size: .73rem; font-weight: 800; }
.provider-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.provider-chip:last-child .provider-dot { background: var(--gold); }
.live-privacy-note { margin: 12px 22px 0; color: var(--muted); font-size: .72rem; }
.teaching-area { margin-top: 46px; padding-top: 38px; border-top: 1px solid var(--line); }
.teaching-area .section-head { margin-bottom: 22px; }
.teaching-area .section-head h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
.whiteboard-card { overflow: hidden; border: 4px double var(--gold); background: var(--surface); box-shadow: 0 10px 25px rgba(21, 56, 45, .09); }
.whiteboard-toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 12px 14px; background: #0e3b2f; color: #fff; border-bottom: 2px solid var(--gold); }
.tool-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tool-label { margin-right: 2px; color: #dbe8e2; font-size: .74rem; font-weight: 800; }
.color-tool, .board-tool, .size-tool {
  min-width: 40px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
  font-size: .76rem;
  font-weight: 800;
}
.color-tool { width: 40px; padding: 0; }
.color-tool::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--pen-color); border: 2px solid #fff; }
.size-tool { width: 40px; padding: 0; }
.size-tool::before { content: ""; width: var(--dot, 6px); height: var(--dot, 6px); border-radius: 50%; background: #fff; }
.color-tool[aria-pressed="true"], .board-tool[aria-pressed="true"], .board-tool:hover, .color-tool:hover, .size-tool[aria-pressed="true"], .size-tool:hover { outline: 2px solid var(--gold); outline-offset: 1px; background: rgba(255, 255, 255, .15); }
.board-tool { display: inline-flex; gap: 7px; padding: 7px 11px; }
.board-tool svg { width: 17px; height: 17px; }
.board-expand { margin-left: auto; }
.whiteboard-canvas-wrap { height: min(58vh, 560px); min-height: 350px; background: #fff; }
.whiteboard-canvas { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; background: #fff; }
.whiteboard-card:fullscreen, .whiteboard-card.board-fullscreen { width: 100vw; height: 100dvh; display: flex; flex-direction: column; background: #fff; }
.whiteboard-card:fullscreen .whiteboard-canvas-wrap, .whiteboard-card.board-fullscreen .whiteboard-canvas-wrap { flex: 1 1 auto; height: auto; min-height: 0; }
.whiteboard-note { margin: 10px 14px 13px; color: var(--muted); font-size: .76rem; }
@media (max-width: 680px) {
  .section-head { display: block; }
  .lesson-grid { grid-template-columns: 1fr; }
  .lesson-card { padding: 20px; }
  .book-actions { display: grid; grid-template-columns: 1fr; }
  .book-actions .btn { width: 100%; }
  .live-class-grid { grid-template-columns: 1fr; }
  .classroom-body { grid-template-columns: 1fr; }
  .live-video-stage { height: 76dvh; min-height: 500px; }
  .student-chat-panel { border-left: 0; border-top: 1px solid var(--line); }
  .student-chat-messages { min-height: 230px; max-height: 300px; }
  .live-class-card-head { padding: 18px; }
  .backup-form { padding: 0 18px; }
  .provider-row { padding-inline: 18px; }
  .live-privacy-note { margin-inline: 18px; }
  .teaching-area { margin-top: 38px; padding-top: 30px; }
  .whiteboard-toolbar { padding: 10px; gap: 8px; }
  .tool-group { width: 100%; }
  .board-expand { margin-left: 0; }
  .whiteboard-canvas-wrap { height: 56vh; min-height: 360px; }
  .whiteboard-note { margin-inline: 10px; }
}

/* Facebook-style read-only profile view (My Profile tab) */
.pf-view { text-align: center; }
.pf-view-photo-wrap { display: flex; justify-content: center; margin: 6px 0 12px; }
.pf-view-photo { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); display: block; }
.pf-view-initial { width: 128px; height: 128px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 800; border: 3px solid var(--gold); }
.pf-view-name { margin: 0 0 2px; font-size: 1.4rem; }
.pf-view-sub { margin: 0 0 16px; color: var(--muted); }
.pf-view-rows { text-align: left; max-width: 520px; margin: 0 auto 8px; }
.pf-view-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 2px; border-bottom: 1px solid var(--border); }
.pf-view-row:last-child { border-bottom: 0; }
.pf-view-row span { color: var(--muted); font-weight: 600; }
.pf-view-row strong { font-weight: 700; text-align: right; word-break: break-word; }

/* For Teachers landing hero: centered heading, one line on laptop/desktop.
   (Base .section-head here is a flex row for dashboard headers, which squeezed
   this centered heading into a narrow column and wrapped it to 4 lines.) */
.section-head.hero-center{display:block;max-width:920px;margin:0 auto 36px;text-align:center}
.section-head.hero-center h2{font-size:2rem}
.section-head.hero-center p{max-width:640px;margin:14px auto 0}
@media(max-width:640px){
  .section-head.hero-center h2{font-size:1.5rem}
}

/* ---- App header (AMS dashboards only): same look as the site header,
   but the pill holds the role's tabs + Free Resources + a More dropdown,
   and the avatar circle is replaced by a ⋮ account menu. ---- */
.app-header .main-nav button{font:inherit;font-size:.95rem;font-weight:600;color:var(--green-deep);background:none;border:none;border-radius:999px;padding:8px 15px;cursor:pointer;white-space:nowrap}
.app-header .main-nav button:hover,.app-header .main-nav button.active{background:#fff;box-shadow:var(--shadow-sm)}
.app-header .main-nav ul{justify-content:center}
/* More dropdown is click-controlled (app-header.js), not hover-controlled. */
.app-header .nav-item:hover .nav-drop,
.app-header .nav-item:focus-within .nav-drop{display:none}
.app-header .nav-item.open .nav-drop{display:block}
.app-header .nav-drop button{display:block;width:100%;text-align:left;font:inherit;font-size:.95rem;font-weight:600;color:var(--green-deep);background:none;border:none;border-radius:9px;padding:9px 12px;cursor:pointer;white-space:nowrap}
.app-header .nav-drop button:hover{background:var(--mint)}
.app-header .nav-drop button.active{background:var(--mint);font-weight:800}
/* ⋮ account menu (right side, where the avatar circle used to sit). */
.app-menu-wrap{position:relative}
.app-dots{width:46px;height:46px;border-radius:50%;border:none;background:var(--mint);color:var(--green);font-size:1.5rem;font-weight:800;line-height:1;cursor:pointer;flex:0 0 auto}
.app-dots:hover{background:#dcefe4}
.app-menu{position:absolute;right:0;top:calc(100% + 10px);min-width:260px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:8px;display:none;z-index:400}
.app-menu-wrap.open .app-menu{display:block}
.app-menu-head{display:flex;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--line);margin-bottom:6px}
.app-menu-logo{width:40px;height:40px;border-radius:50%;object-fit:cover;border:2px solid var(--gold);flex:0 0 auto}
.app-menu-id{min-width:0}
.app-menu-academy{font-size:.8rem;color:var(--muted);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.app-menu-user{font-weight:800;color:var(--green-deep);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.app-menu-head .badge{margin-top:4px}
.app-menu-item{display:block;width:100%;text-align:left;font:inherit;font-size:.95rem;font-weight:600;color:var(--green-deep);background:none;border:none;border-radius:9px;padding:10px 12px;cursor:pointer}
.app-menu-item:hover{background:var(--mint)}
.app-menu-item.active{background:var(--mint);font-weight:800}
@media(max-width:1400px){
  .app-header .main-nav button{padding:8px 10px}
}
@media(max-width:1020px){
  /* Keep the pill visible on app pages (site CSS hides .main-nav here);
     it scrolls horizontally, and the More dropdown opens as a fixed panel
     so the scrolling pill does not clip it. */
  .app-header .main-nav{display:block;flex:1 1 auto;min-width:0;margin:0}
  .app-header .main-nav ul{justify-content:flex-start;overflow-x:auto;scrollbar-width:none}
  .app-header .main-nav ul::-webkit-scrollbar{display:none}
  .app-header .nav-item.open .nav-drop{position:fixed;top:72px;right:12px;left:auto;transform:none;z-index:400}
  /* No trial CTA bar on app pages. */
  .app-page .mobile-bar{display:none!important}
}

/* Study tab headings: centered, one line at laptop/desktop width.
   (User request 2026-11-25: "Study", "My Courses", level labels and
   course titles were mixed left/center.) */
#tab-study .card > h3 { text-align: center; }
.lesson-area .section-head { display: block; text-align: center; }
.lesson-area .section-head p { text-align: left; margin: 14px auto 0; max-width: 640px; }
.lesson-label { text-align: center; }
.lesson-card h3 { text-align: center; }

/* Study tab: Live Classroom + Takhtee headings — same flex-row squeeze as the
   lesson headings: center the heading block, one line, description below it. */
.live-class-area .section-head,
.teaching-area .section-head{display:block;text-align:center}
.live-class-area .section-head p,
.teaching-area .section-head p{text-align:left;margin:14px auto 0;max-width:640px}

/* Free Resources tab (native rows, same look as the public page) */
#tab-resources .res-intro{color:var(--muted);margin:2px 0 26px}
#tab-resources .fr-group{max-width:900px;margin:0 auto 44px}
#tab-resources .fr-group:last-child{margin-bottom:0}
#tab-resources .fr-group h2{font-size:1.5rem;text-align:left;margin-bottom:2px}
#tab-resources .fr-sub{color:var(--muted);font-size:.97rem;margin-bottom:18px}
#tab-resources .fr-meta{flex-shrink:0;background:var(--mint);color:var(--green);font-weight:800;font-size:.78rem;padding:6px 13px;border-radius:999px;white-space:nowrap;margin-left:auto}
#tab-resources .fr-row-main{flex:1;min-width:0}
#tab-resources .fr-row-main h3{font-size:1.05rem;color:var(--green-deep);margin:0 0 2px}
#tab-resources .fr-row-main p{color:var(--muted);font-size:.94rem;margin:0}
#tab-resources .fr-list .res-row{background:#fff;border-color:var(--line)}
@media(max-width:640px){#tab-resources .fr-meta{display:none}#tab-resources .fr-group h2{font-size:1.3rem}}
