/* Teacher / student portal features (2026-10-07): teaching ideas, lesson plan feedback, grading, alerts, messages,
   narrative reports, live view. Portal-only stylesheet (served from the app; not part of the public site). */
.linkbtn { background: none; border: 0; padding: 0 0 0 6px; color: var(--blue); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:hover { color: var(--blue-dark); }
.nbadge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--blue); color: #fff; font-size: .75rem; display: inline-flex; align-items: center; justify-content: center; }
.nbadge.urgent { background: var(--red); }
.side button.nav.on .nbadge { background: #fff; color: var(--blue); }
.mt { margin-top: 18px; } .m0 { margin: 0; } .mt0 { margin-top: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .grow { flex: 1; } .right { margin-left: auto; }
.hidden { display: none !important; }

/* 1. teaching ideas */
.tp-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tp-unit { text-align: left; display: flex; flex-direction: column; gap: 8px; cursor: pointer; border: 1.5px solid transparent; font: inherit; color: inherit; }
.tp-unit:hover { border-color: var(--blue-tint-2); transform: translateY(-1px); }
.tp-uid { font-size: .78rem; font-weight: 700; color: var(--red-dark); letter-spacing: .04em; }
.tp-codes { display: flex; flex-wrap: wrap; gap: 4px; }
.tp-ready { color: #13685a; font-weight: 700; }
.tp-h { margin: 2px 0 6px; }
.tp-sum { font-size: 1.05rem; background: var(--blue-tint); border-radius: 12px; padding: 10px 14px; }
.tp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.tp-sec { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; background: #fff; }
.tp-sec h3 { margin: 4px 0 8px; font-size: 1.02rem; display: flex; gap: 8px; align-items: center; }
.tp-sec h3 .ic { width: 22px; height: 22px; color: var(--red); }
.tp-sec ul, .tp-sec ol { padding-left: 20px; margin: 6px 0; } .tp-sec li { margin: 5px 0; }
.tp-lola { grid-column: 1 / -1; background: var(--teal-tint); border-color: #bfe6de; }
.tp-loading { display: flex; gap: 16px; align-items: center; padding: 10px; }
@media (max-width: 800px) { .tp-grid { grid-template-columns: 1fr; } }
.nbadge[hidden] { display: none; }

/* 2. lesson plan feedback */
.lp-grid { align-items: start; }
.lp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lp-mode { margin-top: 12px; }
.lp-list { display: flex; flex-direction: column; gap: 8px; }
.lp-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.lp-open { flex: 1; text-align: left; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 0; }
.lp-open:hover b { color: var(--blue); text-decoration: underline; }
.lp-strengths { background: #fffaf0; border-color: #f4e2b8; }
.lp-due { width: auto; }
.lp-text { white-space: pre-wrap; background: #f7f8fb; border-radius: 10px; padding: 12px; max-height: 320px; overflow: auto; font-size: .85rem; }
@media (max-width: 700px) { .lp-row { grid-template-columns: 1fr; } }

/* 3. grading setup */
.gr-top { align-items: start; }
.gr-table, .gr-asg { width: 100%; }
.gr-table td, .gr-table th { padding: 6px 4px; }
.gr-num { width: 80px; display: inline-block; }
.gr-total.ok { color: #12805c; }
.gr-total.err { color: var(--red-dark); }
.gr-gtext, .gr-msg { white-space: pre-line; }
.gr-inline { display: inline; margin: 0 8px 0 0; }
.gr-check { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 12px 0 4px; }
.gr-check input { width: auto; }
.gr-active, .gr-draft { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; background: #f6fbf8; }
.gr-draft { background: #fffaf0; border-color: #f4e2b8; }
.gr-gtext ul { margin: 6px 0; padding-left: 20px; }
.gr-chat { border-top: 1px solid var(--line); padding-top: 10px; }
.gr-log { max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.gr-msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: .92rem; line-height: 1.45; }
.gr-msg.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.gr-msg.lola { align-self: flex-start; background: #f1f3f8; border-bottom-left-radius: 4px; }
.gr-est td, .gr-est th { white-space: nowrap; }
.tablewrap { overflow-x: auto; }

/* 4. student alerts */
.al-list { display: flex; flex-direction: column; gap: 12px; }
.al-card { border-left: 4px solid var(--teal); }
.al-card.al-urgent { border-left-color: var(--amber); background: #fffaf0; }
.al-card.mini { padding: 8px 10px; margin: 8px 0 0; border: 1px solid var(--line); border-radius: 10px; border-left-width: 3px; }
.al-who { margin: 8px 0 4px; }
.al-why { margin: 0 0 8px; }
.al-next { margin: 0 0 10px; }
.al-next ul { margin: 6px 0 0; padding-left: 20px; }
.al-empty { text-align: left; }
.al-overview { margin-top: 0; } /* filled into #ovAlerts on Overview */
@media (max-width: 700px) {
  .gr-top, .lp-grid, .tp-grid { grid-template-columns: 1fr; }
  .tabs { flex-wrap: wrap; }
}

/* 5. messages */
.dm-wrap { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 14px; align-items: stretch; min-height: 420px; }
.dm-list { display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.dm-item { display: flex; flex-direction: column; gap: 2px; text-align: left; background: none; border: 1px solid transparent; border-radius: 12px; padding: 10px; font: inherit; color: inherit; cursor: pointer; position: relative; }
.dm-item:hover, .dm-item.on { background: var(--blue-tint); border-color: var(--blue-tint-2); }
.dm-item .nbadge { position: absolute; top: 10px; right: 10px; }
.dm-prev { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-pane { display: flex; flex-direction: column; min-height: 420px; }
.dm-log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 0; max-height: 480px; }
.dm-msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: .92rem; line-height: 1.45; display: flex; flex-direction: column; gap: 2px; white-space: pre-wrap; word-break: break-word; }
.dm-msg.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.dm-msg.me .muted { color: #c9d6f5; }
.dm-msg.them { align-self: flex-start; background: #f1f3f8; border-bottom-left-radius: 4px; }
.dm-compose { margin-top: 8px; }
@media (max-width: 700px) {
  .dm-wrap { grid-template-columns: 1fr; }
  .dm-pane { min-height: 320px; }
}

/* live view + narrative reports */
.lv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.lv-card { text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); font: inherit; color: inherit; background: var(--card); }
.lv-card.lv-active { border-color: var(--teal); }
.lv-card.lv-idle { border-color: var(--amber); }
.lv-watch { margin-top: 14px; }
.nr-list { display: flex; flex-direction: column; gap: 6px; }
.nr-item { text-align: left; background: none; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.nr-item:hover { border-color: var(--blue); }
.nr-like { background: var(--blue-tint); border-radius: 12px; padding: 12px; margin: 10px 0; }
.nr-sec { margin-top: 14px; }
.nr-cites { margin-left: 4px; }
.nr-inputs, .nr-facts { font-size: .8rem; }
.nr-doc.hidden { display: none; }


/* teacher-home-redesign 2026-10-07 */
/* Class Overview command center + quieter tab bar */
.ov-today { margin-bottom: 18px; }
.ov-today-head { margin-bottom: 10px; }
.ov-today-title { margin: 0 0 2px; font-size: 1.15rem; color: var(--blue-dark); }
.ov-today-sub { margin: 0; max-width: 52ch; }
.ov-focus { margin-top: 4px; }
.ov-card h3 { font-size: 1.02rem; }
.ov-attn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ov-attn-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; border-left: 3px solid var(--amber); background: #fffaf0; }
.ov-attn-text { font-size: .92rem; flex: 1; min-width: 0; }
.ov-attn-actions { flex: none; }
.ov-empty { padding: 4px 0 2px; }
.ov-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ov-card-actions { margin-top: 12px; }
.ov-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 4px 0 18px; padding: 12px 14px;
  background: #fff; border: 1px solid #eceff6; border-radius: 16px; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.ov-metric { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ov-metric b { font-size: 1.25rem; color: var(--blue); line-height: 1.2; }
.ov-secondary { margin-top: 0; }
.ov-details { padding-top: 16px; }
.ov-sum { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer;
  margin: 0 0 8px; }
.ov-sum::-webkit-details-marker { display: none; }
.ov-sum::marker { content: ""; }
.ov-sum h3 { margin: 0; }
.ov-sum-hint { opacity: .65; }
.ov-details:not([open]) .ov-sum-hint::before { content: "Expand · "; }
.ov-details[open] .ov-sum-hint::before { content: ""; }
.ov-unit { margin: 10px 0; }
.ov-unit-top { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; align-items: baseline; }
.ov-exams { width: 100%; }
.m0 { margin: 0; }

/* Tabs: primary row + More menu for secondary views */
.tabs { align-items: center; }
.tabs-more { position: relative; display: inline-flex; }
.tabs-more-btn { font-weight: 700; }
.tabs-more-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 200px; padding: 6px;
  background: #fff; border: 1px solid #e6eaf5; border-radius: 14px; box-shadow: 0 12px 28px rgba(27,65,145,.14);
  display: flex; flex-direction: column; gap: 2px; }
.tabs-more-menu[hidden] { display: none; }
.tabs-more-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px;
  padding: 9px 12px; font: inherit; font-weight: 600; color: #394056; cursor: pointer; }
.tabs-more-item:hover, .tabs-more-item:focus-visible { background: var(--blue-tint); color: var(--blue-dark); outline: none; }
.tabs-more-item.on { background: var(--blue-tint); color: var(--blue); font-weight: 700; }

/* Sidebar toolkit badges: clearer count chips */
.side button.nav .nbadge { margin-left: auto; min-width: 24px; height: 24px; padding: 0 8px; font-size: .78rem; font-weight: 800;
  letter-spacing: .02em; box-shadow: 0 2px 6px rgba(27,65,145,.18); }
.side button.nav .nbadge.urgent { box-shadow: 0 2px 8px rgba(235,71,61,.35); }
.side button.nav[data-tk="alerts"] .nbadge:not([hidden])::after { content: ""; }
.side .nav-label { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }

@media (max-width: 900px) {
  .ov-metrics { grid-template-columns: repeat(2, 1fr); }
  .ov-focus, .ov-secondary { grid-template-columns: 1fr; }
  .ov-attn-item { flex-direction: column; align-items: stretch; }
  .tabs-more-menu { right: auto; left: 0; }
}
@media (max-width: 520px) {
  .ov-metrics { grid-template-columns: 1fr 1fr; padding: 10px 12px; }
  .ov-actions .btn { flex: 1 1 auto; }
}
.pill.maa { background: #eef2ff; color: #2f3a8f; font-size: .72em; margin-left: .35em; white-space: nowrap; }
/* 2026-10-31: full-page lesson plan (Teaching ideas week click), same full-screen pattern as Ask Lola */
body.lp-open { overflow: hidden; }
.lp-page { position: fixed; inset: 0; z-index: 900; background: #f6f7fb; font-family: 'Quicksand', system-ui, -apple-system, 'Segoe UI', sans-serif; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.lp-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .9rem clamp(1rem, 4vw, 2.5rem); background: #fff; border-bottom: 1px solid #e3e6ef; }
.lp-h { margin: .1rem 0 0; font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.lp-btns { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.lp-close { border: 0; background: #eef0f6; width: 2.4rem; height: 2.4rem; border-radius: 50%; font-size: 1.1rem; cursor: pointer; }
.lp-close:hover, .lp-close:focus-visible { background: #dde1ee; }
.lp-body { max-width: 1180px; margin: 0 auto; padding: 1.2rem clamp(1rem, 4vw, 2.5rem) 3rem; }
.lp-glance { display: grid; grid-template-columns: 1fr auto; gap: .6rem 1.5rem; align-items: start; }
.lp-glance .tp-codes { grid-column: 1 / -1; }
.lp-k { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7280; }
.lp-sum { margin: .25rem 0 0; font-size: 1.05rem; }
.lp-time b { font-size: 1.5rem; color: #1f3a8a; }
.lp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; margin-top: 1rem; }
.lp-sec h3 { margin: 0 0 .6rem; font-size: 1.02rem; }
.lp-sec ul, .lp-sec ol { margin: 0; padding-left: 1.2rem; } .lp-sec li { margin: .35rem 0; }
.lp-flow { margin: 1.8rem 0 0; font-size: 1.2rem; }
.lp-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.lp-table th, .lp-table td { text-align: left; padding: .4rem .45rem; border-bottom: 1px solid #eceef4; vertical-align: top; }
.lp-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; }
.lp-table .pill.maa { margin-left: 0; white-space: normal; }
.lp-tot td { font-weight: 700; border-bottom: 0; }
.lp-formulas { margin: 0; } .lp-formulas dt { font-weight: 600; margin-top: .55rem; } .lp-formulas dd { margin: .15rem 0 0; color: #4b5563; font-size: .92rem; }
.lp-page .tp-loading { max-width: 520px; margin: 18vh auto 0; text-align: center; }
@media (max-width: 640px) { .lp-glance { grid-template-columns: 1fr; } .lp-cols { grid-template-columns: 1fr; } }
@media print { .lp-top .lp-btns, #tpRegen { display: none; } .lp-page { position: static; overflow: visible; } }
.lp-ans { margin-top: .3rem; padding: .4rem .6rem; background: #e6f3ec; border-radius: 8px; }
/* formulas card: display math, kept inside the card */
.lp-sec { min-width: 0; }
.lp-formulas dt.lp-fm { font-weight: 400; margin-top: .7rem; max-width: 100%; }
.lp-fm-math { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: .2rem 0; -webkit-overflow-scrolling: touch; }
.lp-fm-math .katex-display { margin: .35rem 0; text-align: left; }
.lp-fm-math .katex-display > .katex { text-align: left; font-size: 1.12em; white-space: normal; max-width: 100%; }
.lp-fm-math .katex .base { white-space: nowrap; }
.lp-formulas dd { overflow-wrap: anywhere; }
