/* Portal colours (Joshi 26 Nov 11:42): one colourful look for parents, students, teacher and admin, mixing the
   Standard and Mid-Century Modern palettes. The left menu always stays petrol. Each tab has its own soft background
   (dashboard stays beige); cards are bright so dark text always reads easily. Students keep the Mid-Century accents
   (body.stu, set by home.js). Status colours (Booked, Late, warnings, red badges, "needs you" edges) are not changed. */

body.pt { --rail: #163038; --rail-act: #DCBC89; --on-rail-act: #1A1A1A; --accent-text: #A26D58; --act: #BE7F63; --on-act: #1A1A1A;
  --surface: #F7F4EF; --pending: #CF9E3E; --pending-bg: #F4E7C6 }

/* Joshi 26 Nov 13:24: one standard background on every tab (the warm beige of the dashboard) */
body.pt { --bg: #D9D2CA; background: #D9D2CA }

/* Headings and quote */
body.pt .eyebrow { color: #A26D58; font-weight: 700 }
body.pt .qotd { border-left: 4px solid #C89862; background: linear-gradient(90deg, rgb(241 228 204 / .45), transparent 70%); padding-left: 16px; border-radius: 0 10px 10px 0 }
body.pt .qotd .qlbl { color: #717043 }
body.pt .avatar, body.pt .rail .avatar { background: #DCBC89; color: #1A1A1A }

/* Dashboard tiles: each its own colour band */
body.pt .tile { border-top-width: 5px; border-top-style: solid; background: #F7F4EF }
body.pt .tile:nth-child(5n+1) { border-top-color: #BE7F63 } body.pt .tile:nth-child(5n+2) { border-top-color: #C89862 }
body.pt .tile:nth-child(5n+3) { border-top-color: #456E69 } body.pt .tile:nth-child(5n+4) { border-top-color: #717043 }
body.pt .tile:nth-child(5n+5) { border-top-color: #29434F }
body.pt .tile .big { color: #29434F }

/* Section bands, tables, rows */
body.pt .card.rb > h2:first-child, body.pt .dc .dh { background: linear-gradient(90deg, #29434F, #404A41) }
body.pt .card.rb > .bk-row:nth-child(odd):not(.offer) { background: #EFE9E1 }
body.pt.dash table.tbl th { background: #2E3340; color: #F6F3EF }
body.pt.dash table.tbl tr:nth-child(even) td { background: #F1EBE2 }
body.pt.dash table.tbl tr:hover td { background: #F4E7C6 }

/* Folder tabs (Joshi 26 Nov 13:28): the open tab is teal and flows into a teal band at the top of its panel, no line */
body.pt .ftabs.ftabs > :not([aria-selected="true"]):not(.on) { background: #EAE1D3; color: #2E3340 }
body.pt .ftabs.ftabs > :is([aria-selected="true"], .on), body.pt .ftabs.ftabs > :is([aria-selected="true"], .on):hover { background: #29434F; color: #F6F3EF; border-color: #29434F; box-shadow: none; border-bottom: 0 }
body.pt .ftabs.ftabs > :is([aria-selected="true"], .on) :is(.count, .cnt, .chip) { box-shadow: 0 0 0 2px #29434F }
body.pt .tabpanel { background: #F7F4EF; border-color: #CFC3B2; border-top: 10px solid #29434F; margin-top: 0 }
body.pt .tabpanel > .card.rb:first-child, body.pt .tabpanel > :first-child > .card.rb:first-child { margin-top: -22px }
body.pt .tabpanel > .card.rb:first-child > h2:first-child, body.pt .tabpanel > :first-child > .card.rb:first-child > h2:first-child { border-radius: 0 0 10px 10px }

/* Buttons */
body.pt .btn.primary, body.pt .bk-btn.primary { background: #BE7F63; border-color: #BE7F63; color: #1A1A1A }
body.pt .btn:not(.primary) { border-color: #B7A98F }
body.pt .btn:not(.primary):hover { background: #F4E7C6; border-color: #C89862 }
body .sendbtn, body.pt.dash .sendbtn { background: #BE7F63; color: #1A1A1A }
.bj-step .num, .tb-h .num { background: #C89862; color: #1A1A1A } .bj-step.later .num { background: #B2BCBE }
body.pt.dash .convlist button[aria-pressed="true"] { background: #F4E7C6; color: #1A1A1A; box-shadow: inset 4px 0 0 #C89862 }

/* Small section headings get an ochre mark */
body.pt.dash .tabpanel h3, body.pt.dash .tabpanel > h2 { border-left: 4px solid #C89862; padding-left: 10px }

/* Students: the same look with Mid-Century accents (menu stays petrol) */
body.pt.stu { --act: #A26D58; --on-act: #F6F3EF; --accent-text: #583937 }
body.pt.stu .card.rb > h2:first-child { background: linear-gradient(90deg, #2E3340, #29434F) }
body.pt.stu .btn.primary, body.pt.stu .bk-btn.primary { background: #A26D58; border-color: #A26D58; color: #F6F3EF }
body.pt.stu .eyebrow { color: #583937 }
/* Login page (Joshi 26 Nov 11:46): same colourful look */
body.gate .gside{background:linear-gradient(160deg,#EEE1C9 0%,#EEDDD0 55%,#DCE2E2 100%)}
body.gate .gcard{background:#F7F4EF;border-color:#D9CDBB;border-top:5px solid #BE7F63;box-shadow:0 10px 30px rgb(22 48 56 / .10)}
body.gate .gtabs{background:#EFE7DA;border-color:#D9CDBB}
body.gate .gtabs button{color:#2E3340}
body.gate .gtabs button[aria-selected="true"]{background:#29434F;color:#F6F3EF}
body.gate .gh{color:#163038}
body.gate .gbtn{background:#BE7F63;color:#1A1A1A}
body.gate .gbtn:hover{background:#B07359}
body.gate .in{background:#FFFDF9;border-color:#CFC3B2}
body.gate .in:focus{border-color:#C89862;outline:2px solid #F4E7C6}
body.gate .glab{color:#2E3340}
body.gate .gsite,body.gate .gbrand+*{color:#F6F3EF}

/* Messages (Joshi 26 Nov): selected conversation in sand; small subject tag on each message */
body.pt .convlist button[aria-pressed="true"], body.pt .conv.on { background: #F4E7C6 !important; color: #1A1A1A !important; border-color: #C89862 !important; box-shadow: inset 4px 0 0 #C89862 }
body.pt .conv.on small { color: #424D50 !important }
.bubble .mtag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: #E4E2CF; color: #404A41; font-size: 11.5px; font-weight: 700; vertical-align: 1px }
.bubble.me .mtag { background: #F4E7C6; color: #583937 }

/* Footer under Log out (Joshi 26 Nov 13:22): the company line sits in the left menu on every portal */
.ptfoot, .ptfootline { display: none !important }
.railfoot2 { color: #AFC0C3; font-size: 11px; line-height: 1.45; margin-top: 6px; padding: 0 4px; font-weight: 400 } .railfoot2 a { color: #D9E2E4 }

/* Every box gets a teal top strip (Joshi 26 Nov 13:22): the booking steps */
body.pt .bj-step { background: #F7F4EF; padding: 0; overflow: hidden; border-color: #CFC3B2 }
body.pt .bj-step > .bj-h { background: linear-gradient(90deg, #29434F, #404A41); color: #F6F3EF; margin: 0; padding: 12px 18px }
body.pt .bj-step > .bj-h .lbl { color: #F6F3EF; font-weight: 700 }
body.pt .bj-step > .bj-h .num { background: #DCBC89; color: #1A1A1A }
body.pt .bj-step.on > :not(.bj-h) { margin-left: 18px; margin-right: 18px } body.pt .bj-step.on > :not(.bj-h):last-child { margin-bottom: 16px } body.pt .bj-step.on > .bj-h + * { margin-top: 14px }
body.pt .bj-step.later { background: linear-gradient(90deg, #8C9AA0, #979C93); color: #F6F3EF; padding: 11px 18px; display: flex; gap: 10px; align-items: center; border-color: transparent; opacity: 1 }
body.pt .bj-step.later .lbl { color: #F6F3EF; font-weight: 700 } body.pt .bj-step.later .num { background: rgb(246 243 239 / .85); color: #29434F }
body.pt .bj-step.done { background: #F7F4EF; padding: 11px 18px; display: flex; gap: 10px; align-items: center }
body.pt .bj-step.sentbox { padding: 14px 18px }
/* Bookings tabs (family): the open tab joins the first step's strip */
body.pt .bktabs + .bj-step, body.pt .head:has(.bktabs) + .bj-step { border-top-left-radius: 0; margin-top: 0 }
body.pt .head:has(.bktabs) { margin-bottom: 0 }

/* Child tabs (Joshi 26 Nov 13:32): parents switch children with folder tabs; the open one is teal and joins the box below */
body.pt .kids { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-end; margin: 14px 0 0 }
body.pt .kids > .muted { display: none }
body.pt .kids .kid { border-radius: 12px 12px 0 0 !important; border: 1px solid #CFC3B2; border-bottom: 0; background: #EAE1D3; color: #2E3340; padding: 9px 18px; font-size: 15px; font-weight: 700; margin: 0 }
body.pt .kids .kid[aria-pressed="true"] { background: #29434F; color: #F6F3EF; border-color: #29434F }
body.pt .kids .kid .dot { border-color: #EAE1D3 }
body.pt .kids .linkish { align-self: center; margin-left: 10px; font-size: 14px; text-decoration: none; border: 1px dashed #C89862; border-radius: 10px; padding: 6px 12px; color: #583937 }
body.pt .kids:not([hidden]):has(.kid) + .card, body.pt .kids:not([hidden]):has(.kid) + #payWarn:empty + .card { margin-top: 0; border-top-left-radius: 0 }
body.pt #vHome { display: flex; flex-direction: column } body.pt #vHome > #payWarn { order: 1 } body.pt #vHome > .dhead { order: 0 } body.pt #vHome > .kids { order: 2 } body.pt #vHome > #dashBookings { order: 3; margin-top: 0 }
body.pt #vHome > .kids:has(.kid) ~ #dashBookings { border-top-left-radius: 0 }
body.pt .kids:not([hidden]):has(.kid) + .hwlist > :first-child { border-top-left-radius: 0; margin-top: 0; border-top: 10px solid #29434F }

/* Receipts: child tabs over one panel (totals + list) */
body.pt .rcbar { align-items: flex-end; margin-bottom: 0 }
body.pt .rcfilter { gap: 4px } body.pt .rcfilter .chipbtn { border-radius: 12px 12px 0 0; border: 1px solid #CFC3B2; border-bottom: 0; background: #EAE1D3; color: #2E3340; padding: 9px 18px; font-weight: 700; font-size: 15px }
body.pt .rcfilter .chipbtn.on { background: #29434F; color: #F6F3EF; border-color: #29434F }
body.pt .rcstate { margin-bottom: 8px }
body.pt #vReceipts .rcsum { background: #F7F4EF; border: 1px solid #CFC3B2; border-top: 10px solid #29434F; border-bottom: 0; border-radius: 0 14px 0 0; padding: 16px 16px 4px; margin: 0 }
body.pt #vReceipts .rcbar:has(.rcfilter:empty) + .rcsum { border-top-left-radius: 14px; margin-top: 10px }
body.pt #vReceipts .rcsum + .card { border-top: 0; border-radius: 0 0 14px 14px; margin-top: 0 }

/* Messages as folder tabs (Joshi 26 Nov 13:28): conversations along the top, the open one teal and joined to the strip */
body.pt .convwrap { display: block }
body.pt #vMessages #convList { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-end; background: none; border: 0; padding: 0; margin: 0; box-shadow: none; max-height: none; overflow: visible }
body.pt #vMessages #convList > button { width: auto; display: grid; text-align: left; position: relative; border-radius: 12px 12px 0 0; border: 1px solid #CFC3B2; border-bottom: 0; background: #EAE1D3; color: #2E3340; padding: 8px 16px; margin: 0; box-shadow: none; font-weight: 700 }
body.pt #vMessages #convList > button small { color: #5B6668; font-weight: 500; font-size: 12px }
body.pt #vMessages #convList > button[aria-pressed="true"] { background: #29434F !important; color: #F6F3EF !important; border-color: #29434F !important; box-shadow: none !important }
body.pt #vMessages #convList > button[aria-pressed="true"] small { color: #C9D3D4 !important }
body.pt #vMessages #convList > button .cnt { position: absolute; top: -7px; right: -6px }
body.pt .convwrap > section.card { border-top: 0; border-radius: 0 16px 16px 16px; padding: 0; overflow: hidden; margin-top: 0 }
body.pt #vMessages .convwrap > section.card > #convTitle { display: none }
body.pt .convwrap > section.card > #msgLead, body.pt .convwrap > section.card > .convstrip { background: #29434F; color: #F6F3EF !important; padding: 13px 20px; margin: 0 !important; font-size: 14.5px }
body.pt .convwrap > section.card > .thread { margin: 16px 20px 0 } body.pt .convwrap > section.card > form { margin: 14px 20px 18px }

/* Search + tabs (teacher and admin Messages) */
body.pt .ctwrap { display: block; margin-top: 14px } body.pt .ctnav { position: relative }
body.pt .ctbar { display: flex; gap: 12px; align-items: center; margin-bottom: 12px }
body.pt .ctbar > .ctsearch { width: 360px !important; flex: none; max-width: 100%; background: #fff; border: 1.5px solid #CFC3B2; border-radius: 12px; padding: 9px 14px }
body.pt .ctsearch:focus { border-color: #C89862; box-shadow: 0 0 0 3px #F4E7C6; outline: 0 }
body.pt .cthint { color: #424D50; font-size: 13px }
body.pt .ctnav { display: block !important } body.pt .cttabs { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-end }
body.pt .cttabs > .cttab { position: relative; border: 1px solid #CFC3B2; border-radius: 12px; background: #EAE1D3; color: #2E3340; padding: 9px 16px; font: inherit; font-weight: 700; font-size: 14.5px; margin: 0 0 4px; cursor: pointer; min-height: 0 }
body.pt .cttabs > .cttab:hover { background: #E2D8C9 }
body.pt .cttabs > .cttab[aria-selected="true"] { background: #29434F; color: #F6F3EF; border-color: #29434F; border-bottom: 0; border-radius: 12px 12px 0 0; margin-bottom: 0; padding-bottom: 13px }
body.pt .cttab .cnt { position: absolute; top: -7px; right: -6px; background: #C2532C; color: #fff; border-radius: 99px; font-size: 11.5px; padding: 1px 7px }
body.pt .cttabs > .ctall { background: #F7F4EF; color: #583937; border-style: dashed; border-color: #C89862 }
body.pt .ctlist { position: absolute; right: 0; top: 100%; margin-top: 6px; width: min(560px, 100%); background: #fff; border: 1px solid #CFC3B2; border-radius: 14px; box-shadow: 0 14px 30px rgb(0 0 0 / .18); z-index: 20; overflow: hidden }
body.pt .ctlh { background: #29434F; color: #F6F3EF; font-weight: 700; padding: 10px 16px }
body.pt .ctlg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 10px; max-height: 50vh; overflow: auto }
body.pt .ctlg > button { text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 8px; font: inherit; font-size: 14px; color: #182528; cursor: pointer } body.pt .ctlg button:hover, body.pt .ctlg button.on { background: #F4E7C6 } body.pt .ctlg button.on { font-weight: 700 }
body.pt .ctpanel { border-top: 0; border-radius: 16px; padding: 0; overflow: hidden; margin-top: 0 }
body.pt .ctpanel > .convstrip { background: #29434F; color: #F6F3EF; padding: 13px 20px; margin: 0; font-size: 14.5px }
body.pt .ctpanel > .thread { margin: 16px 20px 0 } body.pt .ctpanel > form, body.pt .ctpanel > .steps { margin: 14px 20px 18px }
body.pt .ctnav:has(.cttabs > :first-child[aria-selected="true"]) + .ctpanel { border-top-left-radius: 0 } body.pt .ctnav:not(:has([aria-selected="true"])) + .ctpanel { border-radius: 16px; margin-top: 8px }

/* Admin boxes as tabs: the box under the open tab starts with the teal band, no repeated title */
body.pt .tabify > .ftabs { margin-top: 6px }
body.pt .tabify > [data-tab] { margin-top: 0; border-top: 10px solid #29434F; border-top-left-radius: 0 }
body.pt .tabify > [data-tab] > h2:first-child { display: none }
body.pt .tabify > [data-tab].rb { padding-top: 14px }

/* Homework pop-up: Self-marked copy · Original work · Mark scheme · Questions as small folder tabs */
body.pt.dash .seg2:has(+ .viewer) { gap: 4px; margin: 0 }
body.pt.dash .seg2:has(+ .viewer) button { border-radius: 10px 10px 0 0; border: 1px solid #CFC3B2; border-bottom: 0; background: #EAE1D3; color: #2E3340; padding: 7px 14px }
body.pt.dash .seg2:has(+ .viewer) button.on { background: #29434F; color: #F6F3EF; border-color: #29434F }
body.pt.dash .seg2 + .viewer { border-top: 8px solid #29434F; border-radius: 0 12px 12px 12px }

/* Family Messages (Joshi 26 Nov 15:59): "Joshi and Omar", the child's name coloured; + New message */
body.pt #vMessages #convList > button .who { color: #583937 }
body.pt #vMessages #convList > button[aria-pressed="true"] .who { color: #DCBC89 }
body.pt #vMessages #convList > button.newmsg { background: #F7F4EF !important; color: #583937 !important; border: 1px dashed #C89862 !important; border-radius: 12px !important; margin-bottom: 4px !important; align-self: flex-end }
dialog.nmdlg { width: min(620px, 94vw); padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: #F7F4EF }
dialog.nmdlg .nmh { background: #29434F; color: #F6F3EF; margin: 0; padding: 16px 22px; font: 600 21px Georgia, serif }
dialog.nmdlg .nmb { padding: 18px 22px; display: grid; gap: 14px } dialog.nmdlg .lab { display: block; font-weight: 700; font-size: 13.5px; color: #2E3340; margin-bottom: 6px }
dialog.nmdlg .opts { display: flex; flex-wrap: wrap; gap: 8px }
dialog.nmdlg .opts > button { display: grid; text-align: left; border: 1.5px solid #CFC3B2; border-radius: 10px; padding: 9px 14px; background: #fff; color: #182528; font: inherit; cursor: pointer }
dialog.nmdlg .opts > button small { font-size: 12px; opacity: .8 } dialog.nmdlg .opts > button.on { background: #29434F; border-color: #29434F; color: #F6F3EF }
dialog.nmdlg .nmnote { background: #F4E7C6; border-left: 4px solid #C89862; border-radius: 8px; padding: 9px 12px; font-size: 13.5px; margin: 0 }
dialog.nmdlg .nmf { padding: 14px 22px; border-top: 1px solid #EAE1D3; margin: 0 }
/* Teacher Students (Joshi 26 Nov 16:09) */
body.pt .ctpanel > .stubody { padding: 14px 20px 18px } body.pt .stubody dl.cinfo { margin-top: 0 }
body.pt .convstrip .calltag { display: inline-block; background: #DCBC89; color: #1A1A1A; border-radius: 99px; padding: 1px 10px; font-size: 12.5px; font-weight: 700; margin-right: 4px }
dialog.nmdlg .nmf button { border: 1px solid #B7A98F; border-radius: 10px; padding: 9px 18px; font: inherit; font-weight: 700; background: #F7F4EF; color: #182528; cursor: pointer }
dialog.nmdlg .nmf button.primary { background: #BE7F63; border-color: #BE7F63; color: #1A1A1A }
dialog.nmdlg textarea.in { width: 100%; background: #fff; border: 1px solid #CFC3B2; border-radius: 10px; padding: 10px 12px; font: inherit }
body.pt .cline .cl-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px }
body.pt .callinfo p { margin: 6px 0 0 }
body.pt .kindtag { display: inline-block; background: #E4E2CF; color: #404A41; border-radius: 99px; padding: 0 8px; font-size: 11.5px; font-weight: 700; margin-right: 6px }
/* Joshi 26 Nov (Stage 0): admin Families details box under the student tabs */
body.pt .ctpanel > #famTable { margin: 10px 20px 0; width: calc(100% - 40px) } body.pt #famTable th { width: 190px; text-align: left; font-weight: 600; background: transparent !important; color: #424D50 !important; font-size: 14px } body.pt #famTable tr, body.pt #famTable td { background: transparent !important } body.pt #famTable tr + tr > * { border-top: 1px solid #E4DBCF }
/* Joshi 26 Nov 18:51: task marking — Marked by, several files, feedback grade, % bands (70%+ teal · 50–69% amber · under 50% rust) */
body.pt .segpick { display: flex; gap: 6px; margin: 4px 0 4px } body.pt div.f > span:first-child { font-weight: 600 } body.pt .segpick button { flex: 1; padding: 9px 12px; border-radius: 10px; border: 1px solid #CFC3B2; background: #F2EDE6; font-weight: 600; color: #202226; cursor: pointer }
body.pt .segpick button[aria-checked="true"] { background: #29434F; color: #F6F3EF; border-color: #29434F }
body.pt .fpick { border: 1px dashed #C89862; border-radius: 10px; padding: 6px 12px; background: #FBF8F3; margin-top: 4px }
body.pt .fprow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid #EDE5DA; font-size: 14px; overflow-wrap: anywhere }
body.pt .fpx { border: 0; background: none; color: #5B6668; cursor: pointer; font-size: 14px; padding: 2px 6px } body.pt .fpx:hover { color: #963A27 }
body.pt .fpadd { color: #963A27 !important; padding: 8px 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; border-radius: 0 !important; color: #963A27; font-weight: 600; padding: 6px 0; cursor: pointer; font-size: 14px }
body.pt .gradepick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px } body.pt .gradepick button { padding: 7px 12px; border-radius: 999px; border: 1px solid #CFC3B2; background: #F2EDE6; font-weight: 600; font-size: 13px; cursor: pointer; color: #202226 }
body.pt .gradepick button[aria-checked="true"] { background: #DCBC89; border-color: #C89862 }
body.pt .gradechip { display: inline-block; background: #DCBC89; border-radius: 999px; padding: 3px 11px; font-weight: 600; font-size: 13px; color: #202226 }
body.pt .pctlive { font-size: 22px; font-weight: 700; margin-left: 8px } body.pt .scorebox .in.num { width: 90px }
body.pt .hi { color: #456E69 !important } body.pt .mid { color: #A87A1E !important } body.pt .lo { color: #963A27 !important }
body.pt label.tick { display: flex; align-items: center; gap: 8px; font-weight: 500 }
body.pt .hwres { display: grid; gap: 10px; margin-top: 8px } body.pt .hwres > div { background: #fff; border: 1px solid #E4DBCF; border-radius: 12px; padding: 10px 14px }
body.pt .hwres h4 { border: 0 !important; padding: 0 !important; margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #A26D58 } body.pt .hwres .big { font-size: 28px; font-weight: 700; margin-right: 12px }
/* Joshi 26 Nov 19:58–20:02: task pop-up (near full screen) — their work | split bar | question files; marking tools */
dialog.tview { width: calc(100vw - 48px); height: calc(100vh - 40px); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 18px; background: #F6F3EF; color: #182528; overflow: hidden; display: flex; flex-direction: column }
dialog.tview:not([open]) { display: none }
dialog.tview::backdrop { background: rgba(22, 48, 56, .55) }
.tvtop { background: #163038; color: #F6F3EF; padding: 12px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap }
.tvtop h2 { margin: 0; font-size: 18px; color: #F6F3EF } .tvmeta { color: #C9D3D4; font-size: 13.5px; flex: 1; min-width: 200px }
.tvacts { display: flex; gap: 8px; align-items: center } .tvacts .btn { margin: 0 } .tvacts .btn:not(.primary) { background: #F6F3EF; color: #182528 }
.tvresult { background: #DCBC89; color: #202226; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 14px }
.tvx { background: none; border: 0; color: #F6F3EF; font-size: 22px; cursor: pointer; padding: 0 4px; line-height: 1 }
.tvbody { --tvl: 60%; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, var(--tvl)) 14px minmax(0, 1fr); padding: 12px 16px 14px; gap: 0 }
.tvsplit { cursor: col-resize; display: flex; align-items: center; justify-content: center; touch-action: none; user-select: none }
.tvsplit::before { content: ''; position: absolute; width: 2px; height: 60%; background: #CFC3B2; border-radius: 2px } .tvsplit { position: relative }
.tvsplit span { position: relative; z-index: 1; background: #29434F; color: #F6F3EF; border-radius: 8px; padding: 10px 2px; font-weight: 700; font-size: 14px; line-height: 1 }
.tvsplit:hover span { background: #BE7F63 }
.tvpane { display: flex; flex-direction: column; min-height: 0; min-width: 0 }
.tvhead { display: flex; justify-content: space-between; align-items: end; gap: 8px; margin-bottom: 6px; min-height: 30px; flex-wrap: wrap }
.tvlab { font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: #A26D58 }
.tvsw { display: flex; gap: 6px; flex-wrap: wrap } .tvsw button { padding: 4px 11px; border-radius: 999px; border: 1px solid #CFC3B2; background: #fff; font-size: 13px; font-weight: 600; color: #202226; cursor: pointer }
.tvsw button.on { background: #DCBC89; border-color: #C89862 }
.tvtabs { display: flex; gap: 4px; flex-wrap: wrap } .tvtabs button { padding: 7px 16px; border-radius: 12px 12px 0 0; background: #EDE5DA; border: 1px solid #CFC3B2; border-bottom: 0; font-weight: 600; color: #202226; cursor: pointer; font-size: 14px }
.tvtabs button[aria-selected="true"] { background: #29434F; color: #F6F3EF; border-color: #29434F }
.tvview { flex: 1; min-height: 0; background: #29434F; border-radius: 0 14px 14px 14px; padding: 8px; display: flex; flex-direction: column; gap: 8px }
.tvpane.right .tvview { border-radius: 0 14px 14px 14px }
.tvtools { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; background: #1F3540; border-radius: 10px; padding: 5px 6px }
.tvtools[hidden] { display: none }
.tvtools button { min-width: 34px; height: 34px; border-radius: 8px; border: 0; background: none; color: #F6F3EF; font-weight: 700; font-size: 16px; cursor: pointer; padding: 0 8px }
.tvtools button.on { background: #DCBC89; color: #182528 } .tvtools button:hover:not(.on):not(:disabled) { background: #33505d }
.tvtools .dot { width: 16px; height: 16px; border-radius: 50%; display: inline-block; vertical-align: middle; border: 2px solid transparent } .tvtools .dotb.on { background: #F6F3EF } 
.tvtools .sep { width: 1px; height: 22px; background: #47606B; margin: 0 4px } .tvtools .grow { flex: 1 }
.tvtally { background: #F6F3EF; color: #182528; border-radius: 8px; padding: 6px 10px; font-size: 13.5px; font-weight: 700; white-space: nowrap }
.tvtools .tvsave { background: #456E69; color: #fff; font-size: 13.5px; padding: 0 12px } .tvtools .tvsave:disabled { background: #33505d; color: #C9D3D4; cursor: default }
.tvscroll { flex: 1; min-height: 0; overflow: auto; background: #E4DED6; border-radius: 6px; padding: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; overscroll-behavior: contain }
.tvpage { position: relative; flex: none; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); margin: 0 auto } .tvpage canvas { position: absolute; left: 0; top: 0; display: block }
.tvover { touch-action: none; cursor: crosshair }
.tvtext { position: absolute; z-index: 2; min-width: 180px; font: 600 15px "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; background: rgba(255, 255, 255, .92); border: 1px dashed #C89862; border-radius: 6px; padding: 4px 6px; resize: both }
.tvempty { color: #5B6668; margin: 20px auto; text-align: center; max-width: 420px }
.tvfoot { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center } .tvfoot .btn { margin: 0 } .tvzoom { display: flex; gap: 4px; margin-right: 6px }
@media (max-width: 820px) {
  dialog.tview { width: 100vw; height: 100vh; border-radius: 0 }
  .tvbody { display: block; overflow-y: auto; padding: 8px } .tvsplit { display: none } .tvpane { height: 78vh; margin-bottom: 14px } .tvtop { padding: 10px 12px }
}

/* the portal's general button look must not leak into the task pop-up */
dialog.tview .tvtabs button, dialog.tview .tvsw button, dialog.tview .tvtools button, dialog.tview .tvx { box-shadow: none !important; text-transform: none !important; letter-spacing: 0 !important; margin: 0 !important }
dialog.tview .tvtabs button { background: #EDE5DA !important; color: #202226 !important; border: 1px solid #CFC3B2 !important; border-bottom: 0 !important; border-radius: 12px 12px 0 0 !important }
dialog.tview .tvtabs button[aria-selected="true"] { background: #29434F !important; color: #F6F3EF !important; border-color: #29434F !important }
dialog.tview .tvsw button { background: #fff !important; color: #202226 !important; border: 1px solid #CFC3B2 !important; border-radius: 999px !important }
dialog.tview .tvsw button.on { background: #DCBC89 !important; border-color: #C89862 !important }
dialog.tview .tvtools button { background: transparent !important; color: #F6F3EF !important; border: 0 !important; border-radius: 8px !important }
dialog.tview .tvtools button.on { background: #DCBC89 !important; color: #182528 !important }
dialog.tview .tvtools button.dotb.on { background: #F6F3EF !important }
dialog.tview .tvtools button.tvsave { background: #456E69 !important; color: #fff !important } dialog.tview .tvtools button.tvsave:disabled { background: #33505d !important; color: #C9D3D4 !important }
dialog.tview .tvx { background: transparent !important; color: #F6F3EF !important; border: 0 !important; padding: 0 6px !important }
dialog.tview .tvtools .grow { flex: 1 1 0 }
body.pt .hwscore { display: flex; align-items: center }
/* Joshi 26 Nov 20:13: tasks as one line each, with tabs; a line opens a pop-up */
body.pt .tktabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 0 }
body.pt .tktabs button { padding: 9px 18px; border-radius: 12px 12px 0 0 !important; background: #EDE5DA !important; border: 1px solid #CFC3B2 !important; border-bottom: 0 !important; font-weight: 600; color: #202226 !important; cursor: pointer; box-shadow: none !important; margin: 0 !important }
body.pt .tktabs button[aria-selected="true"] { background: #29434F !important; color: #F6F3EF !important; border-color: #29434F !important }
body.pt .tktabs + .card, body.pt .hwlist .tklist { margin-top: 0 !important; border-top-left-radius: 0 !important }
body.pt .tklist { padding: 0 !important; overflow: hidden }
body.pt .tkrow { display: grid; grid-template-columns: minmax(180px, 2.2fr) 1.1fr 1fr 1fr minmax(200px, 1.8fr); gap: 12px; align-items: center; width: 100%; text-align: left; padding: 13px 20px; border: 0 !important; border-bottom: 1px solid #E4DBCF !important; background: transparent !important; border-radius: 0 !important; font: inherit; color: #182528 !important; cursor: pointer; box-shadow: none !important; margin: 0 !important }
body.pt button.tkrow:hover { background: #EFE8DE !important } body.pt .tkrow:last-child { border-bottom: 0 !important }
body.pt .tkrow.hot { box-shadow: inset 4px 0 #963A27 !important }
body.pt .tkhead { cursor: default; font-size: 13px; font-weight: 600; color: #5B6668 !important; border-bottom: 1px solid #D8CDBF !important }
body.pt .tkname { font-weight: 600 } body.pt .tkname .kindtag { margin-right: 8px }
body.pt .tkchip { display: inline-block; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600 }
body.pt .tkchip.need { background: #F6DDD5; color: #963A27 } body.pt .tkchip.wait { background: #F3E6C6; color: #7A5812 } body.pt .tkchip.done { background: #DCE9E4; color: #2E5C55 }
dialog.hwdlg { border: 0; padding: 0; border-radius: 18px; width: min(900px, 94vw); max-height: 90vh; overflow: auto; background: #F6F3EF }
dialog.hwdlg::backdrop { background: rgba(22, 48, 56, .55) } dialog.hwdlg > .card { margin: 0 !important; border: 0 !important; box-shadow: none !important }
dialog.hwdlg .hwtop { display: flex; align-items: center; gap: 12px } dialog.hwdlg .hwtop h2 { flex: 1 }
.hwx { border: 0 !important; background: none !important; font-size: 22px; cursor: pointer; color: #182528 !important; padding: 0 4px !important; box-shadow: none !important }
@media (max-width: 760px) { body.pt .tkrow { grid-template-columns: 1fr auto; } body.pt .tkrow > span:nth-child(2), body.pt .tkrow > span:nth-child(3), body.pt .tkrow > span:nth-child(4) { display: none } }
body.pt .hwlist:has(> .tktabs) { gap: 0 !important; display: block }
body.pt .tktabs + .card, body.pt .tktabs + section { margin-top: 0 !important; border-top-left-radius: 0 !important }
/* Joshi 26 Nov 21:17: Exam Lab room link state */
body.pt .xlcol { display: inline-flex; flex-direction: column; gap: 3px } body.pt .xlline { display: inline-flex; gap: 8px; align-items: center }
body.pt .xlstate { border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; white-space: nowrap }
body.pt .xlstate.ok { background: #DCE9E4; color: #2E5C55 } body.pt .xlstate.none { background: #F6DDD5; color: #963A27 } body.pt .xlstate.edit { background: #F3E6C6; color: #7A5812 }
body.pt .xlnote { font-size: 12.5px }
/* Joshi 26 Nov (Stage 1): course form, admin course pop-ups */
dialog.cfdlg, dialog.acdlg { border: 0; padding: 0; border-radius: 18px; width: min(980px, 96vw); max-height: 92vh; overflow: auto; background: #F6F3EF; color: #182528 }
dialog.cfdlg::backdrop, dialog.acdlg::backdrop { background: rgba(22, 48, 56, .55) }
.cftop, .actop { background: #163038; color: #F6F3EF; padding: 16px 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-direction: column }
.actop { flex-direction: row } .cftop h2, .actop h2 { margin: 0; color: #F6F3EF; font-size: 20px } .cftop p { color: #C9D3D4; font-size: 14px }
.actag { display: inline-block; background: #ABB7A7; color: #182528; border-radius: 999px; padding: 3px 11px; font-size: 13px; font-weight: 700; margin-bottom: 6px }
.actop .hwx { color: #F6F3EF !important }
.cfbody, .acbody { padding: 16px 22px } .cffoot, .acfoot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 22px 18px; border-top: 1px solid #E4DBCF; flex-wrap: wrap } .acfoot > .muted { margin-right: auto }
.cfgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px }
.cfh { margin: 10px 0 6px; font-size: 15px } .cfgen { display: grid; grid-template-columns: 1.3fr 1fr .8fr .8fr 1.1fr auto; gap: 0 10px; align-items: end } .cfgen > .btn { margin-bottom: 14px }
.cfsess { background: #fff; border: 1px solid #E4DBCF; border-radius: 12px; padding: 8px 12px; margin-bottom: 14px }
.cfrow { display: grid; grid-template-columns: 28px 1.4fr .9fr .8fr 2.4fr 30px; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid #EFE8DE } .cfrow:last-of-type { border-bottom: 0 }
.cfhead { font-size: 12.5px; font-weight: 600; color: #5B6668 } .cfn { font-weight: 700; color: #A26D58 } .cfdate { display: flex; flex-direction: column } .cfrow .in { margin: 0; padding: 7px 9px }
.cfx { border: 0 !important; background: none !important; color: #5B6668 !important; cursor: pointer; box-shadow: none !important } .cfx:hover { color: #963A27 !important }
.acstrip { background: #29434F; color: #F6F3EF; padding: 11px 22px; font-size: 14px }
.acdl { display: grid; grid-template-columns: 200px 1fr; gap: 8px 16px; margin: 0 } .acdl dt { font-weight: 600 } .acdl dd { margin: 0 }
body.pt .actbl td { vertical-align: middle } body.pt .steps.right { justify-content: flex-end; display: flex; gap: 6px; flex-wrap: wrap }
body.pt .crhead { display: flex; gap: 12px; align-items: center; flex-wrap: wrap } body.pt .crnote { background: #F3E6C6; border-radius: 10px; padding: 10px 14px; margin: 12px 0 0 }
@media (max-width: 760px) { .cfgen { grid-template-columns: 1fr 1fr } .cfrow { grid-template-columns: 22px 1fr 1fr; } .cfrow > :nth-child(5) { grid-column: 2 / 4 } .acdl { grid-template-columns: 1fr } }
/* Joshi 26 Nov 21:44: Exam Lab session boxes; a saved link is locked until "Edit link" */
body.pt .xlbox { background: #fff; border: 1px solid #E4DBCF !important; border-radius: 14px; padding: 14px 18px !important; margin-bottom: 12px }
body.pt .xl1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap } body.pt .xlwhen { min-width: 140px } body.pt .xlgrow { flex: 1 }
body.pt .xl2 { display: flex; gap: 8px; align-items: center; margin-top: 10px } body.pt .xl2 .xlin { flex: 1 1 auto; min-width: 0 } body.pt .xl2 .btn { margin: 0 }
body.pt .xlin.locked { background: #F7F4EF; color: #424D50; border-style: dashed } body.pt .xlnote { margin-top: 6px !important }
/* Joshi 26 Nov 21:40–21:44: course lines, counts, clickable names */
body.pt .crlist { max-height: 62vh; overflow: auto } body.pt .crrow { grid-template-columns: minmax(220px, 2.4fr) .8fr 1.4fr .7fr .8fr minmax(180px, 1.6fr) }
body.pt .tkrow.old, body.pt tr.old { opacity: .6 }
.accounts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 6px } .accounts > div { background: #fff; border: 1px solid #E4DBCF; border-radius: 12px; padding: 10px 12px; display: grid }
.accounts b { font-size: 22px; color: #29434F } .accounts span { font-size: 12.5px; color: #5B6668 }
.linkbtn { border: 0 !important; background: none !important; padding: 0 !important; font: inherit; font-weight: 700; color: #182528 !important; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; box-shadow: none !important; text-align: left }
.linkbtn:hover { color: #963A27 !important } .acsub { color: #C9D3D4; font-size: 13.5px; margin-top: 2px } .mt0 { margin-top: 0 !important }
body.pt tr.clickrow { cursor: pointer } body.pt tr.clickrow:hover td { background: #EFE8DE }
@media (max-width: 760px) { .accounts { grid-template-columns: repeat(2, 1fr) } body.pt .crrow { grid-template-columns: 1fr auto } body.pt .crrow > span:nth-child(n+2):nth-child(-n+5) { display: none } }
/* Joshi 26 Nov 22:14: one-line date box with the day ("Sun 17 Jan 2027") */
.cfdbox { position: relative; display: flex !important; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; white-space: nowrap; min-height: 40px; box-sizing: border-box }
.cfdpick { position: absolute; inset: 0; opacity: 0; pointer-events: none; width: 100%; height: 100%; border: 0; padding: 0 }
.cfdico { font-size: 14px; opacity: .7 } .cfrow .cfdbox { margin: 0 }
.cfrow { grid-template-columns: 28px 1.5fr .9fr .7fr 2.4fr 30px !important }
/* Joshi 26 Nov 22:14: course lines joined to the tabs (no gap), click a line to open */
body.pt .acrow { grid-template-columns: minmax(260px, 2.6fr) 1fr 1.3fr 1.3fr minmax(170px, 1.4fr) } body.pt .acrow .tkname small { font-weight: 400 }
body.pt .tktabs + .tklist { margin-top: 0 !important; border-top-left-radius: 0 !important; border-top: 3px solid #29434F !important }
body.pt .crok { background: #DCE9E4 !important }
@media (max-width: 760px) { body.pt .acrow { grid-template-columns: 1fr auto } body.pt .acrow > span:nth-child(n+2):nth-child(-n+4) { display: none } }
.cfdbox { background: #F2EDE6 !important; border: 1px solid #CFC3B2 !important; border-radius: 10px !important; padding: 8px 12px !important; font-size: 15px; color: #182528 }
.cfdbox:focus-visible { outline: 2px solid #BE7F63; outline-offset: 1px }
body.pt .tktabs + .card { border-top: 3px solid #29434F !important }
/* Joshi 26 Nov 22:22: simple course lines; delete confirmation */
body.pt .crrow { grid-template-columns: 1fr minmax(160px, auto) !important } body.pt .acrow { grid-template-columns: 1fr minmax(140px, 220px) !important }
dialog.cdlg { width: min(520px, 94vw) } .btn.danger { background: #963A27 !important; color: #fff !important; border-color: #963A27 !important }
/* Joshi 26 Nov 22:29: the list header strip under the tabs is teal with white text, joined to the open tab (no line, no gap) */
body.pt .tktabs + .card { border-top: 0 !important; border-top-left-radius: 0 !important }
body.pt .tklist > .tkhead, body.pt .tklist > .tkrow.tkhead { background: #29434F !important; color: #F6F3EF !important; border-bottom: 0 !important; padding-top: 12px; padding-bottom: 12px }
body.pt .tklist > .tkhead span { color: #F6F3EF !important }
body.pt .tktabs + .tklist { border-top: 0 !important }
/* Delete: red, on the far left of the pop-up's buttons */
.acfoot .leftbtn { order: -1; margin-right: auto !important } .acfoot .leftbtn ~ .leftbtn { margin-right: 0 !important }
/* teacher Tasks list: same teal strip under its tabs */
body.pt .tklist0 { padding: 0 !important; overflow: hidden } body.pt .tklist0 .list { margin: 0 !important }
body.pt .tklist0 .hwhead { background: #29434F !important; color: #F6F3EF !important; padding: 12px 20px !important; margin: 0 !important; border: 0 !important }
body.pt .tklist0 .hwhead span { color: #F6F3EF !important } body.pt .tklist0 .hwrow { padding-left: 20px !important; padding-right: 20px !important; margin: 0 !important; width: 100%; box-sizing: border-box }
.dlgerr { background: #F6DDD5; color: #963A27; border-radius: 10px; padding: 10px 14px; margin: 10px 0 0; font-weight: 600 }

/* Joshi 26 Nov 22:51 option A: every pop-up gets a terracotta border all round; the top strip stays dark teal */
dialog, body.pt dialog, dialog.nmdlg, dialog.acdlg, dialog.dlg { border: 3px solid #BE7F63 !important }

/* Exam Lab (Live) tab inside admin Courses */
body.pt .xlwrap { padding: 14px 16px 16px }
body.pt .xltabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px }
body.pt .xltabs button { padding: 6px 12px !important; border-radius: 999px !important; background: #fff !important; border: 1.5px solid #CFC3B2 !important; color: #202226 !important; font-weight: 600; font-size: 13.5px; margin: 0 !important; box-shadow: none !important; cursor: pointer }
body.pt .xltabs button.old { opacity: .6 }
body.pt .xltabs button[aria-selected="true"] { background: #BE7F63 !important; border-color: #BE7F63 !important; color: #fff !important; opacity: 1 }
body.pt .xlstrip { background: #163038; color: #F6F3EF; border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 14px }
body.pt .xlgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px } body.pt .xlgrid > div { display: grid; gap: 12px; align-content: start }
@media (max-width: 760px) { body.pt .xlgrid { grid-template-columns: 1fr } }
body.pt .xlb { background: #fff; border: 1px solid #E3D9CB; border-radius: 12px; padding: 12px 14px }
body.pt .xlb h4 { margin: 0 0 8px; font: 700 12px system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #BE7F63 }
body.pt .xlrowx { display: flex; gap: 8px; align-items: center; flex-wrap: wrap } body.pt .xlrowx b { flex: 1 1 auto } body.pt .xlrowx .in { flex: 1 1 220px; min-width: 0 } body.pt .xlrowx .btn { margin: 0 }
body.pt .xlplan { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px } body.pt .xlplan b { color: #29434F }
body.pt .xlbig { font: 700 28px Georgia, serif; color: #29434F }
body.pt .xldel { background: transparent; border: 0; padding: 0 }
body.pt .xl2 .xlin.locked { background: #F2EEE7; color: #4A5056 }
dialog.cfdlg [hidden] { display: none !important } dialog.cfdlg .cflen { margin: -4px 0 6px }
/* Exam Lab (Live) dates in Add a course (Joshi 26 Nov 23:06) */
dialog.cfdlg .cfltabs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 14px }
dialog.cfdlg .cfltabs button { padding: 8px 14px; border-radius: 12px 12px 0 0 !important; background: #EDE5DA !important; border: 1px solid #CFC3B2 !important; border-bottom: 0 !important; font-weight: 600; font-size: 14px; color: #202226 !important; cursor: pointer; margin: 0 !important; box-shadow: none !important }
dialog.cfdlg .cfltabs button[aria-selected="true"] { background: #29434F !important; color: #F6F3EF !important; border-color: #29434F !important }
dialog.cfdlg .cfltabs .cfladd { background: transparent !important; border: 1px dashed #BE7F63 !important; color: #BE7F63 !important }
dialog.cfdlg .cflstrip { border-radius: 0 10px 0 0; background: #29434F }
dialog.cfdlg .cflpanel { border: 1px solid #E3D9CB; border-radius: 0 0 12px 12px; background: #FBF9F6 }
dialog.cfdlg .cflpanel > .cflnone { padding: 12px 14px } dialog.cfdlg .cflgrid { margin: 0; padding: 12px }
dialog.cfdlg .xlb { background: #fff; border: 1px solid #E3D9CB; border-radius: 12px; padding: 12px 14px }
dialog.cfdlg .xlb h4 { margin: 0 0 8px; font: 700 12px system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #BE7F63 }
dialog.cfdlg .xlstrip { color: #F6F3EF; padding: 10px 14px; font-weight: 600; font-size: 14px }
dialog.cfdlg .xlgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px } dialog.cfdlg .xlgrid > div { display: grid; gap: 12px; align-content: start }
dialog.cfdlg .cfl2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px } dialog.cfdlg .cfl3 { display: grid; grid-template-columns: 1.6fr 1fr .8fr; gap: 8px; align-items: end }
dialog.cfdlg .cfl3 .f > span { font-size: 13px }
dialog.cfdlg .xl2 { display: flex; gap: 8px; align-items: center } dialog.cfdlg .xl2 .xlin { flex: 1 1 auto; min-width: 0 } dialog.cfdlg .xl2 .btn { margin: 0 }
dialog.cfdlg .xl2 .xlin.locked { background: #F2EEE7; color: #4A5056 }
dialog.cfdlg .xlstate { border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: #DCE9E4; color: #2E5C55 }
dialog.cfdlg .cflrm .btn.danger { background: #963A27 !important; border-color: #963A27 !important; color: #fff !important }
@media (max-width: 760px) { dialog.cfdlg .xlgrid, dialog.cfdlg .cfl3 { grid-template-columns: 1fr } }
/* Teacher's Exam Lab (Live) pop-up: one tab per date */
body.pt .xlformtabs { margin-top: 4px } body.pt .xlformpanel .xlstrip { border-radius: 0 10px 0 0; background: #29434F }
body.pt .xlformpanel { border: 1px solid #E3D9CB; border-radius: 0 0 12px 12px; background: #FBF9F6 } body.pt .xlformpanel .xlgrid { margin: 0; padding: 12px }
dialog.cfdlg .cflive .cfgen { grid-template-columns: 1.25fr 1fr .65fr .6fr 2fr auto !important }
@media (max-width: 760px) { dialog.cfdlg .cflive .cfgen { grid-template-columns: 1fr 1fr !important } }
/* Date tabs (Joshi 26 Nov 23:16, option B + scroll): small two-line tabs, one row, scrolls with ‹ › when needed */
.dtabs { display: flex; align-items: flex-end; gap: 4px; min-width: 0; position: relative }
.dtabs .dtrow { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; scroll-behavior: smooth }
.dtabs .dtrow::-webkit-scrollbar { display: none }
.dtabs .dtab { flex: 0 0 auto; display: grid; gap: 1px; text-align: left; padding: 7px 12px !important; border-radius: 12px 12px 0 0 !important; background: #EDE5DA !important; border: 1px solid #CFC3B2 !important; border-bottom: 0 !important; color: #202226 !important; cursor: pointer; margin: 0 !important; box-shadow: none !important; font: inherit; line-height: 1.2 }
.dtabs .dtab b { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; white-space: nowrap } .dtabs .dtab small { font-size: 12px; opacity: .8; white-space: nowrap }
.dtabs .dtab.old { opacity: .6 }
.dtabs .dtab[aria-selected="true"] { background: #29434F !important; color: #F6F3EF !important; border-color: #29434F !important; opacity: 1 }
.dtabs .dtx { font-size: 12px; opacity: .75; padding: 0 2px; border-radius: 4px; cursor: pointer } .dtabs .dtx:hover, .dtabs .dtx:focus { opacity: 1; background: #ffffff26; outline: none }
.dtabs .dtadd { background: transparent !important; border: 1px dashed #BE7F63 !important; color: #BE7F63 !important }
.dtabs .dtarr { flex: 0 0 auto; width: 30px; align-self: stretch; border: 1px solid #CFC3B2 !important; border-bottom: 0 !important; border-radius: 10px 10px 0 0 !important; background: #EDE5DA !important; color: #29434F !important; font-weight: 700; font-size: 18px; padding: 0 !important; margin: 0 !important; cursor: pointer; box-shadow: none !important }
.dtabs .dtarr:disabled { opacity: .35; cursor: default } .dtabs .dtarr[hidden] { display: none }
.dtabs + .xlstrip, .dtabs + * > .xlstrip:first-child { border-radius: 0 10px 0 0 }
body.pt .xlwrap .dtabs { margin-bottom: 0 } body.pt .xlwrap .dtabs + .xlstrip { border-radius: 0 10px 10px 10px }
body.pt .xlformpanel .xlstrip { border-radius: 0 10px 0 0 }

/* Courses (Joshi 27 Nov 09:22–09:27): two big tabs; Programmes has pill tabs and a list that scrolls under a fixed teal head */
body.pt #acTabs .acbadge { display: inline-block; margin-left: 8px; background: #BE7F63; color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 1px 8px; vertical-align: 1px }
body.pt .acprog { padding: 14px 16px 16px }
body.pt .acpills { display: flex; gap: 6px; flex-wrap: wrap }
body.pt .acpills button { padding: 6px 14px !important; border-radius: 999px !important; background: #fff !important; border: 1.5px solid #CFC3B2 !important; color: #202226 !important; font-weight: 600; font-size: 14px; margin: 0 !important; box-shadow: none !important; cursor: pointer }
body.pt .acpills button[aria-selected="true"] { background: #BE7F63 !important; border-color: #BE7F63 !important; color: #fff !important }
body.pt .acbox { margin-top: 12px; border: 1px solid #E3D9CB; border-radius: 12px; overflow: hidden; background: #fff }
body.pt .acbox > .tkhead { background: #29434F !important; color: #F6F3EF !important; border-bottom: 0 !important; padding-top: 12px; padding-bottom: 12px }
body.pt .acbox > .tkhead span { color: #F6F3EF !important }
body.pt .acrows { max-height: min(60vh, 560px); overflow-y: auto; overscroll-behavior: contain }
body.pt .acrows > .tkrow:last-child { border-bottom: 0 !important }
/* date tab status: Approved (green) · Waiting (dashed terracotta) · Past (faded) */
.dtabs .dtab.k-ok small { color: #2E5C55; opacity: 1; font-weight: 600 } .dtabs .dtab.k-ok[aria-selected="true"] small { color: #CFE3DC }
.dtabs .dtab.k-wait { background: #fff !important; border: 1.5px dashed #BE7F63 !important; border-bottom: 0 !important } .dtabs .dtab.k-wait small { color: #BE7F63; opacity: 1; font-weight: 700 }
.dtabs .dtab.k-wait[aria-selected="true"] { background: #BE7F63 !important; border-style: solid !important; color: #fff !important } .dtabs .dtab.k-wait[aria-selected="true"] small { color: #fff }
body.pt .xlstrip.xlwait { background: #BE7F63 }
body.pt .xlacts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px } body.pt .xlacts .btn { margin: 0 }
/* Add a course: two tabs in the teal strip (Joshi 27 Nov 10:08); programme row with + New / Edit; 5-column top row for Exam Lab (Live) */
dialog.cfdlg .cfktabs { display: flex; gap: 6px; margin: 14px 0 -18px }
dialog.cfdlg .cfktabs button { padding: 9px 20px !important; border-radius: 12px 12px 0 0 !important; background: #2E4A56 !important; color: #CFD9DC !important; border: 0 !important; font-weight: 600; font-size: 15px; margin: 0 !important; box-shadow: none !important; cursor: pointer }
dialog.cfdlg .cfktabs button[aria-selected="true"] { background: #F6F3EF !important; color: #163038 !important }
dialog.cfdlg .cfktabs button:disabled { opacity: .45; cursor: default }
dialog.cfdlg .cfprow { display: flex; gap: 6px; align-items: center } dialog.cfdlg .cfprow select { flex: 1 1 auto; min-width: 0 }
dialog.cfdlg .cfpbtns { display: flex; gap: 6px } dialog.cfdlg .cfpbtns .btn { margin: 0; white-space: nowrap }
dialog.cfdlg .cfnew { border: 1.5px dashed #BE7F63 !important; color: #BE7F63 !important; background: #fff !important }
dialog.cfdlg .cfgrid.cf5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important }
dialog.cfdlg .cfgrid.cf5:has(> :nth-child(6)) { grid-template-columns: repeat(6, minmax(0, 1fr)) !important }
@media (max-width: 760px) { dialog.cfdlg .cfgrid.cf5 { grid-template-columns: 1fr 1fr !important } }
dialog.cfpdlg { width: min(560px, 94vw) } dialog.cfpdlg .cf3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px }
/* ✕ on every pop-up (Joshi 27 Nov 10:18) */
dialog > .dlgx { position: absolute; top: 12px; right: 12px; z-index: 5; width: 34px; height: 34px; padding: 0 !important; margin: 0 !important; border-radius: 50% !important; border: 0 !important;
  background: rgba(22, 48, 56, .85) !important; color: #fff !important; font-size: 17px; font-weight: 700; line-height: 34px; text-align: center; cursor: pointer; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25) !important }
dialog > .dlgx:hover, dialog > .dlgx:focus-visible { background: #BE7F63 !important; outline: none }
/* Our small date picker (Joshi 27 Nov): about 244 px wide; closes on pick, outside click or Esc */
.dpwrap { display: block; min-width: 0 } .dpbox { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; user-select: none; white-space: nowrap }
.dpbox.dpempty .dpshow { color: #7A7F82 } .dpico { font-size: 14px; opacity: .8 } .dpbox:focus-visible { outline: 2px solid #BE7F63; outline-offset: 1px }
.dppop { position: fixed; z-index: 1000; width: 244px; box-sizing: border-box; padding: 10px; background: #fff; border: 1.5px solid #CFC3B2; border-radius: 14px; box-shadow: 0 10px 26px rgba(0, 0, 0, .2); font: 13.5px/1.2 system-ui, -apple-system, sans-serif; color: #202226 }
.dphead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px } .dphead b { font-size: 14px }
.dppop .dpnav { width: 28px; height: 28px; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 8px !important; background: #F2EEE7 !important; color: #29434F !important; font-size: 17px; font-weight: 700; cursor: pointer; box-shadow: none !important; min-height: 0 !important }
.dpgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center } .dpwd { font-size: 11px; color: #888; font-weight: 600; padding: 2px 0 4px }
.dppop .dpday { height: 30px; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; color: #202226 !important; font: inherit; cursor: pointer; box-shadow: none !important; min-height: 0 !important; width: auto !important }
.dppop .dpday:hover:not(:disabled), .dppop .dpday:focus-visible { background: #F2EEE7 !important; outline: none }
.dppop .dpday.out { color: #B9B9B9 !important } .dppop .dpday.today { box-shadow: inset 0 0 0 1.5px #BE7F63 !important }
.dppop .dpday.on { background: #29434F !important; color: #fff !important; font-weight: 700 } .dppop .dpday:disabled { color: #D3D3D3 !important; cursor: default; text-decoration: line-through }
dialog.cfdlg .cfgrid.cfpA { grid-template-columns: 1fr 2.5fr 1fr 1fr 1fr !important } dialog.cfdlg .cfgrid.cfpT { grid-template-columns: 1.9fr 1fr 1fr 1fr !important }
@media (max-width: 760px) { dialog.cfdlg .cfgrid.cfpA, dialog.cfdlg .cfgrid.cfpT { grid-template-columns: 1fr 1fr !important } }
.dpwrap .dpbox { width: 100% }
/* Joshi 27 Nov 13:06: every pop-up — title strip and buttons stay still, the middle scrolls */
dialog.framed[open] { display: flex !important; flex-direction: column; max-height: 92vh; overflow: hidden !important }
dialog.framed > * { flex: 0 0 auto } dialog.framed > .dlgx { position: absolute }
dialog.framed > .dlgmid { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain }
dialog.framed > .acfoot, dialog.framed > .cffoot { background: inherit }
/* changes pop-up and bar (Joshi 27 Nov 13:06) */
.acdiff td.new { font-weight: 600; color: #163038 } .acdiff td { vertical-align: top }
body.pt .xlchg { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid #BE7F63; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px } body.pt .xlchgt { flex: 1 } body.pt .xlchg .btn { margin: 0 }
body.pt .acchg { margin-left: 8px; font-size: 12px }

/* "✕ Close" pill (Joshi 27 Nov 15:06): light stone pill, readable on the teal strip and on light tops */
dialog .xpill.xpill { width: auto !important; height: auto !important; min-height: 0 !important; line-height: 1.2 !important; padding: 7px 14px !important; border-radius: 999px !important;
  background: #F6F3EF !important; color: #163038 !important; border: 1px solid rgba(22, 48, 56, .25) !important; font: 700 14px/1.2 system-ui, -apple-system, sans-serif !important; white-space: nowrap; box-shadow: none !important; cursor: pointer }
dialog .xpill.xpill:hover, dialog .xpill.xpill:focus-visible { background: #BE7F63 !important; color: #fff !important; border-color: #BE7F63 !important; outline: none }
dialog > .dlgx.xpill { position: absolute; top: 14px; right: 14px; z-index: 5 }
/* Joshi 27 Nov: "now" bar on the teacher's calendar (Daily, Weekly) and today outlined in Monthly */
.cv-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid #963A27; z-index: 4; pointer-events: none }
.cv-now::before { content: ''; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: #963A27 }
.cv-nowt { position: absolute; right: 2px; top: -9px; background: #963A27; color: #fff; font-size: 10px; font-weight: 600; line-height: 1; padding: 3px 5px; border-radius: 8px; font-variant-numeric: tabular-nums }
.cv-cell.today { outline: 2px solid #963A27; outline-offset: -2px; border-radius: 4px }
.cv-nowm { font-size: 10px; font-weight: 600; color: #963A27; font-variant-numeric: tabular-nums }
/* Joshi 27 Nov: footer under Log out centred in every portal (desktop rail) */
@media (min-width: 901px) { .rail .foot { justify-items: center } .rail .foot .railbtn { justify-self: center } .rail .foot .railfoot2 { text-align: center } }
/* Joshi 27 Nov 15:29: everything in the left rail centred: name and role, tab labels, Log out, footer */
@media (min-width: 901px) {
  .rail .me { justify-content: center }
  .rail nav a { justify-content: center; text-align: center; position: relative }
  .rail nav a .count { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); margin: 0 }
  .rail .sitelink { align-self: center; text-align: center }
}
/* Joshi 27 Nov 15:23: dashboard tabs (Needs you · Updates · Activities), every portal */
body.pt button.dbrow, button.dbrow { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto 18px; gap: 12px; align-items: center; width: 100%; text-align: left; background: #FBFAF7; border: 1px solid #E5DED4 !important; border-radius: 10px; padding: 10px 14px; margin: 0 0 6px; font: inherit; font-size: 14px; color: #182528; cursor: pointer }
body.pt button.dbrow:hover, button.dbrow:hover { border-color: #BE7F63 !important; background: #fff }
body.pt button.dbrow.upd, button.dbrow.upd { grid-template-columns: 10px minmax(0, 1fr) auto 18px }
.dbrow .dbdot { width: 8px; height: 8px; border-radius: 50% } .dbrow.fresh .dbdot { background: #963A27 } .dbrow.fresh .dbtext { font-weight: 600 }
.dbrow .dbwhen { color: #5E6A6C; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums } .dbrow .dbgo { color: #BE7F63; font-weight: 700; text-align: right }
.dbtype { justify-self: start; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; background: #F3DDD3; color: #963A27 }
.dbtopline { display: flex; justify-content: flex-end; margin: 0 0 8px }
.dbbody { padding: 18px 22px } .dbbody p { margin: 0 0 10px } .dbfoot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid #E5DED4 }
dialog.dbdlg { width: min(620px, 96vw) }
.dc .ar.click { cursor: pointer } .dc .ar.click:hover { background: #fff } .dc .ar.past { opacity: .55 } .dc.pastday .dh { opacity: .7 }
.ar .go { color: #BE7F63; font-weight: 700; text-align: right }
@media (max-width: 640px) { body.pt button.dbrow { grid-template-columns: 1fr 18px } .dbrow .dbtype, .dbrow .dbwhen { grid-column: 1 } button.dbrow.upd { grid-template-columns: 10px 1fr 18px } }
.dc .ar.click { grid-template-columns: 120px 130px minmax(0, 1fr) 80px 200px 14px }
@media (max-width: 1000px) { .dc .ar.click { grid-template-columns: 1fr 1fr } .dc .ar.click .go { display: none } }
/* Activities list outside the admin portal (teacher, parent, student) */
.dbcard { padding: 0 !important; overflow: hidden } .dbcard > .ftabs { margin: 0 } .dbcard .dblist, .dbcard .dbpager { padding: 14px 18px }
.dbcard .dblist { max-height: 62vh; overflow: auto } .dbcard .dblist[hidden], .dbcard .dbpager[hidden] { display: none }
.dbpager { display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding-bottom: 0 !important }
.dbday { border: 1px solid #E5DED4; border-radius: 12px; background: #F3EEE7; margin: 0 0 10px; overflow: hidden }
.dbdh { background: #29434F; color: #F6F3EF; padding: 7px 14px; font-weight: 700; font-size: 14px; display: flex; justify-content: space-between } .dbdh span { font-weight: 500; font-size: 13px; opacity: .85 }
body.pt button.dbact, button.dbact { display: grid; grid-template-columns: 120px 120px minmax(0, 1fr) 150px 14px; gap: 8px; align-items: center; width: 100%; text-align: left; background: #FBFAF7; border: 0 !important; border-top: 1px solid #E5DED4 !important; border-radius: 0; padding: 9px 14px; margin: 0; font: inherit; font-size: 14px; color: #182528; cursor: pointer }
body.pt button.dbact:hover { background: #fff } button.dbact.past { opacity: .55 } .dbday.pastday .dbdh { opacity: .75 }
.dbact .tm { font-variant-numeric: tabular-nums; white-space: nowrap } .dbact .dbst { color: #5E6A6C; font-size: 13px } .dbact .dbgo { color: #BE7F63; font-weight: 700 }
.dbtype.l { background: #DCE6E8; color: #29434F } .dbtype.f { background: #D8E8E4; color: #1F5A52 } .dbtype.b { background: #F1E1EA; color: #7A3C5E } .dbtype.t { background: #F4E7CF; color: #7A5418 } .dbtype.c { background: #E6E2D6; color: #4E4A3A }
@media (max-width: 760px) { body.pt button.dbact { grid-template-columns: 1fr 14px } body.pt button.dbact > :not(.dbgo) { grid-column: 1 } }
/* Joshi 27 Nov 15:49: the quote gets a slowly moving border in the SpaceTime colours, so people stop and read it */
@property --qa { syntax: '<angle>'; inherits: false; initial-value: 0deg }
body.pt .qotd.topq { border: 2px solid transparent; border-radius: 14px; padding: 12px 16px; background: linear-gradient(#F4EFE8, #F4EFE8) padding-box, conic-gradient(from var(--qa), #BE7F63, #E8A33D, #29434F, #ABB7A7, #BE7F63) border-box; animation: qspin 9s linear infinite; box-shadow: 0 6px 18px rgb(22 48 56 / .08) }
@keyframes qspin { to { --qa: 360deg } }
@media (prefers-reduced-motion: reduce) { body.pt .qotd.topq { animation: none } }
/* Joshi 27 Nov (Stage 2): confirmed-of-minimum bar in the admin course pop-up */
.cobar { height: 10px; border-radius: 99px; background: #E5DED4; overflow: hidden; margin: 6px 0 4px } .cobar i { display: block; height: 100%; background: #29434F }
/* Joshi 27 Nov 17:26: session files in the course pop-ups and on My courses */
.sfiles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center }
.sfchip { display: inline-flex; align-items: center; gap: 2px; background: #E8E1D8; border-radius: 99px; padding: 2px 4px 2px 10px }
body.pt button.sfile, button.sfile { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: #163038; text-decoration: underline; cursor: pointer; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
body.pt button.sfx, button.sfx { background: none; border: 0; padding: 0 6px; color: #963A27; font-weight: 700; cursor: pointer; min-height: 0 }

/* Joshi 27 Nov 18:10: the page title and the quote stay put; everything under them scrolls.
   Every page of every portal (admin, teacher, parent, student), screens 1100px and wider.
   The quote is wider and shorter. client.js watchQuote() keeps --qr/--qw (where the quote sits),
   --qh (its height) and --bandh (the pinned title band's height) up to date. ".pin.pin.pin" outranks the older quote rules. */
@media (min-width: 1100px) {
  body.pt { --qw: clamp(430px, calc(100vw - 250px - 72px - 480px), 860px); --qtop: 40px }
  body.pt .ptmain.pin.pin.pin { padding-top: 0 }
  body.pt .ptmain.pin.pin.pin > .qotd.topq { position: fixed; top: var(--qtop); right: var(--qr, 36px); width: var(--qw); max-width: var(--qw); box-sizing: border-box; z-index: 31; padding: 10px 18px; margin: 0 }
  body.pt .ptmain.pin.pin.pin > .qotd.topq blockquote { font-size: 15.5px; line-height: 1.32 }
  body.pt .ptmain.pin.pin.pin > :is(#err, #ok, #boot) { margin-top: 22px }
  body.pt .ptmain.pin.pin.pin > section > :is(.head, .dhead, .otop):first-child {
    position: sticky; top: 0; z-index: 30; background: var(--bg); margin-top: 0; padding-top: var(--qtop);
    padding-right: calc(var(--qw) + 40px); min-height: calc(var(--qtop) + var(--qh, 110px) + 14px); box-sizing: border-box; margin-bottom: 16px }
  body.pt .ptmain.pin.pin.pin > section > .head:has(.ftabs):first-child { margin-bottom: 0 }
  body.pt .ptmain.pin.pin.pin > section > .head:has(.ftabs):first-child > .ftabs { margin-top: auto }
  body.pt .ptmain.pin.pin.pin .ftabs.ftabs { max-width: 100% }
  /* the dashboards' tabs stay just under the band; only the list under them scrolls */
  body.pt .ptmain.pin.pin.pin :is(#actTabs, #tdTabs, #hdTabs) { position: sticky; top: var(--bandh, 150px); z-index: 29; background: var(--bg); box-shadow: 0 -16px 0 var(--bg) }
  body.pt .ptmain.pin.pin.pin .tabpanel { --tp-top: calc(var(--bandh, 150px) + 80px) }
}
/* Pop-ups: the dark title band (and its ×) stays at the top while the pop-up scrolls */
dialog .cftop, dialog .actop { position: sticky; top: 0; z-index: 6 }
/* Joshi 27 Nov 18:10: Teachers › Rate card and its Edit pop-up (two rates, live amounts) */
body.pt .ratecard h2, body.pt .ratecard > h2 { display: flex; justify-content: space-between; align-items: center }
.rtwo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px }
body.pt .ratecard .rtwo { grid-template-columns: 1fr } /* the card is a narrow column: one box above the other */
.rbox { border: 1px solid #CFC3B2; border-radius: 12px; padding: 10px 12px; background: #fff; display: grid; gap: 6px; align-content: start }
.rbig { margin: 0 } .rbig b { font-size: 22px }
.rtbl { width: 100%; border-collapse: collapse; font-size: 13.5px } .rtbl td, .rtbl th { padding: 4px 2px; border-bottom: 1px solid #EEE7DD; text-align: left } .rtbl th { font-size: 12px; color: #5E6A6C; font-weight: 600 } .rtbl .num { text-align: right; white-space: nowrap }
.rin { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; flex-wrap: wrap } .acdlg .rin input.rpct, .rin input.rpct { width: 96px; flex: none; font-size: 20px; font-weight: 700; border: 2px solid #963A27; background: #fff }
.rwas { color: #963A27; font-size: 12.5px; font-weight: 600 }
.rsplit { display: flex; height: 10px; border-radius: 99px; overflow: hidden } .rsplit i { background: #29434F } .rsplit u { background: #BE7F63 }
/* Joshi 27 Nov 18:10: Rates & earnings → Courses (typed %), course payments: Refund… and Send reminder */
.cmin { display: inline-flex; align-items: center; gap: 4px; font-weight: 600 } .cmin .cmpct { width: 74px; padding: 6px 8px }
#cmTable td { vertical-align: top } td.acts { white-space: nowrap } td.acts .btn + .btn { margin-left: 6px }
pre.mailprev { white-space: pre-wrap; font: 13.5px/1.5 "DM Sans", system-ui, sans-serif; background: #fff; border: 1px solid #CFC3B2; border-radius: 10px; padding: 12px 14px; margin: 10px 0 0; max-height: 46vh; overflow: auto }
.nmnote.alert { background: #F7E3DC; border-left-color: #A8432A }
body.pt .linkbtn.pname, .acdlg .linkbtn.pname { font-weight: 600 }
.acdlg .nmnote { background: #F4E7C6; border-left: 4px solid #C89862; border-radius: 8px; padding: 9px 12px; font-size: 13.5px; margin: 10px 0 0 } .acdlg .nmnote.alert { background: #F7E3DC; border-left-color: #A8432A }
.acdlg img.pphoto { width: 84px; height: 84px; border-radius: 50%; object-fit: cover }
/* Joshi 27 Nov 20:02: rail buttons a little shorter (every portal), so Reports fits */
@media (min-width: 901px) { body.pt .rail nav a { padding-top: 7px; padding-bottom: 7px } body.pt .rail nav { gap: 5px } }
/* Reports: builder, saved buttons, results (scroll inside; header row and first column stay) */
/* (old Reports layout rule removed) */
.rplbl { font-weight: 700; color: #963A27; letter-spacing: .08em; font-size: 11.5px; text-transform: uppercase; margin: 0 0 8px }
.rpsaved, .rpchips { display: flex; flex-wrap: wrap; gap: 6px }
body.pt .rphost button.chipbtn { border: 1px solid #B5A999; border-radius: 10px; background: #fff; box-shadow: none; font-weight: 500; padding: 6px 12px; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--ink, #182528) }
body.pt .rphost button.chipbtn.on { background: #163038; border-color: #163038; color: #fff; font-weight: 600 }
body.pt .rphost button.tickbtn { border: 1px solid #CFC3B2; border-radius: 99px; background: #fff; box-shadow: none; font-weight: 500; padding: 4px 11px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink, #182528) }
body.pt .rphost button.tickbtn.on { background: #DDE8E3; border-color: #8FB0A3; font-weight: 600 } body.pt .rphost .tickbtn.on::before { content: "✓ " }
.rpbuild { max-height: min(78vh, 900px); overflow: auto }
.rpstep { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid #E5DED4 } .rpstep:first-of-type { border-top: 0 }
.rpgrp + .rpgrp { margin-top: 8px } .rpgl { font-size: 11.5px; color: #5E6A6C; margin: 0 0 4px }
.rpmini { margin-top: 8px; font-size: 13px; color: #5E6A6C }
.rprow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center } .rpfilters { display: grid; gap: 8px }
.rpsel { width: auto; min-width: 150px; padding: 7px 10px } .rpval { width: 190px; padding: 7px 10px }
.rpx { border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: #963A27; padding: 0 6px }
.rpgo { display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid #E5DED4; position: sticky; bottom: -18px; background: #F4F0EA; padding-bottom: 20px; margin-bottom: -16px; z-index: 2 }
.rphead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px }
.rpscroll { max-height: min(72vh, 820px); overflow: auto; border-radius: 12px }
.rptbl { min-width: 100%; width: max-content; max-width: none } .rptbl td { max-width: 360px; white-space: normal; vertical-align: top }
.rptbl thead th { position: sticky; top: 0; z-index: 2 }
.rptbl tbody td { background: #F7F3ED } .rptbl tbody tr:nth-child(even) td { background: #ECE5DB }
.rptbl th:first-child, .rptbl td:first-child { position: sticky; left: 0; z-index: 1 } .rptbl td:first-child { box-shadow: 1px 0 0 #DCD3C9 } .rptbl thead th:first-child { z-index: 3; background: #1D2F37 }
.rptbl tr.tot td { font-weight: 700; border-top: 2px solid #163038; position: sticky; bottom: 0; background: #EFE8DE }
body.pt .rprow > select.rpsel, body.pt .rpstep select.rpsel { width: auto; flex: 0 0 auto; min-width: 150px; max-width: 100% } body.pt .rprow > input.rpval { width: 190px; flex: 0 0 auto }
body.pt button.rpx { border: 0; background: none; box-shadow: none; font-size: 22px; line-height: 1; padding: 0 6px; color: #963A27; min-height: 0 }
/* Joshi 27 Nov 20:59: Reports = two tabs (Create report · Saved reports). Steps scroll; the petrol strip stays at the bottom.
   "Create report" opens the report in a big pop-up (Save report · PDF · CSV). */
body.pt .tabpanel.rppanel { display: flex; flex-direction: column; height: calc(100vh - var(--tp-top, 230px) - 10px); min-height: 420px; max-height: none; overflow: hidden; padding: 0 }
.rpwrap { display: flex; flex-direction: column; flex: 1; min-height: 0 }
.rpscroll2 { flex: 1; min-height: 0; overflow: auto; padding: 14px 20px 10px }
.rpstrip { flex: none; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #29434F; padding: 12px 20px; border-radius: 0 0 14px 14px }
.rpnote { margin-left: auto; color: #C7D3D6; font-size: 12.5px }
body.pt .rpstrip button.rpgobtn, dialog .rpstrip button.rpgobtn { background: #D9BD8F; border-color: #D9BD8F; color: #182528; font-weight: 700 }
body.pt .rpstrip button.rpgobtn:disabled, dialog .rpstrip button.rpgobtn:disabled { opacity: .85 }
body.pt .rpstrip button.rpstripbtn, dialog .rpstrip button.rpstripbtn { background: transparent; border: 1px solid rgb(255 255 255 / .55); color: #fff }
.rpsavedlist { flex: 1; min-height: 0; overflow: auto; padding: 14px 20px; display: grid; gap: 8px; align-content: start }
.rpline { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: #fff; border: 1px solid #CFC3B2; border-radius: 12px; padding: 10px 14px; flex-wrap: wrap }
.rpname { display: grid; gap: 2px; min-width: 0 } .rpname b { font-size: 15px } .rpacts { display: flex; gap: 6px; flex-wrap: wrap }
dialog.rpdlg { width: 94vw; max-width: none; height: 92vh; max-height: 92vh; padding: 0 }
body dialog.acdlg.rpdlg[open] { display: flex; flex-direction: column; overflow: hidden }
dialog.rpdlg .actop { flex: none } dialog.rpdlg .rpsub { flex: none; background: #163038; color: #C7D3D6; font-size: 13px; padding: 2px 22px 12px; margin-top: 0 }
dialog.rpdlg .rpdlgbody { flex: 1; min-height: 0; overflow: auto; padding: 14px 22px }
dialog.rpdlg .rpstrip { border-radius: 0 }
dialog.rpdlg .rptbl thead th { position: sticky; top: -14px }
body dialog.acdlg.rpdlg > .dlgmid { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 0 }
/* Joshi 27 Nov 21:07: the company line sits on one line at the bottom of the page (all four portals), fixed on screens 901px and wider;
   on phones it closes the page. The rail keeps only the menu and Log out. */
body.pt .ptco { font-size: 12px; color: #4D585A; padding: 14px 4px 6px; line-height: 1.5 } body.pt .ptco a { color: #182528 }
@media (min-width: 901px) {
  body.pt .ptco { position: fixed; left: 250px; right: 0; bottom: 0; z-index: 32; background: var(--bg, #DCD3C9); border-top: 1px solid #C9BFB3; padding: 7px 36px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
  body.pt .ptmain { padding-bottom: 52px }
  body.pt .ptmain.pin.pin.pin .tabpanel { --tp-top: calc(var(--bandh, 150px) + 80px + 34px) }
}
/* Joshi 27 Nov 21:07: every rail button has an orange border (the quote's orange); the open page's button: sand + the same orange border */
html body.pt .rail nav a, html body.pt.dash .rail nav a { border: 1.5px solid #E8A33D }
html body.pt .rail nav a[aria-current="page"], html body.pt.dash .rail nav a[aria-current="page"] { border: 2px solid #E8A33D }
/* Joshi 28 Nov 11:05: My courses → Cancel enrolment (first 14 days) and its pop-up */
.mcfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px }
body.pt button.mccancel { background: #fff; border: 1.5px solid #A8432A; color: #A8432A; font-weight: 600; box-shadow: none }
.ccopts { display: grid; gap: 8px; margin-top: 8px }
body.pt button.ccopt, button.ccopt { display: grid; gap: 2px; text-align: left; background: #fff; border: 1px solid #CFC3B2; border-radius: 12px; padding: 10px 12px; color: #182528; box-shadow: none; font: inherit; cursor: pointer; width: 100% }
body.pt button.ccopt.on, button.ccopt.on { border: 2px solid #29434F; background: #F3F7F6 }
.ccreasons { display: flex; flex-wrap: wrap; gap: 6px }
body.pt button.ccchip, button.ccchip { background: #fff; border: 1px solid #CFC3B2; border-radius: 99px; padding: 4px 11px; font: inherit; font-size: 13px; color: #182528; box-shadow: none; cursor: pointer }
body.pt button.ccchip.on, button.ccchip.on { background: #DDE8E3; border-color: #8FB0A3; font-weight: 600 }

/* Joshi 28 Nov (Sections A + B): course tasks — marking window (third panel, First look), 🎤, Tasks, Tracker, Session resources */
.tvbody.withside { grid-template-columns: minmax(0, var(--tvl)) 14px minmax(0, 1fr) 14px minmax(280px, var(--tvs, 400px)) }
.tvbody:not(.withside) > .tvside, .tvbody:not(.withside) > .tvsplit2 { display: none }
.tvbody.withside > .tvside { animation: tvslide .28s ease-out }
@keyframes tvslide { from { opacity: 0; transform: translateX(40px) } to { opacity: 1; transform: none } }
.tvside { background: #FFF8EC; border-left: 3px solid #E8A33D; border-radius: 14px; padding: 14px; overflow-y: auto; min-height: 0; font-size: 14px }
.tvside h4 { margin: 12px 0 6px; font-size: 13px; color: #29434F; display: flex; justify-content: space-between; align-items: center; gap: 8px }
.tvside textarea, .tvside input.in { width: 100%; box-sizing: border-box }
.tvside .tmrow { display: grid; grid-template-columns: 1fr 58px 12px 58px; gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px solid #EADFC8 }
.tvside .tmrow input.in { width: 58px; padding: 6px 4px; text-align: center; min-height: 0 }
.tvside .tmtot { font-weight: 700; padding-top: 6px; display: flex; justify-content: space-between }
.tvside .aibox { background: #F1FAF4; border: 1px solid #1E7B4F; border-radius: 10px; padding: 8px 10px; margin-top: 8px; font-size: 13px }
.tvside .kchips { display: flex; flex-wrap: wrap; gap: 5px }
body.pt .tvside .kchips button, body.pt .ctchips button, .tvside .kchips button, .ctchips button { border: 1px solid #CBBBA4 !important; background: #fff !important; color: #1f2a2e !important; border-radius: 16px !important; padding: 5px 10px !important; font-size: 12.5px !important; font-weight: 600; min-height: 0 !important; box-shadow: none !important; cursor: pointer }
body.pt .tvside .kchips button.on, body.pt .ctchips button.on, .tvside .kchips button.on, .ctchips button.on { background: #29434F !important; color: #fff !important; border-color: #29434F !important }
.tvside .sidefoot { position: sticky; bottom: -14px; background: #FFF8EC; padding: 10px 0 0; margin-top: 12px; display: flex; justify-content: flex-end; gap: 8px }
.tvside .hidebtn { margin-left: auto }
dialog.tview .tvpane.right.extraon .tvview { background: #29434F }
.flook { background: #fff; border-radius: 8px; padding: 14px 16px; min-height: 100%; box-sizing: border-box; font-size: 13.5px; display: flex; flex-direction: column; gap: 8px; color: #182528 }
.flook .flh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap } .flook .flh b { font-size: 15px }
.flook table { width: 100%; border-collapse: collapse; font-size: 13px } .flook td, .flook th { padding: 6px 4px; border-bottom: 1px solid #E2D8C9; text-align: left; vertical-align: top }
.flook th { color: #29434F; font-size: 12px } .flook tr.flch td { background: #FCEBD0 } .flook td:nth-child(2) { white-space: nowrap }
.flook td input.in { width: 46px; padding: 4px; text-align: center; min-height: 0 } .flook td textarea.in { width: 100%; min-height: 0; padding: 4px 6px; font-size: 12.5px; resize: vertical }
.flook .fltot { font-weight: 700; padding: 4px } .flook .flwarn { background: #FCEBD0; border-radius: 8px; padding: 6px 10px; font-size: 12.5px }
.flook .flcm { border: 1px dashed #E8A33D; background: #FFF8EC; border-radius: 10px; padding: 8px 10px; display: flex; gap: 10px; align-items: flex-start }
.flook .flcm textarea { flex: 1; border: 0; background: transparent; font: inherit; font-size: 13.5px; resize: vertical; min-height: 60px; outline: none }
.flook .flfoot { margin-top: auto; display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px }
.flook .flwait { color: #6a6258; padding: 30px 0; text-align: center }
body.pt button.micbtn, button.micbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #29434F !important; background: #fff !important; color: #29434F !important; border-radius: 18px; padding: 4px 10px; font-size: 13px; font-weight: 700; cursor: pointer; min-height: 0 !important; box-shadow: none !important }
.micbtn .micdot { font-size: 14px }
body.pt button.micbtn.on, button.micbtn.on { background: #C0392B !important; border-color: #C0392B !important; color: #fff !important; animation: micpulse 1.2s infinite }
@keyframes micpulse { 50% { box-shadow: 0 0 0 6px rgba(192, 57, 43, .18) } }
.flcm button.micbtn { background: #E8A33D !important; border-color: #E8A33D !important; color: #1f2a2e !important; padding: 9px 11px; border-radius: 50% }
.boxlab { display: flex; justify-content: space-between; align-items: center; gap: 8px }
body.pt .cttasks .tkrow { grid-template-columns: minmax(180px, 2.2fr) .8fr 1fr 1.1fr 1.3fr }
body.pt .cttrk .tkrow { grid-template-columns: minmax(150px, 1.4fr) 1.6fr 1fr .6fr }
dialog.dbdlg.ctwide { width: min(1040px, 96vw) }
.ctchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 }
.cttopic { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #9DB4A3; background: #DDE6DF; border-radius: 14px; padding: 3px 4px 3px 10px; font-size: 13px; margin: 0 4px 4px 0 }
body.pt .cttopic button, .cttopic button { border: 0 !important; background: none !important; box-shadow: none !important; min-height: 0 !important; padding: 0 6px !important; cursor: pointer; font-size: 15px; color: #7a4a3a !important }
.ctsess { width: 100%; border-collapse: collapse } .ctsess td { padding: 8px 4px; border-bottom: 1px solid #E2D8C9; vertical-align: top }
.ctsessbox { background: #fff; border: 2px solid #1E7B4F; border-radius: 10px; padding: 8px 10px }
.ctres { width: 100%; border-collapse: collapse; margin: 6px 0 } .ctres td, .ctres th { padding: 6px 4px; border-bottom: 1px solid #E2D8C9; text-align: left; font-size: 14px }
.fbline { margin: 6px 0 } .fbline b { color: #29434F; margin-right: 6px }
/* B: Session resources — a folder tab per session */
.restabs { display: flex; gap: 4px; padding-left: 4px; margin-top: 12px; overflow-x: auto }
body.pt .restabs button, .restabs button { flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1.25; background: #E9E1D6 !important; color: #29434F !important; font-weight: 700; font-size: 13.5px; padding: 8px 14px !important; border-radius: 11px 11px 0 0 !important; border: 1px solid #CFC3B2 !important; border-bottom: 0 !important; box-shadow: none !important; min-height: 0 !important; cursor: pointer }
.restabs button small { font-weight: 400; font-size: 11px; opacity: .85 }
body.pt .restabs button.on, .restabs button.on { background: #29434F !important; color: #fff !important; border-color: #29434F !important }
body.pt .restabs button.nexts, .restabs button.nexts { border-top: 3px solid #E8A33D !important }
.respanel { border: 3px solid #29434F; border-radius: 0 14px 14px 14px; background: #fff; padding: 16px 18px; min-height: 300px }
.respanel h4 { margin: 16px 0 8px; font-size: 12.5px; color: #29434F; letter-spacing: .4px }
.resph { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap } .resph b { font-size: 16px }
.resline { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid #E2D8C9; border-radius: 10px; margin-bottom: 6px; background: #FBF9F5; text-align: left }
body.pt button.resline, button.resline { border: 1px solid #E2D8C9 !important; background: #FBF9F5 !important; color: #182528 !important; box-shadow: none !important; min-height: 0 !important; border-radius: 10px !important; padding: 9px 12px !important; cursor: pointer; font-weight: 400; text-transform: none !important }
button.resline:hover { border-color: #29434F !important }
.resic { width: 22px; text-align: center } .resname { flex: 1; min-width: 0 } .resname small { color: #6a6258 }
.respill { font-size: 12px; border-radius: 12px; padding: 3px 9px; background: #FCEBD0; color: #9a5a12; font-weight: 700; white-space: nowrap } .respill.all { background: #EAF3EC; color: #1E7B4F }
.reschev { font-size: 20px; color: #29434F }
.reslink { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-bottom: 6px }
@media (max-width: 900px) { .tvbody.withside { display: block } .tvside { margin: 0 0 14px } }
/* Joshi 28 Nov 21:38: the Feedback tab is locked until "Produce feedback" */
dialog.tview .tvtabs button.locked { background: #F2EEE7 !important; color: #8A8F93 !important; border-style: dashed !important; cursor: not-allowed }
dialog.tview .tvlockhint { align-self: center; margin-left: 8px; font-size: 13px; font-weight: 600; color: #8A4B12; background: #FBEFD9; border-radius: 8px; padding: 4px 10px }
dialog.tview .fbtab { display: flex; flex-direction: column; gap: 10px } dialog.tview .fbtab h4 { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px }
.fbtab h4 { font-size: 13px; color: #29434F } .fbtab textarea.in { width: 100%; box-sizing: border-box }
.fbtab .tmrow { display: grid; grid-template-columns: 1fr 58px 12px 58px; gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px solid #EADFC8 }
.fbtab .tmrow input.in { width: 58px; padding: 6px 4px; text-align: center; min-height: 0 }
.fbtab .tmtot { font-weight: 700; padding-top: 6px; display: flex; justify-content: space-between }
.fbtab .aibox { background: #F1FAF4; border: 1px solid #1E7B4F; border-radius: 10px; padding: 8px 10px; font-size: 13px }
.fbtab .kchips { display: flex; flex-wrap: wrap; gap: 5px }
body.pt .fbtab .kchips button, .fbtab .kchips button { border: 1px solid #CBBBA4 !important; background: #fff !important; color: #1f2a2e !important; border-radius: 16px !important; padding: 5px 10px !important; font-size: 12.5px !important; font-weight: 600; min-height: 0 !important; box-shadow: none !important; margin: 0 !important; cursor: pointer }
body.pt .fbtab .kchips button.on, .fbtab .kchips button.on { background: #29434F !important; color: #fff !important; border-color: #29434F !important }
dialog.tview .flook { flex-shrink: 0 }
/* Joshi 29 Nov: ✨ filled from the question paper (until you type in it) */
.in.aifilled { background: #FFF8E6 !important; box-shadow: inset 0 0 0 1.5px #E2C77A !important }
.pfstatus { font-size: 13px; margin: 6px 0 0; color: #5B6266; min-height: 0 } .pfstatus:empty { display: none }
.pfstatus.busy { color: #8A4B12 } .pfstatus.done { color: #1E5B3F; font-weight: 600 }
/* Joshi 29 Nov 17:28–17:36: Exam Lab (Live) list by teacher, filters, coloured date tabs */
.acfilters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px }
.acfilters .acpills { margin: 0 } .acsearch { display: flex; gap: 8px; flex-wrap: wrap } .acsearch .in { width: auto; min-width: 150px; padding: 7px 10px; min-height: 0 }
.tkrow.xlrow { grid-template-columns: 2.2fr 1.1fr 1.3fr .6fr 1.2fr 1fr }
.xldot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px }
.xldot.k-ok { background: #2F7A6F } .xldot.k-wait { background: #CF9E3E } .xldot.k-bad { background: #B5482E } .xldot.k-old { background: #A9A9A9 }
.xlkey { margin-top: 8px } .xlkey .xldot { margin-left: 4px }
.dtabs .dtab.k-ok { border-bottom: 4px solid #2F7A6F !important } .dtabs .dtab.k-ok small { color: #2E5C55 }
.dtabs .dtab.k-wait { border: 1px solid #CFC3B2 !important; border-bottom: 4px solid #CF9E3E !important; background: #FBF1DC !important } .dtabs .dtab.k-wait small { color: #8A5A10 }
.dtabs .dtab.k-bad { border-bottom: 4px solid #B5482E !important; background: #F8E3DC !important } .dtabs .dtab.k-bad small { color: #8E2F1B; opacity: 1; font-weight: 700 }
.dtabs .dtab.k-old { border-bottom: 4px solid #A9A9A9 !important }
.dtabs .dtab[aria-selected="true"].k-wait, .dtabs .dtab[aria-selected="true"].k-bad { background: #29434F !important; color: #F6F3EF !important } .dtabs .dtab[aria-selected="true"] small { color: #E7EEEC !important }
dialog.xlrun { width: min(1100px, 96vw) } .xlpop .xlwrap { margin: 0 }
.clashdlg .clashrow { background: #FBEFD9; border-radius: 8px; padding: 10px 12px; margin: 0 0 8px; color: #5a3a10; font-size: 14px }
body.pt .tkrow.acrow.xlrow { grid-template-columns: minmax(170px, 2.2fr) 1.1fr 1.3fr .6fr 1.2fr 1fr !important }
body.pt .acsearch .in { width: auto !important; min-width: 0; max-width: 220px; flex: 0 1 auto }
@media (max-width: 760px) { body.pt .tkrow.acrow.xlrow { grid-template-columns: 1fr auto !important } }
/* Joshi 30 Nov 16:46: the Courses card has a border all round in the same colour as the open tab (Exam Lab (Live) and Programmes, admin and teacher) */
body.pt #acTabs + #acList, body.pt #crTabs + #crsList { border: 3px solid #29434F !important; border-top-left-radius: 0 !important }
/* Joshi 30 Nov 16:47: "✕ Close" on every pop-up — it sat under the sticky title strip (z-index 6) in Add a course and others */
dialog > .dlgx, dialog > .dlgx.xpill { z-index: 20 !important }
/* Joshi 30 Nov: Add a course — wider, hints under the boxes, boxes and buttons lined up, both tabs the same height */
dialog.cfdlg { width: min(1080px, 96vw) }
dialog.cfdlg .cfgrid { align-items: start }
dialog.cfdlg .f > span:first-child { display: block; min-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
dialog.cfdlg .f .fhint { display: block; margin: 4px 0 0; font-size: 12.5px; font-weight: 400; color: #6B7378; white-space: normal }
dialog.cfdlg .f .in, dialog.cfdlg .f select, dialog.cfdlg .f .dpbox { height: 42px; box-sizing: border-box }
dialog.cfdlg .cfgen { align-items: start } dialog.cfdlg .cfgen > .btn { margin: 22px 0 0 !important; height: 42px; align-self: start }
dialog.cfdlg .cfktabs button { min-width: 170px; height: 42px; text-align: center }
dialog.cfdlg .cfprow .btn { height: 42px; margin: 0 !important }
/* Joshi 30 Nov 16:55: Add a course tabs end exactly on the form's edge (the closed tab stuck out below it) */
dialog.cfdlg .cfktabs { margin: 14px 0 -16px !important; align-items: flex-end }
/* Joshi 30 Nov 16:55: "✕ Close" looks the same everywhere — stone pill; keyboard focus shows a ring, not the orange fill */
dialog .xpill.xpill:focus-visible { background: #F6F3EF !important; color: #163038 !important; border-color: rgba(22, 48, 56, .25) !important; outline: 2px solid #BE7F63 !important; outline-offset: 2px }
dialog .xpill.xpill:focus:not(:focus-visible) { background: #F6F3EF !important; color: #163038 !important }
dialog:focus, dialog:focus-visible { outline: none }
body.pt .xlyear, dialog .xlyear { margin: 0 0 10px; font-size: 13.5px; color: #4B5B60 } dialog .xlyear b { color: #163038 }
/* Joshi 30 Nov 17:25: Academic year box in Add a course (one more column on both tabs) */
dialog.cfdlg .cfgrid.cf5:has(> :nth-child(7)) { grid-template-columns: repeat(7, minmax(0, 1fr)) !important }
dialog.cfdlg .cfgrid.cfpA { grid-template-columns: 1fr 2.2fr 1fr 1fr 1fr 1fr !important } dialog.cfdlg .cfgrid.cfpT { grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr !important }
@media (max-width: 760px) { dialog.cfdlg .cfgrid.cf5:has(> :nth-child(7)), dialog.cfdlg .cfgrid.cfpA, dialog.cfdlg .cfgrid.cfpT { grid-template-columns: 1fr 1fr !important } }
dialog.cfdlg .cflgrid textarea.in { height: auto; min-height: 74px; resize: vertical }
dialog.cfdlg .f textarea.in { height: auto !important; min-height: 64px }
/* Joshi 30 Nov 17:24–17:27: year group and academic year on every course row and pop-up header */
.ygb, .ayb { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; margin-left: 8px; vertical-align: 1px; white-space: nowrap }
.ygb.y12 { background: #E3ECF1; color: #29434F } .ygb.y13 { background: #F3E6C6; color: #7A5812 } .ayb { background: #EDE5DA; color: #3D3F42 }
.actop h2 .ygb, .actop h2 .ayb { font-size: 12.5px; vertical-align: 2px }
.xlcov { margin: 0 0 8px; padding-left: 18px } .xlcov li { margin: 2px 0 }
.dtrow .dtsep { align-self: flex-end; font-size: 11px; font-weight: 600; color: #583937; padding: 0 4px 9px; white-space: nowrap; letter-spacing: .02em }
.ygb.yx { background: #E7E3DE; color: #4B5B60 }
/* Joshi 30 Nov 18:05: room for "Summer 2028" in the Exam year box */
dialog.cfdlg .cfgrid.cf5:has(> :nth-child(7)) { grid-template-columns: 1fr .85fr 1fr .9fr .95fr 1.2fr .8fr !important }
dialog.cfdlg .cfgrid.cf5:not(:has(> :nth-child(7))) { grid-template-columns: .85fr 1fr .9fr .95fr 1.2fr .8fr !important }
@media (max-width: 760px) { dialog.cfdlg .cfgrid.cf5:has(> :nth-child(7)), dialog.cfdlg .cfgrid.cf5:not(:has(> :nth-child(7))) { grid-template-columns: 1fr 1fr !important } }
