/* ==========================================================================
   Levelora 2 — staff workspaces: tutor hub, planner, live room, wrap-up, portals
   ========================================================================== */

/* ---------- today / class hub ---------- */
.class-card { border-top: 4px solid var(--tone); }
.class-card .card-head { align-items: flex-start; }
.class-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, .9fr); gap: 22px; align-items: start; }
.class-body > div:first-child { display: grid; justify-items: start; gap: 12px; }
@media (max-width: 1100px) { .class-body { grid-template-columns: minmax(0, 1fr); } }
.roster { gap: 14px; }
.roster-card { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 18px 12px; color: inherit; text-decoration: none !important; transition: transform .15s var(--ease), box-shadow .15s; }
.roster-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.roster-card strong { font-family: var(--font-display); margin-top: 6px; }
.roster-card .spark { width: 140px; height: 30px; }
.empty-seat { border-style: dashed; box-shadow: none; background: transparent; align-content: center; min-height: 160px; }
.spark path { fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.heat td.cell.avg { background: transparent; color: var(--muted) !important; border: 1px dashed var(--line); }
.heat-avg .who { padding-top: 6px; }
.heat .who a { color: var(--ink-900); text-decoration: none; }
.team-mini svg { width: 100%; height: auto; max-height: 180px; display: block; border-radius: 16px; }

/* ---------- planner ---------- */
.phase-bar { display: flex; gap: 6px; border-radius: 14px; overflow: hidden; }
.phase-seg { padding: 12px 14px; background: var(--tone-bg); border-top: 4px solid var(--tone); min-width: 0; }
.phase-seg strong { display: block; font-family: var(--font-display); color: var(--tone-ink); font-size: .92rem; }
.phase-seg small { color: var(--muted); }
.objectives { margin-top: 16px; }
.objectives .ico { color: var(--brand); }
.plan-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.plan-card { display: flex; flex-direction: column; }
.steps { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.steps li::marker { color: var(--brand); font-weight: 700; }
.sticky-actions { position: sticky; bottom: 14px; z-index: 30; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 22px; padding: 12px 16px; border-radius: 18px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.sticky-actions .muted { margin-right: auto; display: inline-flex; gap: 6px; align-items: center; }
.sticky-actions .muted .ico { width: 16px; height: 16px; }

/* ---------- live command centre ---------- */
.page-live { max-width: none; }
.live { display: grid; gap: 14px; }
.live.is-offline .live-bar { outline: 3px solid #fb7185; }
.live-bar { display: flex; align-items: center; gap: 18px; padding: 14px 18px; flex-wrap: wrap; }
.live-title { display: flex; gap: 12px; align-items: center; min-width: 170px; }
.live-title strong { display: block; color: #fff; font-family: var(--font-display); font-size: 1.1rem; }
.live-title small { color: #a6a8d6; }
.phase-steps { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.phase-step { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); color: #c9cbea; font-family: var(--font-display); font-weight: 600; font-size: .86rem; cursor: pointer; transition: background .15s; }
.phase-step:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.phase-step span { display: grid; text-align: left; line-height: 1.15; }
.phase-step small { color: #8f92c7; font-size: .7rem; font-weight: 500; }
.phase-step.is-on { background: linear-gradient(135deg, #8b5cf6, #6a45f5); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(106, 69, 245, .45); }
.phase-step.is-on small { color: #e3dcff; }
.phase-step .ico { width: 18px; height: 18px; }
.live-clock { text-align: center; padding: 6px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); }
.live-clock span { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 750; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.live-clock small { color: #a6a8d6; font-size: .72rem; }
.live-clock.is-low span { color: #fbbf24; }
.live-kpis { display: flex; gap: 16px; }
.live-kpis div { text-align: center; }
.live-kpis strong { display: block; font-family: var(--font-display); color: #fff; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.live-kpis small { color: #a6a8d6; font-size: .72rem; }
.live-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 4px 2px; }
.live-tools .switch strong { font-family: var(--font-display); }
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.live-seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.live-side { display: grid; gap: 14px; position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow: auto; padding-bottom: 6px; }
.seat { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--tone); border-radius: 18px; padding: 14px; display: grid; gap: 8px; box-shadow: var(--shadow-xs); align-content: start; transition: box-shadow .2s, transform .2s; }
.seat.st-help { box-shadow: 0 0 0 3px rgba(244, 63, 94, .18), var(--shadow); }
.seat.st-help .pill { animation: livePulse 1.8s infinite; }
.seat.st-risk { box-shadow: 0 0 0 3px rgba(229, 138, 0, .16), var(--shadow); }
.seat.st-away, .seat.st-waiting, .seat.st-paused { opacity: .78; }
.seat.flash { animation: seatFlash .9s var(--ease); }
@keyframes seatFlash { 0% { transform: scale(.98); box-shadow: 0 0 0 6px var(--tone-bg); } 100% { transform: none; } }
.seat-head { display: flex; gap: 10px; align-items: center; }
.seat-head small { display: flex; gap: 4px; align-items: center; color: var(--muted); font-size: .78rem; }
.seat-head .flame { width: 14px; height: 14px; color: #f97316; }
.seat-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink-900); text-decoration: none; }
.seat-head .pill { white-space: nowrap; }
.seat-reason { margin: 0; font-size: .86rem; color: var(--text-2); min-height: 2.4em; }
.seat-skill { display: flex; gap: 8px; font-size: .86rem; font-weight: 600; }
.seat-stats { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.seat-round { display: grid; gap: 4px; padding: 8px 10px; background: var(--surface-2); border-radius: 12px; font-size: .8rem; }
.seat-mis { display: flex; gap: 6px; align-items: center; font-size: .8rem; color: #be123c; background: #fff1f2; padding: 5px 9px; border-radius: 10px; }
.seat-mis .ico { width: 14px; height: 14px; }
.seat-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line-2); }
.seat-actions .btn:first-child { flex: 1; }
.result-dots { display: inline-flex; gap: 3px; }
.rd { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.rd-ok { background: #22c55e; } .rd-miss { background: #fb7185; } .rd-empty { background: var(--surface-3); }
.queue-card .count { position: static; }
.q-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px; border-radius: 14px; background: var(--tone-bg); margin-bottom: 8px; animation: feedIn .4s var(--ease); }
.q-item strong { font-family: var(--font-display); font-size: .92rem; }
.q-item p { margin: 2px 0 6px; font-size: .84rem; color: var(--text-2); }
.q-item time { font-size: .74rem; color: var(--muted); white-space: nowrap; }
.queue-clear { display: flex; gap: 10px; align-items: center; color: #15803d; background: #effaf3; padding: 12px; border-radius: 14px; font-size: .88rem; }
.queue-clear .ico { width: 20px; height: 20px; flex: none; }
.group-sug { padding: 12px; border-radius: 14px; border: 1px dashed var(--brand-200); background: var(--brand-50); margin-bottom: 8px; }
.group-sug p { margin: 4px 0 8px; }
.iv-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.iv-row:last-child { border-bottom: 0; }
.live-feed { max-height: 320px; overflow: auto; }
.sticker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sticker input { position: absolute; opacity: 0; }
.sticker span { display: grid; justify-items: center; gap: 6px; padding: 14px 8px; border-radius: 14px; border: 2px solid var(--line); cursor: pointer; text-align: center; background: #fff; transition: border-color .15s, background .15s; }
.sticker span .ico { width: 26px; height: 26px; color: var(--tone); }
.sticker b { font-family: var(--font-display); font-size: .8rem; font-weight: 600; }
.sticker input:checked + span { border-color: var(--tone); background: var(--tone-bg); }
.sticker input:focus-visible + span { box-shadow: var(--ring-focus); }

/* ---------- wrap-up ---------- */
.review-card.is-published { border-color: #bbf7d0; background: linear-gradient(180deg, #f6fdf8, #fff 40%); }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px; }
.review-evidence { border-right: 1px solid var(--line-2); padding-right: 24px; }

/* ---------- student profile ---------- */
.profile-head { display: flex; gap: 20px; align-items: center; background: radial-gradient(120% 140% at 0% 0%, var(--brand-50), #fff 60%); }
.profile-head h1 { margin: 2px 0; }
.profile-head p { margin: 0; }
.skill-table .group-row td { background: var(--surface-2); font-family: var(--font-display); font-weight: 700; color: var(--ink-900); }
.skill-table .group-row .chip-ico { vertical-align: middle; margin-right: 6px; }
.prompt-clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prompt-clip svg, .prompt-clip img { display: none; }
.answer-list .pill { margin-top: 4px; }

/* ---------- content bank ---------- */
.sample-q { padding: 16px; border-radius: 16px; background: var(--surface-2); margin-bottom: 14px; }
.sample-q .q-prompt { font-size: 1.12rem; font-weight: 600; color: var(--ink-900); }
.sample-q .q-visual { margin-top: 12px; display: flex; justify-content: center; }
.sample-q .q-visual svg { max-width: 100%; height: auto; max-height: 240px; }
.sample-choices { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; }
.sample-choices li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.sample-choices li.is-correct { border-color: #86efac; background: #f0fdf4; }
.sample-choices .choice-body svg { max-height: 90px; width: auto; }

/* ---------- copilot ---------- */
.copilot-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.kind-card { display: grid; gap: 6px; text-align: left; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.kind-card:hover { border-color: var(--brand-200); box-shadow: var(--shadow); transform: translateY(-1px); }
.kind-card strong { font-family: var(--font-display); }
.kind-card small { color: var(--muted); }
.kind-card.is-loading { opacity: .6; pointer-events: none; position: relative; }
.kind-card.is-loading::after { content: "Drafting…"; position: absolute; top: 14px; right: 14px; font-size: .76rem; color: var(--brand-600); font-weight: 700; }
.copilot-out { white-space: pre-wrap; font-size: .95rem; line-height: 1.65; background: var(--surface-2); border-radius: 14px; padding: 16px 18px; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; }

/* ---------- messages ---------- */
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 560px; }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; background: var(--surface-2); }
.chat-list > a { display: flex; gap: 10px; align-items: center; padding: 12px 14px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.chat-list > a:hover { background: #fff; }
.chat-list > a.is-on { background: #fff; box-shadow: inset 3px 0 0 var(--brand); }
.chat-list strong { display: block; font-family: var(--font-display); font-size: .92rem; }
.chat-list small { color: var(--muted); font-size: .76rem; }
.chat-new { margin-top: auto; padding: 14px; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); font-family: var(--font-display); }
.chat-thread { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 10px; overflow: auto; max-height: 520px; }
.bubble { max-width: 72%; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--surface-3); align-self: flex-start; }
.bubble.mine { align-self: flex-end; background: linear-gradient(135deg, #7c5cf7, #6a45f5); color: #fff; border-radius: 16px 16px 4px 16px; }
.bubble small { display: block; margin-top: 4px; font-size: .72rem; opacity: .7; }
.chat-compose { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-compose textarea { min-height: 52px; }

/* ---------- portals (parent / centre / platform) ---------- */
.child-switch { display: flex; gap: 8px; flex-wrap: wrap; }
.child-switch a { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px 6px 6px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--text-2); text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: .9rem; }
.child-switch a.is-on { border-color: var(--brand); color: var(--brand-700); box-shadow: 0 0 0 3px var(--brand-50); }
.hero-child { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; background: radial-gradient(120% 160% at 0% 0%, #efe9ff, #fff 55%); }
.hero-child h1 { margin: 0; }
.report-card { border-left: 4px solid var(--brand); }
.report-card .body { white-space: pre-line; line-height: 1.65; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badge-tile { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 16px 10px; border-radius: 16px; border: 1px solid var(--line); background: #fff; }
.badge-tile svg { width: 64px; height: 64px; }
.badge-tile strong { font-family: var(--font-display); font-size: .9rem; }
.badge-tile small { color: var(--muted); font-size: .76rem; }
.badge-tile.locked { opacity: .45; filter: grayscale(1); }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; }
.att-grid span { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; font-size: .7rem; font-weight: 700; color: #fff; }
.att-present { background: #22c55e; } .att-late { background: #fbbf24; color: #5b3b00 !important; } .att-absent { background: #fb7185; }
.cov-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.cov-bar span { display: block; height: 100%; }
.diff-list li { align-items: flex-start; }
.diff-add { color: #15803d; } .diff-del { color: #be123c; text-decoration: line-through; } .diff-mod { color: #92400e; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }

@media (max-width: 1280px) {
  .live-grid { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1100px) {
  .live-grid, .review-grid { grid-template-columns: minmax(0, 1fr); }
  .review-evidence { border-right: 0; padding-right: 0; }
  .live-side { position: static; max-height: none; }
  .chat { grid-template-columns: 1fr; }
  .chat-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 260px; overflow: auto; }
  .hero-child { grid-template-columns: auto minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .live-bar { gap: 12px; }
  .phase-step small { display: none; }
  .copilot-kinds, .sticker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-head { flex-direction: column; text-align: center; }
  .sticky-actions .muted { display: none; }
  .bubble { max-width: 90%; }
  .phase-bar { flex-direction: column; }
}
@media print {
  .review-form button, .sticky-actions, .live-tools { display: none !important; }
}
.tabs { overflow-y: hidden; }
@media (max-width: 860px) { .diff-list li { flex-wrap: wrap; } }
/* row action menus, paused rows, account link */
.row-menu { display: inline-block; position: relative; vertical-align: middle; }
.row-menu summary { list-style: none; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu-pop { right: 0; left: auto; width: 250px; padding: 12px; text-align: left; white-space: normal; z-index: 60; }
.table tr.is-paused td { opacity: .6; }
.side-account { color: inherit; text-decoration: none !important; min-width: 0; }
.side-account:hover strong { text-decoration: underline; }
.table-wrap:has(.row-menu[open]) { overflow: visible; }
/* the parent sidebar already lists every section on wide screens; the tab row is for phones */
@media (min-width: 861px) { .parent-tabs { display: none; } .hero-child + .parent-tabs + * { margin-top: 20px; } }

/* ---------- Game & AI settings: realm art ---------- */
.realm-thumb-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.art-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-500, #6b7280); font-size: .9rem; text-align: center; padding: 10px; }
.realm-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.realm-thumb { display: grid; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.realm-thumb-img { position: relative; display: block; aspect-ratio: 1000 / 420; overflow: hidden; }
.realm-thumb:not(.is-ready) .realm-thumb-img { filter: saturate(.55); opacity: .8; }
.realm-thumb-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; }
.realm-thumb-foot > span { display: grid; min-width: 0; line-height: 1.25; }
.realm-thumb-foot strong { font-size: .88rem; line-height: 1.2; }
.realm-thumb-foot small { font-size: .74rem; }
.realm-thumb-foot .btn { flex: none; }
.btn.is-busy { opacity: 1 !important; cursor: progress; }
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; vertical-align: -2px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.team-mini .landmark-art { display: block; max-width: 200px; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: #94d4fc; }
.team-mini .landmark-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.badge-art { display: block; height: auto; filter: drop-shadow(0 4px 6px rgba(15, 23, 42, .18)); }
.badge-art.badge-xs { width: 42px; flex: none; }
.badge-art.badge-tile-art { width: 76px; }

/* ---------- intro lesson pictures (platform content review) ---------- */
.lesson-art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.lesson-art-item { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.lesson-art-item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; background: var(--surface-2); }
.lesson-art-body { padding: 12px 14px 14px; }
.lesson-art-body .eyebrow { margin: 0 0 2px; display: block; }
.lesson-art-body > strong { display: block; }
.lesson-art .callout .ico { width: 15px; height: 15px; vertical-align: -2px; }
