/* Authenticated ProMed workspace. Public pages never receive this wrapper.
   Shared component rules load before the approved learner dashboard overrides. */
.pm-workspace {
  --brand-sky:#00a6fb; --brand-navy:#073b4c; --logo:#073b4c;
  --bg:#f6f6f6; --surface:#fff; --surface-2:#f5f9fc;
  --text:#073b4c; --muted:#526b78; --line:#d7e5ed;
  --accent:#0077b6; --accent-ink:#fff; --accent-soft:#e6f6ff;
  --ok:#157347; --ok-soft:#ddf5ea;
  --warn:#805313; --warn-soft:#fff1b8;
  --bad:#b42318; --bad-soft:#fdecec;
  --radius:20px; --shadow:0 5px 20px #073b4c03;
  color-scheme:light; color:var(--text);
  font:14px/1.6 Inter,Arial,sans-serif;
  min-height:100vh;
  background:#f6f6f6 url('../assets/promed-dashboard/background-diamonds.svg') center 72px / 264px 144px repeat fixed;
}
.pm-workspace .app { background:transparent; }
.pm-workspace h1 { font-size:36px; font-weight:800; line-height:1.25; letter-spacing:-1.4px; overflow-wrap:anywhere; }
.pm-workspace h2 { font-size:21px; font-weight:800; line-height:1.4; letter-spacing:-.6px; }
.pm-workspace h3 { font-size:18px; font-weight:750; line-height:1.5; letter-spacing:-.4px; }
.pm-workspace .page-h { margin-bottom:29px; gap:20px; align-items:center; }
.pm-workspace .page-h > div { min-width:0; }
.pm-workspace .page-h p { margin-top:9px; max-width:76ch; }
.pm-workspace .sec { margin:24px 0 12px; font-size:11px; font-weight:800; letter-spacing:1.4px; line-height:1.6; }
.pm-workspace .main { width:100%; max-width:1440px; padding:37px 32px 64px; }
/* Fixed top bar (approved ProMed design): logo, caption, package, notifications, profile.
   It spans the full width because the sidebar sits under it, so the inner row is not centred at 1180px. */
.pm-workspace { --pm-hdr:82px; }
.pm-workspace .app { padding-top:calc(var(--pm-hdr) + env(safe-area-inset-top)); }
.pm-workspace .top { position:fixed; top:0; left:0; right:0; z-index:20; display:block; height:calc(var(--pm-hdr) + env(safe-area-inset-top)); min-height:0; padding:env(safe-area-inset-top) 0 0; background:#ffffffee; -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); border:0; border-bottom:1px solid #e8eff3; }
.pm-workspace .header-inner { height:100%; padding:0 max(32px, env(safe-area-inset-right)) 0 max(32px, env(safe-area-inset-left)); display:flex; align-items:center; gap:22px; }
.pm-workspace .brand { display:flex; align-items:center; flex-shrink:0; line-height:1; }
.pm-workspace .brand-logo { display:block; width:150px; height:auto; object-fit:contain; }
.pm-workspace .header-divider { flex-shrink:0; width:1px; height:24px; margin-left:10px; background:var(--line); }
.pm-workspace .header-caption { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:12px; color:var(--muted); }
.pm-workspace .header-actions { display:flex; align-items:center; gap:20px; margin-left:auto; }
.pm-workspace .package { padding:3px 11px; border-radius:7px; background:#ffb86b; color:var(--text); font-size:11px; font-weight:800; letter-spacing:.5px; line-height:1.6; white-space:nowrap; }
.pm-workspace .icon-button { position:relative; display:grid; place-items:center; width:42px; height:42px; border-radius:50%; color:var(--text); }
.pm-workspace .icon-button:hover, .pm-workspace .icon-button.on { background:var(--accent-soft); text-decoration:none; }
.pm-workspace .icon-button svg { width:21px; height:21px; }
.pm-workspace .notification b { position:absolute; top:8px; right:8px; width:6px; height:6px; box-sizing:content-box; border:2px solid #fff; border-radius:50%; background:#ffb86b; }
/* Profile button: the user's name beside the avatar (name on the left of it on desktop) */
.pm-workspace .me-btn { display:flex; flex-direction:row-reverse; align-items:center; gap:10px; min-width:0; padding:0; border:0; border-radius:999px; background:none; color:var(--text); font:inherit; cursor:pointer; }
.pm-workspace .header-name { max-width:220px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:13px; font-weight:700; }
.pm-workspace .avatar { position:relative; flex-shrink:0; display:grid; place-items:center; width:39px; height:39px; border:3px solid #fff; border-radius:50%; box-shadow:0 0 0 1px var(--line); background:var(--accent-soft); font-weight:800; }
.pm-workspace .me-btn:hover .avatar, .pm-workspace .me-btn.on .avatar { box-shadow:0 0 0 2px var(--accent); }
.pm-workspace .avatar .ava-dot { right:-4px; bottom:-4px; }
/* The logo lives in the top bar; the sidebar sits under it */
.pm-workspace .side-logo { display:none; }
@media (min-width:901px) {
  .pm-workspace .side { top:calc(var(--pm-hdr) + 16px); height:calc(100vh - var(--pm-hdr) - 32px); }
}
.pm-workspace .side { border-color:#e5edf2; box-shadow:0 5px 20px #073b4c05; }
.pm-workspace .side-nav a { border-radius:11px; }
.pm-workspace .side-nav a.on { background:var(--accent-soft); }
.pm-workspace .side-nav a.on::before { display:none; }
.pm-workspace .side-toggle { background:var(--accent-soft); color:var(--accent); box-shadow:0 2px 8px #073b4c12; border:1px solid var(--line); }
.pm-workspace .side .navsec { font-size:10px; letter-spacing:1px; text-transform:uppercase; font-weight:800; }
.pm-workspace .round { width:42px; height:42px; border-color:#e5edf2; }
.pm-workspace .round.on { background:var(--accent-soft); color:var(--accent); }
.pm-workspace .round .count { background:#ffb86b; color:var(--text); border:2px solid white; line-height:14px; }
.pm-workspace .me-pop { border-radius:20px; padding:18px 14px 10px; box-shadow:0 12px 32px #073b4c14; max-width:calc(100vw - 32px); }
.pm-workspace .ava { font-weight:800; }
.pm-workspace .card { border:1px solid #e5edf2; border-radius:20px; padding:25px; margin-bottom:24px; box-shadow:var(--shadow); }
.pm-workspace .card-h { margin-bottom:18px; gap:12px; }
.pm-workspace .card-h > a { font-size:12px; font-weight:750; }
.pm-workspace .grid2 { gap:0 24px; }
.pm-workspace .stats { grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); gap:16px; margin-bottom:24px; }
.pm-workspace .stat { padding:21px; border:1px solid #e5edf2; border-radius:18px; }
.pm-workspace .stat-l { font-size:12px; line-height:1.5; font-weight:650; }
.pm-workspace .stat-v { font-size:28px; font-weight:800; letter-spacing:-.8px; line-height:1.35; margin-top:8px; overflow-wrap:anywhere; }
.pm-workspace .stat-s { font-size:12px; margin-top:8px; overflow-wrap:anywhere; }
.pm-workspace .stat.bad { border-color:#f3c9c5; }
.pm-workspace .stat.warn { background:var(--warn-soft); border-color:transparent; }
.pm-workspace .stat.ok { background:var(--ok-soft); border-color:transparent; }
.pm-workspace .card .stat { padding:16px; border-radius:14px; }
.pm-workspace .stats.tight { gap:12px; }
.pm-workspace .bar { height:5px; background:var(--accent-soft); margin-top:8px; }
.pm-workspace .bar i { background:var(--brand-sky); }
.pm-workspace .bar.ok i { background:var(--ok); }
.pm-workspace .bar.bad i { background:var(--bad); }
.pm-workspace .prow { padding:14px 0; border-color:#e8eff3; }
.pm-workspace .empty { padding:25px 18px; border-radius:14px; line-height:1.8; }
.pm-workspace .alert { padding:17px 20px; border-radius:16px; margin-bottom:20px; }
.pm-workspace .badge { border-radius:7px; padding:3px 8px; font-size:11px; line-height:1.5; font-weight:750; }
.pm-workspace .btn { padding:11px 17px; border-radius:11px; font-size:12px; font-weight:800; line-height:1.6; white-space:normal; text-align:center; transition:background .15s,transform .15s; }
.pm-workspace .btn:hover { filter:none; background:#00689f; transform:translateY(-1px); }
.pm-workspace .btn.ghost { background:white; border-color:var(--line); color:var(--accent); }
.pm-workspace .btn.ghost:hover { background:var(--accent-soft); }
.pm-workspace .btn.danger { color:var(--bad); background:var(--bad-soft); border-color:#f3c9c5; }
.pm-workspace .btn.danger:hover { background:#fbdedb; }
.pm-workspace .btn.sm { padding:7px 11px; font-size:11px; }
.pm-workspace .btn:disabled { opacity:.55; cursor:not-allowed; transform:none; }
.pm-workspace :is(input,select,textarea) { max-width:100%; padding:10px 12px; border-radius:11px; font:inherit; color:var(--text); }
.pm-workspace :is(input[type=checkbox],input[type=radio]) { accent-color:var(--accent); flex-shrink:0; width:17px; height:17px; }
.pm-workspace .field { gap:7px; margin-bottom:16px; min-width:min(160px,100%); }
.pm-workspace .field > span { font-size:12px; font-weight:750; }
.pm-workspace :is(a,button,input,select,textarea):focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
.pm-workspace .seg { border-radius:11px; }
.pm-workspace .seg button { padding:8px 12px; font-size:12px; font-weight:750; }
.pm-workspace .tabs { gap:7px; margin-bottom:24px; padding-bottom:7px; }
.pm-workspace .tabs a { border-radius:10px; padding:9px 14px; font-size:12px; border-bottom:0; }
.pm-workspace .tabs a.on { background:var(--accent-soft); }
.pm-workspace .tw { max-width:100%; border:1px solid #e8eff3; border-radius:13px; }
.pm-workspace table { font-size:13px; }
.pm-workspace th { padding:13px 14px; background:var(--surface-2); font-size:11px; font-weight:800; }
.pm-workspace td { padding:14px; border-color:#e8eff3; }
.pm-workspace tbody tr:hover { background:#f5f9fc99; }
.pm-workspace td :is(input,select) { max-width:240px; }
.pm-workspace .lesson,.pm-workspace .rec { padding:16px; border-radius:14px; gap:14px; margin-bottom:10px; }
.pm-workspace .lesson-b { overflow-wrap:anywhere; }
.pm-workspace .play { border-radius:11px; width:39px; height:39px; background:var(--accent-soft); color:var(--accent); }
.pm-workspace .datebox { border-radius:11px; padding:8px 0; }
.pm-workspace .feed li { padding:16px 0; border-color:#e8eff3; }
.pm-workspace .feed li > div { min-width:0; overflow-wrap:anywhere; }
.pm-workspace .weeknav { gap:12px; margin-bottom:20px; flex-wrap:wrap; }
.pm-workspace .weeknav b { font-size:13px; }
.pm-workspace .player { background:#073b4c; color:#e6f6ff; border-radius:16px; }
.pm-workspace .sgrid td { padding:8px; }
.pm-workspace .chip { padding:9px; border-radius:11px; gap:3px; }
.pm-workspace .sgrid th.today { background:var(--accent-soft); }
.pm-workspace .add { border-radius:9px; min-height:30px; }
.pm-workspace .kanban { gap:18px; grid-auto-columns:minmax(250px,1fr); }
.pm-workspace .kcol { padding:16px; background:#f5f9fce8; border-radius:18px; }
.pm-workspace .kcol-h { margin-bottom:16px; font-weight:800; }
.pm-workspace .lead { padding:16px; border-radius:14px; gap:7px; margin-bottom:12px; }
.pm-workspace .dl { grid-template-columns:minmax(100px,max-content) minmax(0,1fr); gap:12px 18px; }
.pm-workspace .dl dd { overflow-wrap:anywhere; }
.pm-workspace .chain { gap:18px; margin-bottom:24px; }
.pm-workspace .elcard { padding:23px; gap:16px; border-radius:20px; }
.pm-workspace .elcard > div { min-width:0; }
.pm-workspace .elcard.done { border-color:#b2dfcc; }
.pm-workspace .elcard.locked { opacity:1; background:var(--surface-2); color:var(--muted); }
.pm-workspace .elicon { width:39px; height:39px; border-radius:11px; }
.pm-workspace .qcard { padding:23px; border-radius:18px; }
.pm-workspace .qlist { gap:18px; }
.pm-workspace .qopt { margin-top:8px; padding:12px; border:1px solid var(--line); border-radius:11px; }
.pm-workspace .qopt:has(input:checked) { background:var(--accent-soft); border-color:var(--accent); }
.pm-workspace .reply { padding:14px 16px; border-radius:12px; }
.pm-workspace .thread { padding:16px 0; }
.pm-workspace .qpick { padding:12px; border-radius:12px; }
.pm-workspace .train-card { background:#f0e9ff; border-color:transparent; }
.pm-workspace .train-card button[data-act=oPractice]:not(.ghost) { background:#7c3aed; border-color:#7c3aed; color:white; }
.pm-workspace .train-card button[data-act=oPractice]:not(.ghost):hover { background:#6d28d9; }
/* Learner-dashboard colours on every screen: sky, violet, mint and apricot accents */
.pm-workspace { --c-sky:#00a6fb; --c-violet:#7c3aed; --c-mint:#2fb37a; --c-apricot:#ffb86b; }
/* Home heading (homeHead in src/core/ui.js) */
.pm-workspace .eyebrow { margin:0 0 8px; font-size:11px; font-weight:800; letter-spacing:1.4px; text-transform:uppercase; color:var(--muted); }
.pm-workspace .home-h { align-items:center; }
.pm-workspace .date-chip { display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:10px; background:#fff; border:1px solid #e7eef3; color:var(--muted); font-size:12px; white-space:nowrap; }
.pm-workspace .date-chip .ic { width:16px; height:16px; }
/* Next-step banner (heroCard / lessonHero) */
.pm-workspace .hero-card { position:relative; overflow:hidden; margin-bottom:24px; padding:26px 30px; border-radius:22px; background:var(--c-sky); color:var(--brand-navy); }
.pm-workspace .hero-card::after { content:'✦'; position:absolute; right:28px; top:14px; font-size:64px; line-height:1; color:#ffffff59; pointer-events:none; }
.pm-workspace .hero-l { display:block; margin-bottom:10px; font-size:11px; font-weight:800; letter-spacing:1.4px; text-transform:uppercase; }
.pm-workspace .hero-card h2 { margin:0 0 6px; font-size:28px; line-height:1.2; letter-spacing:-1px; }
.pm-workspace .hero-card h2 span { display:block; margin-top:4px; font-size:16px; font-weight:700; letter-spacing:0; }
.pm-workspace .hero-card p { margin:0 0 18px; max-width:60ch; font-size:13px; font-weight:600; }
.pm-workspace .btn.apricot { background:var(--c-apricot); border-color:var(--c-apricot); color:var(--brand-navy); }
.pm-workspace .btn.apricot:hover { background:#ffa94d; text-decoration:none; }
/* Stat cards get a coloured top stripe; the colour means a warning only on warn/bad */
.pm-workspace .stats > .stat { position:relative; overflow:hidden; }
.pm-workspace .stats > .stat::before { content:''; position:absolute; left:0; right:0; top:0; height:4px; background:var(--stat-c, var(--c-sky)); }
.pm-workspace .stats > .stat:nth-child(4n+2) { --stat-c:var(--c-violet); }
.pm-workspace .stats > .stat:nth-child(4n+3) { --stat-c:var(--c-mint); }
.pm-workspace .stats > .stat:nth-child(4n+4) { --stat-c:var(--c-apricot); }
.pm-workspace .stats > .stat.warn { --stat-c:#e8a33a; }
.pm-workspace .stats > .stat.bad { --stat-c:var(--bad); }
/* "See all" links in card headers read as links: blue, with an arrow */
.pm-workspace .card-h > a:not(.btn) { display:inline-flex; align-items:center; gap:4px; color:var(--accent); }
.pm-workspace .card-h > a:not(.btn)::after { content:'→'; }
.pm-workspace .overlay { background:#073b4c66; backdrop-filter:blur(4px); }
.pm-workspace .modal { border-radius:22px; box-shadow:0 20px 70px #073b4c33; }
.pm-workspace .modal header { padding:23px 25px 18px; align-items:flex-start; }
.pm-workspace .modal-b { padding:23px 25px 8px; }
.pm-workspace .modal footer { padding:18px 25px 23px; flex-wrap:wrap; }
.pm-workspace .modal h2 { font-size:25px; }
.pm-workspace .x { width:32px; height:32px; border-radius:50%; flex-shrink:0; }
.pm-workspace .x:hover { background:var(--accent-soft); }
.pm-workspace .toast { background:var(--text); color:white; border-radius:12px; font-size:13px; }
@media (max-width:1100px) {
  .pm-workspace .main { padding:37px 24px 24px; }
  .pm-workspace .grid2 { grid-template-columns:minmax(0,1fr); }
  .pm-workspace h1 { font-size:31px; }
}
@media (max-width:900px) {
  .pm-workspace .side { border-radius:0; top:calc(var(--pm-hdr) + env(safe-area-inset-top)); }
  .pm-workspace .main { padding:26px 18px 48px; }
}
@media (max-width:740px) {
  .pm-workspace { --pm-hdr:72px; }
  .pm-workspace .header-inner { padding:0 max(21px, env(safe-area-inset-right)) 0 max(21px, env(safe-area-inset-left)); }
  .pm-workspace .brand { display:none; }
  .pm-workspace :is(.header-caption,.header-divider) { display:none; }
  /* Phone: no logo; profile and package on the left, notifications on the right */
  .pm-workspace .header-actions { gap:9px; flex:1; margin-left:0; }
  .pm-workspace .header-actions .me-wrap { order:-2; min-width:0; }
  .pm-workspace .me-btn { flex-direction:row; gap:8px; }
  .pm-workspace .header-name { max-width:38vw; font-size:12px; }
  .pm-workspace .header-actions .package { order:-1; }
  .pm-workspace .header-actions .notification { margin-left:auto; }
  .pm-workspace .me-pop { left:0; right:auto; }
  .pm-workspace .package { font-size:10px; }
  .pm-workspace .avatar { width:35px; height:35px; }
  .pm-workspace h1 { font-size:29px; letter-spacing:-1px; }
  .pm-workspace h2 { font-size:19px; }
  .pm-workspace .page-h { gap:13px; margin-bottom:22px; align-items:flex-start; }
  .pm-workspace .page-h p { font-size:13px; }
  .pm-workspace .card { padding:21px; border-radius:18px; margin-bottom:18px; }
  .pm-workspace .stats { gap:11px; margin-bottom:18px; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .pm-workspace .stat { padding:16px; border-radius:16px; }
  .pm-workspace .stat-v { font-size:24px; }
  .pm-workspace .stat-l,.pm-workspace .stat-s { font-size:11px; }
  .pm-workspace .elcard,.pm-workspace .qcard { padding:18px; }
  .pm-workspace .elcard { gap:12px; }
  .pm-workspace .lesson,.pm-workspace .rec { padding:13px; gap:10px; flex-wrap:wrap; }
  .pm-workspace th,.pm-workspace td { padding:11px; }
  .pm-workspace .modal header { padding:21px 21px 16px; }
  .pm-workspace .modal-b { padding:18px 21px 6px; }
  .pm-workspace .modal footer { padding:16px 21px 21px; }
  .pm-workspace .modal h2 { font-size:21px; }
  .pm-workspace .home-h { flex-direction:column; align-items:flex-start; }
  .pm-workspace .home-h .date-chip { padding:0; border:0; background:none; }
  .pm-workspace .hero-card { padding:22px; border-radius:19px; margin-bottom:18px; }
  .pm-workspace .hero-card h2 { font-size:24px; }
  .pm-workspace .hero-card .btn { width:100%; }
}
/* List tools on staff tables (src/components/list-tools.js): count + Excel download, sortable headings, "Show all" */
.pm-workspace .list-tools { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.pm-workspace .list-tools .btn { display:inline-flex; align-items:center; gap:6px; }
.pm-workspace .list-tools .ic { width:16px; height:16px; }
.pm-workspace th.sortable { cursor:pointer; user-select:none; }
.pm-workspace th.sortable:hover { color:var(--accent); }
.pm-workspace th.sortable::after { content:'↕'; margin-left:4px; opacity:.35; }
.pm-workspace th[aria-sort=ascending]::after { content:'↑'; opacity:1; color:var(--accent); }
.pm-workspace th[aria-sort=descending]::after { content:'↓'; opacity:1; color:var(--accent); }
.pm-workspace .list-more { display:block; width:100%; margin-top:12px; }
.pm-workspace table.rows tr[hidden] { display:none; }
.pm-workspace .home-env { display:none; }
/* Phones and tablets: the tab bar floats over the bottom of the page; the offline/online switch sits on the home
   page (homeHead), because there is no side menu */
@media (max-width:900px) {
  .pm-workspace .main { padding-bottom:calc(110px + env(safe-area-inset-bottom)); }
  .pm-workspace .home-env { display:block; width:100%; max-width:420px; }
  .pm-workspace .home-env .env-sw { padding:4px; border-radius:14px; background:#fff; border-color:#e7eef3; }
  .pm-workspace .home-env .env-sw button { padding:10px; border-radius:11px; font-size:14px; }
  .pm-workspace .home-env .env-sw button.on { background:var(--accent-soft); color:var(--accent); box-shadow:none; }
}
@media (max-width:600px) {
  .pm-workspace .home-env { max-width:none; }
  /* Tables (table() in src/core/ui.js): each row is a card in the «Мои курсы» style — same white card, border and
     radius, with a slim coloured title band instead of the tall cover, and "label — value" lines below. */
  .pm-workspace .tw:has(> table.rows) { border:0; border-radius:0; overflow:visible; }
  .pm-workspace table.rows, .pm-workspace table.rows tbody, .pm-workspace table.rows tr, .pm-workspace table.rows td { display:block; width:auto; }
  .pm-workspace table.rows thead { display:none; }
  .pm-workspace table.rows tr { margin-bottom:12px; overflow:hidden; background:#fff; border:1px solid var(--line); border-radius:19px; box-shadow:0 4px 18px #073b4c08; }
  .pm-workspace table.rows tr:last-child { margin-bottom:0; }
  .pm-workspace table.rows td { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:9px 15px; border:0; border-top:1px solid #eef4f7; font-size:13px; text-align:right; overflow-wrap:anywhere; }
  .pm-workspace table.rows td::before { content:attr(data-l); flex-shrink:0; max-width:45%; color:var(--muted); font-size:11px; font-weight:600; text-align:left; }
  .pm-workspace table.rows td[data-l=""]::before { display:none; }
  .pm-workspace table.rows td[data-l=""] { justify-content:flex-start; text-align:left; }
  .pm-workspace table.rows td:empty { display:none; }
  .pm-workspace table.rows td > :is(.bar,.progress,.prog) { flex:1; max-width:55%; }
  .pm-workspace table.rows td:last-child { padding-bottom:13px; }
  .pm-workspace table.rows td:first-child { display:block; padding:13px 15px; border:0; background:#e6f6ff; font-size:15px; font-weight:800; line-height:1.3; text-align:left; }
  .pm-workspace table.rows td:first-child::before { display:block; max-width:none; margin-bottom:3px; font-size:10px; font-weight:800; letter-spacing:1px; text-transform:uppercase; }
  .pm-workspace table.rows tr:nth-child(4n+2) td:first-child { background:#ddf5ea; }
  .pm-workspace table.rows tr:nth-child(4n+3) td:first-child { background:#f0e9ff; }
  .pm-workspace table.rows tr:nth-child(4n) td:first-child { background:#fff1b8; }
  .pm-workspace table.rows td:first-child a { color:var(--text); }
  .pm-workspace .main > .row > :is(input,select) { flex:1 1 100%; width:100%; }
  .pm-workspace .ask input[name=text] { min-width:0; flex-basis:100%; }
  .pm-workspace .seg { max-width:100%; overflow-x:auto; }
  .pm-workspace .seg button { flex-shrink:0; }
  .pm-workspace .dl { grid-template-columns:minmax(0,1fr); gap:4px; }
  .pm-workspace .dl dd { margin-bottom:12px; }
}
@media (max-width:365px) {
  .pm-workspace .main { padding-left:14px; padding-right:14px; }
  .pm-workspace h1 { font-size:26px; }
  .pm-workspace .card { padding:17px; }
  .pm-workspace .stat { padding:13px; }
  .pm-workspace .stat-v { font-size:21px; }
  .pm-workspace .elcard { flex-wrap:wrap; }
  .pm-workspace .header-inner { padding-left:max(14px, env(safe-area-inset-left)); padding-right:max(14px, env(safe-area-inset-right)); gap:8px; }
  .pm-workspace .header-actions { gap:6px; }
}
@media (hover:none) { .pm-workspace .add { opacity:1; } }
@media (prefers-reduced-motion:reduce) {
  .pm-workspace *, .pm-workspace *::before, .pm-workspace *::after { transition:none!important; animation:none!important; scroll-behavior:auto!important; }
}

/* ---- Messages and announcements (src/components/messages.js) */
.pm-workspace .chat-link + .notification { margin-left:0; }
.pm-workspace .tabs .count { display:inline-grid; place-items:center; min-width:18px; height:18px; padding:0 5px; margin-left:4px; border-radius:9px; background:var(--accent); color:#fff; font-size:11px; }
.pm-workspace .chat { display:grid; grid-template-columns:minmax(260px, 340px) minmax(0, 1fr); gap:16px; height:calc(100vh - var(--pm-hdr) - 230px); min-height:420px; }
.pm-workspace .chat-threads { display:flex; flex-direction:column; gap:6px; overflow-y:auto; }
.pm-workspace .chat-th { display:flex; align-items:flex-start; gap:12px; padding:12px; border:1px solid var(--line); border-radius:16px; background:#fff; color:var(--text); }
.pm-workspace .chat-th:hover { border-color:var(--accent); text-decoration:none; }
.pm-workspace .chat-th.on { border-color:var(--accent); background:var(--accent-soft); }
.pm-workspace .chat-th-b { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1; }
.pm-workspace .chat-th-top { display:flex; justify-content:space-between; gap:8px; }
.pm-workspace .chat-snip { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:13px; color:var(--muted); }
.pm-workspace .chat-th.unread .chat-snip { color:var(--text); font-weight:700; }
.pm-workspace .chat-un { display:grid; place-items:center; min-width:20px; height:20px; padding:0 6px; border-radius:10px; background:var(--accent); color:#fff; font-size:11px; font-weight:800; }
.pm-workspace .chat-ava { display:grid; place-items:center; flex-shrink:0; width:38px; height:38px; border-radius:50%; background:var(--accent-soft); color:var(--accent); font-weight:800; }
.pm-workspace .chat-pane { display:flex; flex-direction:column; min-height:0; background:#fff; border:1px solid var(--line); border-radius:19px; overflow:hidden; }
.pm-workspace .chat-empty { align-items:center; justify-content:center; }
.pm-workspace .chat-head { display:flex; align-items:center; gap:12px; padding:14px 18px; border-bottom:1px solid #eef4f7; }
.pm-workspace .chat-back { display:none; font-size:20px; color:var(--text); }
.pm-workspace .chat-msgs { flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:8px; padding:18px; background:var(--surface-2); }
.pm-workspace .chat-day { align-self:center; margin:6px 0; padding:3px 10px; border-radius:10px; background:#fff; color:var(--muted); font-size:11px; }
.pm-workspace .msg { align-self:flex-start; max-width:78%; padding:9px 13px 6px; border-radius:16px 16px 16px 4px; background:#fff; border:1px solid #e5edf2; }
.pm-workspace .msg.mine { align-self:flex-end; border-radius:16px 16px 4px 16px; background:var(--accent); border-color:var(--accent); color:#fff; }
.pm-workspace .msg p { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }
.pm-workspace .msg span { display:block; margin-top:2px; font-size:10px; text-align:right; opacity:.7; }
.pm-workspace .chat-send { display:flex; gap:8px; padding:12px; border-top:1px solid #eef4f7; }
.pm-workspace .chat-send input[name=text] { flex:1; min-width:0; }
.pm-workspace .chat-send .btn { display:grid; place-items:center; padding:0 14px; }
.pm-workspace .chat-send .ic { width:18px; height:18px; }
.pm-workspace .ann-list { display:grid; gap:14px; max-width:760px; }
.pm-workspace .ann { padding:18px 20px; background:#fff; border:1px solid var(--line); border-radius:19px; box-shadow:0 4px 18px #073b4c08; }
.pm-workspace .ann-top { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:8px; }
.pm-workspace .ann h2 { margin:0 0 6px; font-size:18px; }
.pm-workspace .ann p { margin:0 0 10px; white-space:pre-wrap; }
/* Settings: subject colour */
.pm-workspace .swatch { display:inline-block; width:12px; height:12px; margin-right:8px; border-radius:4px; background:var(--c); vertical-align:-1px; }
/* Phones and tablets: the thread list, or one open conversation filling the screen */
@media (max-width:900px) {
  .pm-workspace .chat { grid-template-columns:minmax(0, 1fr); height:auto; min-height:0; }
  .pm-workspace .chat:not(.has-open) .chat-pane, .pm-workspace .chat.has-open .chat-threads { display:none; }
  .pm-workspace .chat.has-open .chat-pane { height:calc(100vh - var(--pm-hdr) - 250px - env(safe-area-inset-bottom)); min-height:360px; }
  .pm-workspace .chat-back { display:block; }
}
.pm-workspace .module-exam { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-top:12px; padding:12px 14px; border-radius:12px; background:var(--accent-soft); font-size:13px; }

/* ---- Online course page (coursePage in src/pages/online/learner/course.js) */
.pm-workspace .course-hero { display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; margin-bottom:22px; padding:20px 24px; border-radius:20px; background:#e6f6ff; }
.pm-workspace .course-hero.bio { background:#ddf5ea; } .pm-workspace .course-hero.kyrgyz { background:#f0e9ff; } .pm-workspace .course-hero.math { background:#fff1b8; }
.pm-workspace .ch-main { display:flex; flex-direction:column; gap:6px; flex:1; min-width:220px; }
.pm-workspace .ch-label { font-size:11px; font-weight:800; letter-spacing:1.2px; text-transform:uppercase; color:var(--muted); }
.pm-workspace .ch-next { font-size:19px; line-height:1.3; }
.pm-workspace .ch-bar { display:block; height:7px; max-width:420px; margin-top:6px; border-radius:5px; background:#ffffffb3; overflow:hidden; }
.pm-workspace .ch-bar i { display:block; height:100%; border-radius:5px; background:var(--accent); }
.pm-workspace .ch-meta { font-size:12px; color:var(--muted); }
.pm-workspace .mods { display:flex; flex-direction:column; gap:14px; max-width:880px; }
.pm-workspace .mod { background:#fff; border:1px solid var(--line); border-radius:19px; overflow:hidden; }
.pm-workspace .mod summary { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px 14px; padding:16px 20px; cursor:pointer; list-style:none; }
.pm-workspace .mod summary::-webkit-details-marker { display:none; }
.pm-workspace .mod-t { display:flex; flex-direction:column; gap:2px; min-width:0; }
.pm-workspace .mod-n { font-size:11px; font-weight:800; letter-spacing:1px; text-transform:uppercase; color:var(--muted); }
.pm-workspace .mod-t b { font-size:16px; }
.pm-workspace .mod-p { display:flex; align-items:center; gap:6px; font-size:13px; font-weight:800; color:var(--muted); }
.pm-workspace .mod-p svg { width:16px; height:16px; color:var(--ok); }
.pm-workspace .mod-bar { grid-column:1 / -1; display:block; height:4px; border-radius:3px; background:#eef4f7; overflow:hidden; }
.pm-workspace .mod-bar i { display:block; height:100%; background:var(--accent); }
.pm-workspace .mod.done .mod-bar i { background:var(--ok); }
.pm-workspace .mod[open] summary { border-bottom:1px solid #eef4f7; }
.pm-workspace .les-list { display:flex; flex-direction:column; padding:6px 10px 10px; }
.pm-workspace .les { display:flex; align-items:center; gap:14px; padding:11px 10px; border-radius:14px; color:var(--text); }
.pm-workspace a.les:hover { background:var(--surface-2); text-decoration:none; }
.pm-workspace .les-n { display:grid; place-items:center; flex-shrink:0; width:32px; height:32px; border-radius:50%; border:1.5px solid var(--line); font-size:13px; font-weight:800; color:var(--muted); }
.pm-workspace .les-n svg { width:16px; height:16px; }
.pm-workspace .les.done .les-n { border-color:transparent; background:var(--ok-soft); color:var(--ok); }
.pm-workspace .les.current { background:var(--accent-soft); }
.pm-workspace .les.current .les-n { border-color:var(--accent); background:var(--accent); color:#fff; }
.pm-workspace .les.progress .les-n { border-color:var(--accent); color:var(--accent); }
.pm-workspace .les.locked { opacity:.6; }
.pm-workspace .les.locked .les-n { border-style:dashed; }
.pm-workspace .les.exam .les-n { border-radius:10px; }
.pm-workspace .les.exam.failed .les-n { border-color:transparent; background:#ffe9e2; color:#b4441d; }
.pm-workspace .les-b { display:flex; flex-direction:column; gap:1px; flex:1; min-width:0; }
.pm-workspace .les-b b { font-size:14px; font-weight:700; overflow-wrap:anywhere; }
.pm-workspace .les-meta { font-size:12px; color:var(--muted); }
.pm-workspace .les-r { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.pm-workspace .les-r svg { width:18px; height:18px; color:var(--muted); }
.pm-workspace .les-go { padding:6px 12px; border-radius:10px; background:var(--accent); color:#fff; font-size:12px; font-weight:800; }
@media (max-width:600px) {
  .pm-workspace .course-hero { padding:18px; }
  .pm-workspace .course-hero .btn { width:100%; }
  .pm-workspace .mod summary { padding:14px 16px; }
  .pm-workspace .les-list { padding:4px 6px 8px; }
  .pm-workspace .les { gap:11px; padding:10px 8px; }
  .pm-workspace .les-r .badge { display:none; }
}

/* ---- Tests page (src/pages/online/learner/practice.js): exam rows */
.pm-workspace .exam-list { display:flex; flex-direction:column; gap:6px; }
.pm-workspace .exam-row { display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid #eef4f7; border-radius:14px; color:var(--text); }
.pm-workspace .exam-row:hover { border-color:var(--accent); text-decoration:none; }
.pm-workspace .exam-ic { display:grid; place-items:center; flex-shrink:0; width:34px; height:34px; border-radius:10px; background:var(--accent-soft); color:var(--accent); }
.pm-workspace .exam-ic svg { width:18px; height:18px; }
.pm-workspace .exam-ic.done { background:var(--ok-soft); color:var(--ok); }
.pm-workspace .exam-ic.missed, .pm-workspace .exam-ic.notyet, .pm-workspace .exam-ic.pending { background:#f2f6f8; color:var(--muted); }
.pm-workspace .exam-b { display:flex; flex-direction:column; flex:1; min-width:0; }
.pm-workspace .exam-b b { font-size:14px; overflow-wrap:anywhere; }
.pm-workspace .exam-st { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.pm-workspace .pm-embed { background:none; margin-bottom:8px; }

/* T-11: readable home introduction and shared navigation labels. */
.pm-workspace .home-h { flex-wrap:wrap; }
.pm-workspace .home-intro { flex:1 1 280px; }
.pm-workspace .home-intro h1 { margin:0; }
.pm-workspace .home-meta { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.pm-workspace .home-intro p { margin:8px 0 0; }
.pm-workspace .side-me-t > .small { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
.pm-workspace .tabbar a { min-width:0; }
.pm-workspace .tabbar a span { white-space:normal; overflow-wrap:normal; line-height:1.15; text-align:center; }
.pm-workspace .side-nav .navsec { line-height:1.4; }
@media(max-width:900px) {
  .pm-workspace .home-h { align-items:flex-start; flex-direction:column; gap:14px; }
  .pm-workspace .home-intro { flex:0 1 auto; width:100%; }
  .pm-workspace .home-intro h1 { font-size:29px; line-height:1.25; }
  .pm-workspace .home-meta { width:100%; }
  .pm-workspace .tabbar a { padding-left:4px; padding-right:4px; }
  .pm-workspace .tabbar a span { font-size:10px; }
}

/* T-12: role homes reuse learner cards; accents convey actions and warnings. */
.pm-workspace .role-dashboard .role-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); grid-auto-flow:row; grid-auto-columns:auto; overflow:visible; margin:0; padding:0; }
.pm-workspace .role-dashboard .home-value { display:block; margin:2px 0 6px; font-size:25px; font-weight:800; line-height:1.25; overflow-wrap:anywhere; }
.pm-workspace .role-dashboard .home-tile { text-decoration:none; }
.pm-workspace .role-dashboard .home-tile .cont-next { min-height:0; font-weight:500; font-size:13px; }
.pm-workspace .role-dashboard .home-tile .cont-btn { background:#0077b6; }
.pm-workspace .role-dashboard .tone-danger .cont-top { background:#fdecec; }
.pm-workspace .role-dashboard .tone-danger .home-value { color:#b42318; }
.pm-workspace .role-dashboard .tone-warning .cont-top { background:#fff1b8; }
.pm-workspace .role-dashboard .home-child { margin:0 0 18px; font-weight:800; font-size:19px; }
.pm-workspace .home-action { padding:25px; border-radius:20px; background:#f0e9ff; color:#073b4c; }
.pm-workspace .home-action p { margin:12px 0 20px; }
.pm-workspace .home-action .button { display:flex; align-items:center; justify-content:center; gap:8px; background:#0077b6; color:white; }
.pm-workspace .home-action-icon .ic { width:28px; height:28px; color:#7c3aed; margin-bottom:12px; }
.pm-workspace .home-growth { display:grid; grid-template-columns:minmax(0,1fr) 60px auto; gap:12px; align-items:center; padding:15px 0; border-top:1px solid #e7eef3; color:#073b4c; }
.pm-workspace .home-growth:first-child { border:0; }
.pm-workspace .home-growth small { grid-column:1/-1; }
.pm-workspace .home-group-link { display:flex; align-items:center; gap:12px; padding:15px 0; border-bottom:1px solid #e7eef3; }
.pm-workspace .home-group-link span { flex:1; }
.pm-workspace .home-group-link:last-child { border:0; }
.pm-workspace .home-secondary-strip { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-bottom:24px; align-items:start; }
.pm-workspace .home-summary { display:flex; align-items:center; gap:12px; padding:18px; background:#e6f6ff; border:1px solid #d7e5ed; border-radius:18px; }
.pm-workspace .home-summary strong { margin-left:auto; font-size:25px; }
.pm-workspace .summary-strip { margin-bottom:24px!important; }
.pm-workspace .role-dashboard .tip .ic { width:18px; height:18px; }
/* Ordinary mobile table rows stay neutral; warning badges carry semantic colour. */
@media(max-width:600px) {
  .pm-workspace table.rows tr:nth-child(n) td:first-child { background:#f5f9fc; }
  .pm-workspace .home-secondary-strip { grid-template-columns:1fr; }
  .pm-workspace .lesson .lesson-b { flex:1 1 180px; min-width:0; }
  .pm-workspace .lesson > div:last-child:has(.btn) { flex-basis:100%; }
  .pm-workspace table.rows td[data-l] { min-width:0; overflow-wrap:break-word; }
  .pm-workspace table.rows td[data-l] .badge { white-space:normal; }
}

.pm-workspace .review-date { display:block; white-space:nowrap; }
@media(max-width:600px) {
  .pm-workspace table.rows td:has(.review-date) { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
  .pm-workspace table.rows td:has(.review-date)::before { flex:0 0 100%; }
  .pm-workspace table.rows td:has(.review-date) .review-date { flex:0 0 100%; }
}

.pm-workspace .home-secondary-strip > * { min-width:0; }
.pm-workspace .role-dashboard .home-tile .ic { width:19px; height:19px; flex-shrink:0; }
.pm-workspace .stats > .stat::before { background:var(--c-sky); }
.pm-workspace .stats > .stat.warn::before { background:#e8a33a; }
.pm-workspace .stats > .stat.bad::before { background:#b42318; }

.pm-workspace .home-action.lavender { color:#073b4c; }
.pm-workspace .role-dashboard :is(.cont-btn,.button,.home-group-link,.quick-links a) > .ic:last-child { transform:rotate(180deg); }

.pm-workspace .tabbar a span { overflow:visible; text-overflow:clip; }
.pm-workspace .home-summary > .ic:last-child { transform:rotate(180deg); }

/* A size-contained dashboard inside the admin grid must retain the full column width. */
.pm-workspace .role-dashboard { width:100%; min-width:0; }

.boot-screen{display:none}.loading .boot-screen{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;background:#f5f9fc;color:#073b4c;font:14px Inter,system-ui,sans-serif}.boot-screen img{width:210px}.boot-spinner{width:32px;height:32px;border:3px solid #d7e5ed;border-top-color:#0077b6;border-radius:50%;animation:boot-spin .9s linear infinite}body.loading #app{visibility:hidden}@keyframes boot-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.boot-spinner{animation:none;border-top-width:7px}}.account-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.account-error{color:#a72e35;padding:12px;background:#fff0f0;border-radius:12px}.password-form{max-width:480px;display:grid;gap:14px}.btn:disabled{opacity:.6;cursor:wait}

.owner-section{padding:24px;border-radius:24px;margin:24px 0;border:1px solid var(--line);border-top:5px solid #0077b6;background:#eff7ff}.owner-on{border-top-color:#8a6cc4;background:#f4f0fc}.owner-fin{border-top-color:#b58b27;background:#fff9e8}.owner-jumps{display:flex;gap:12px;flex-wrap:wrap}.owner-jumps a{padding:12px 20px;background:white;border:1px solid var(--line);border-radius:16px}.owner-section .card{background:#ffffffc9}@media(max-width:600px){.owner-section{padding:16px;margin:16px 0}.owner-section .page-h h1{font-size:25px}.owner-jumps{gap:8px}.owner-jumps a{padding:10px 14px}}

/* T-13 daily work: same tinted surfaces and spacing as role homes. */
.journal-progress{padding:18px 22px;border:1px solid #c7e5da;border-radius:18px;background:#e9f7f0;margin:16px 0;color:#18543c;display:grid;gap:8px}.journal-progress span{font-size:12px}.journal-progress .bar{margin:0}.pm-workspace .journal-marks{display:flex;flex-wrap:nowrap;gap:4px;background:#f1f5fa;padding:4px;border-radius:14px}.pm-workspace .journal-marks button{min-height:44px;min-width:70px;border-radius:10px;font-weight:700}.pm-workspace .journal-marks .on.ok{background:#d8f2e3;color:#18543c}.pm-workspace .journal-marks .on.bad{background:#ffe5e5;color:#9b2e35}.pm-workspace .journal-marks .on.warn{background:#fff0c6;color:#825c12}.pm-workspace .score-entry{padding:10px 14px;border:1px solid var(--line);border-radius:14px;margin:8px 0;background:#f5f8fe}.pm-workspace .score-entry input{max-width:100px;min-height:44px}.recording-player{display:block;width:100%;max-height:65vh;border-radius:16px;background:#073b4c}.pm-workspace[data-page="results"] .chart{background:#f4f0fc;border-radius:16px;padding:12px}.pm-workspace[data-page="recordings"] .rec{padding:18px;border-radius:18px;background:#f0f7ff;border:1px solid #d5e6f5;margin-bottom:12px}.pm-workspace[data-page="schedule"] .day-h{font-size:16px;color:#073b4c;margin-top:24px}.pm-workspace[data-page="schedule"] .lesson{padding:16px;border-radius:16px;background:#f3f8ff;margin:10px 0}.pm-workspace[data-page="payments"] .card,.payment-contract .card{border-top:4px solid #c6def3}.pm-workspace[data-page="groups"] .card,.pm-workspace[data-page="group"] .card,.pm-workspace[data-page="student"] .card{border-top:4px solid #d8cff1}.pm-workspace[data-page="finance"] .stats .stat,.pm-workspace[data-page="payments"] .stats .stat{background:#fff8e5}.pm-workspace[data-page="review"] .stats .stat{background:#f0eaff}.pm-workspace[data-page="review"] .page-h p{max-width:720px;line-height:1.7}.pm-workspace .tabs{gap:8px;padding:8px 0 16px}.pm-workspace .tabs a{border-radius:100px;padding:10px 16px;white-space:nowrap}.pm-workspace .tabs a.on{background:#e7efff;color:#185bbc}.pm-workspace .modal .field input,.pm-workspace .modal .field select{min-height:44px}.pm-workspace .modal .field textarea{min-height:100px}.pm-workspace .chart .dot{stroke:#fff;stroke-width:2}.pm-workspace .chart .line{stroke-width:3}@media(max-width:600px){.pm-workspace .journal-roster table.rows td:last-child{display:block;width:100%;padding:10px 0}.pm-workspace .journal-roster td:last-child:before{display:none}.pm-workspace .journal-marks{width:100%;justify-content:stretch}.pm-workspace .journal-marks button{flex:1;min-width:0;font-size:12px;padding:10px 8px}.pm-workspace .journal-roster tr{border-left:4px solid #d9e8f5}.pm-workspace .journal-roster td:first-child{font-size:15px;font-weight:700}.pm-workspace .lesson{align-items:flex-start;gap:12px}.pm-workspace .lesson-t{min-width:48px;font-weight:800}.pm-workspace .lesson-b{min-width:0;overflow-wrap:anywhere}.pm-workspace .rec{gap:12px;flex-wrap:wrap}.pm-workspace .tabs{overflow:auto;flex-wrap:nowrap}.pm-workspace .page-h>.row .btn{min-height:44px}.pm-workspace .modal footer{flex-wrap:wrap;gap:8px}.pm-workspace .modal footer .btn{min-height:44px}.pm-workspace .modal .score-entry{display:flex;justify-content:space-between;gap:10px}.pm-workspace .modal .score-entry>span{min-width:0}.pm-workspace[data-page="review"] .review-date{white-space:normal}}

.builder-days,.lead-filter,.lead-move{display:none}.contract-progress{padding:14px 0;display:grid;gap:8px}.pm-workspace .builder-day{background:#f1f6ff;border:1px solid #d9e5f5;border-radius:20px;padding:16px;margin:16px 0}.builder-day header{display:flex;justify-content:space-between;gap:12px;align-items:center}.builder-day h2{font-size:16px;margin:0}.builder-day-lesson{margin-top:12px}.builder-day-lesson .chip{width:100%;text-align:left;min-height:64px;border-radius:14px;display:grid;gap:5px;padding:12px}.builder-day-lesson>span{display:block;font-size:11px;color:var(--muted);margin-top:4px;padding-left:12px}.lead-move{padding:12px 0;border-top:1px solid var(--line);gap:10px}.lead-move .field{flex:1;min-width:0}.pm-workspace .lead-move select{width:100%;min-height:44px}.pm-workspace .lead-move button{min-height:44px}@media(max-width:900px){.builder-grid{display:none}.builder-days{display:block}}@media(max-width:600px){.lead-filter{display:block;margin:18px 0}.pm-workspace .kanban{display:block;overflow:visible}.pm-workspace .kanban .kcol{display:none;width:100%;min-width:0;max-width:none}.pm-workspace .kanban .kcol.mobile-current{display:block}.pm-workspace .kanban .lead{border-radius:18px;padding:16px;margin:12px 0;background:#fff;box-shadow:0 2px 12px #073b4c06}.lead-move{display:flex;align-items:end}.pm-workspace .kcol-h{background:#eee8ff;border-radius:12px;padding:14px;font-weight:700}.pm-workspace .lead-filter select{width:100%;min-height:46px}.pm-workspace .builder-day header{align-items:flex-start}.pm-workspace .builder-day h2{font-size:14px}.pm-workspace .builder-day header .btn{font-size:11px;padding:10px}.pm-workspace[data-page="builder"] .page-h>.row{width:100%}.pm-workspace[data-page="builder"] .weeknav{flex-wrap:wrap}}

.att-help{font-size:12px;line-height:1.7;color:#526b78;margin:14px 0}.att-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:12px}.att-person{position:relative;min-width:0}.att-tile{width:100%;min-height:145px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;text-align:left;border:1px solid #d7e5ed;background:#fff;color:#073b4c;border-radius:18px;padding:14px 15px;touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:pointer}.att-tile strong{font-size:13px;line-height:1.4;overflow-wrap:anywhere}.att-symbol{font-size:22px;font-weight:800;line-height:1}.att-status{font-size:11px;margin-top:auto}.att-tile.present{background:#e1f5e9;border-color:#82c69f;color:#18543c}.att-tile.absent{background:#ffe9e9;border-color:#de9b9f;color:#982c35}.att-tile.late{background:#fff3ce;border-color:#dabb61;color:#77580b}.att-tile.unmarked{border-style:dashed}.att-tile:focus-visible,.att-options:focus-visible{outline:3px solid #0077b6;outline-offset:3px}.att-tile:active{transform:scale(.98)}.att-options{position:absolute;right:6px;top:4px;border:0;background:transparent;color:inherit;width:44px;height:36px;font-size:13px;cursor:pointer}.att-choice,.late-presets{display:flex;flex-wrap:wrap;gap:8px}.att-choice .btn,.late-presets .btn{min-height:44px}.late-presets{margin-bottom:18px}.att-grid+.card{margin-top:16px}@media(max-width:600px){.att-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.att-tile{min-height:133px;padding:12px}.att-tile strong{font-size:12px}.att-help{font-size:11px}.pm-workspace[data-page=journal] .journal-progress{padding:12px 16px;gap:5px;margin:12px 0}.pm-workspace[data-page=journal] .page-h h1{font-size:24px}.pm-workspace[data-page=journal] .page-back{margin-bottom:10px}}

.absence-row{display:flex;justify-content:space-between;gap:16px;align-items:center;border:1px solid #d7e5ed;border-radius:16px;padding:16px;margin:10px 0;background:#f4f8ff}.absence-row p{overflow-wrap:anywhere}.absence-row>.row{flex-shrink:0}@media(max-width:600px){.absence-row{display:block}.absence-row>.row{margin-top:12px}.lesson>div:last-child .btn{white-space:normal}.lesson>div:last-child:has([data-act=absenceRequest]){flex-basis:100%}.lesson:has([data-act=absenceRequest]){flex-wrap:wrap}}

@media(min-width:360px) and (max-width:600px){.att-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.att-tile{min-height:118px;padding:10px;gap:6px}.att-tile strong{font-size:11px;line-height:1.4}.att-symbol{font-size:20px}.att-status{font-size:10px}.att-options{right:0;top:0;width:36px;height:32px}.pm-workspace[data-page=journal]:has(.att-grid) .page-h{margin-bottom:8px}.pm-workspace[data-page=journal]:has(.att-grid) .page-h .btn{min-height:36px;font-size:11px}.pm-workspace[data-page=journal]:has(.att-grid) .journal-progress span{display:none}}

.journal-progress:has(.att-bulk){grid-template-columns:1fr auto;align-items:center}.journal-progress:has(.att-bulk)>.bar{grid-column:1/-1}.att-bulk .btn{min-height:36px;font-size:11px}.pm-workspace[data-page=journal]:has(.att-grid) .page-back{min-height:30px;padding:6px 10px;font-size:11px;margin-bottom:6px}@media(max-width:600px){.pm-workspace[data-page=journal] .journal-progress .att-bulk{display:block}.att-bulk .btn{padding:8px;font-size:10px;min-height:34px}.pm-workspace[data-page=journal]:has(.att-grid) .page-h{margin-top:4px}.pm-workspace[data-page=journal]:has(.att-grid) .page-h p{margin:6px 0}.pm-workspace[data-page=journal]:has(.att-grid) .journal-progress{padding:10px 12px}.att-help{margin:8px 0}}

.att-tile.excused{background:#e6f1ff;border-color:#95badb;color:#22577a}
.att-photo{display:grid;place-items:center;width:58px;height:58px;flex-shrink:0;border-radius:50%;overflow:hidden;background:#dfebf3;color:#345669;font-weight:800;font-size:19px}.att-photo img{width:100%;height:100%;object-fit:cover}.att-tile{align-items:center;text-align:center;position:relative}.att-minutes{font-size:10px;font-weight:800}.late-time-list{max-height:50vh;overflow-y:auto;display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:4px}.late-time-list .btn{min-height:52px}.att-tile .att-photo{margin-top:6px}@media(max-width:600px){.att-tile{min-height:132px}.att-photo{width:52px;height:52px}.att-tile strong{max-width:100%}}
.att-person:has(.att-overlay){z-index:20}.att-overlay{position:absolute;top:0;left:0;width:220px;max-width:calc(100vw - 24px);background:#fff;border:1px solid #c9dce7;border-radius:18px;padding:32px 10px 10px;box-shadow:0 12px 35px #073b4c30;z-index:25}.att-overlay .late-time-list{max-height:190px;grid-template-columns:repeat(2,1fr);gap:6px;padding:3px}.att-overlay .late-time-list .btn{min-height:44px;font-size:12px;padding:8px}.att-overlay-close{position:absolute;top:2px;right:4px;width:32px;height:30px;border:0;background:transparent;color:#526b78;font-size:22px;cursor:pointer}.att-overlay .att-choice{display:grid;gap:6px}
.att-overlay .late-time-list{grid-template-columns:1fr;scrollbar-width:none;-ms-overflow-style:none;overscroll-behavior:contain}.att-overlay .late-time-list::-webkit-scrollbar{display:none}.att-overlay{width:150px}.att-overlay .late-time-list .btn{width:100%}
/* T-31 agenda */
.agenda-next{--c:#00a6fb;background:color-mix(in srgb,var(--c) 12%,white);border:1px solid color-mix(in srgb,var(--c) 32%,white);border-left:5px solid var(--c);border-radius:20px;padding:18px 22px;margin:10px 0 18px;color:#073b4c}.agenda-next small{font-weight:700}.agenda-next h2{font-size:26px;margin:8px 0}.agenda-next p{margin:6px 0;font-size:13px}.agenda-change{color:#825c12;background:#fff3ce;padding:8px 12px;border-radius:10px;font-size:12px}.agenda-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0}.agenda-toolbar .weeknav{margin-right:auto}.agenda-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin:16px 0;touch-action:pan-y}.agenda-day{background:#edf5fb;border:1px solid transparent;border-radius:14px;display:grid;justify-items:center;padding:8px 3px;cursor:pointer;color:#073b4c;gap:2px}.agenda-day small{font-size:10px}.agenda-day b{font-size:18px}.agenda-day.on,.agenda-month .on{background:#0077b6;color:white}.agenda-day.today{border-color:#0077b6}.agenda-entry{border:1px solid #d9e7ed;border-radius:16px;padding:8px 12px;margin:10px 0;background:#fff}.agenda-entry .lesson{margin:0!important;background:transparent!important;padding:8px!important}.agenda-cancelled{border-left:4px solid #c84049;background:#fff0f0}.agenda-other{display:flex;gap:14px;background:#f2effb;border-radius:16px;padding:18px;margin:10px 0}.agenda-other.holiday{background:#fff3ce}.agenda-other.live{background:#e2f5ec}.agenda-other svg{width:22px;height:22px;flex-shrink:0}.agenda-other b,.agenda-other small{display:block}.agenda-other .btn{margin-top:10px}.agenda-month{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;padding:12px;background:#f3f7fc;border-radius:16px}.agenda-month button{min-height:40px;border:0;border-radius:10px;background:white;color:#073b4c;cursor:pointer}.agenda-week{display:grid;grid-template-columns:repeat(7,minmax(160px,1fr));overflow-x:auto;gap:10px}.agenda-week section{background:#f3f8fc;border-radius:14px;padding:10px}.agenda-week .lesson{flex-wrap:wrap}.student-distinction{display:block;font-size:10px;font-weight:500;color:#526b78;line-height:1.4}.builder-holiday{background:#fff3ce!important}.builder-load{display:flex;gap:10px;flex-wrap:wrap;padding:14px;background:#e9f7f0;border-radius:14px;margin:12px 0}.builder-drop{outline:3px dashed #0077b6;outline-offset:-3px}.chip[draggable=true]{cursor:grab}.att-person .student-distinction{font-size:9px}
@media(max-width:600px){.agenda-next{padding:14px 16px;border-radius:16px;margin-top:6px}.agenda-next h2{font-size:23px}.agenda-next p{font-size:12px}.agenda-next small{font-size:11px}.agenda-toolbar{gap:6px}.agenda-toolbar .weeknav{width:100%;justify-content:space-between}.agenda-toolbar>.btn{font-size:11px;min-height:36px;padding:8px 10px}.agenda-entry .lesson{flex-wrap:wrap}.agenda-entry .lesson>div:last-child{margin-left:auto}.agenda-entry .lesson-b{flex:1}.agenda-day{padding:7px 2px}.agenda-next+.home-section{margin-top:14px}}
/* T-32: group identity and compact home agenda. */
.home-schedule{margin:8px 0 16px;min-width:0}.home-schedule-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.home-schedule-head>b{font-size:14px}.home-schedule-head .seg button{min-height:32px;font-size:11px;padding:6px 10px}.home-schedule-strip{display:flex;gap:8px;overflow-x:auto;padding:2px 1px 8px;scroll-snap-type:x proximity}.home-schedule-chip{--c:#1d4ed8;flex:0 0 180px;display:grid;gap:4px;align-content:start;text-align:left;scroll-snap-align:start;background:color-mix(in srgb,var(--c) 9%,white);border:1px solid color-mix(in srgb,var(--c) 30%,white);border-left:4px solid var(--c);border-radius:12px;padding:10px 12px;color:#073b4c;cursor:pointer}.home-schedule-chip strong{font-size:12px}.home-schedule-chip span{font-size:12px;font-weight:700}.home-schedule-chip small{font-size:10px}.home-schedule-chip:focus-visible,.schedule-week-block:focus-visible{outline:3px solid #0077b6;outline-offset:2px}.schedule-format{font-size:14px;white-space:nowrap}.schedule-note{background:#fff3ce;color:#704c00;font-size:12px;padding:8px 12px;border-radius:8px;white-space:pre-wrap;margin:8px 0}.agenda-entry{border-left:4px solid var(--c,#0077b6);background:color-mix(in srgb,var(--c,#0077b6) 5%,white)}.agenda-other.live{border-left:4px solid var(--c);background:color-mix(in srgb,var(--c) 8%,white)}.schedule-att-count{margin:4px 0}.agenda-toolbar .btn.on{background:#0077b6;color:white}.schedule-dots{display:flex;gap:3px;justify-content:center;flex-wrap:wrap;min-height:6px}.schedule-dots i{width:6px;height:6px;border-radius:50%;background:var(--c);display:block}.agenda-day.on .schedule-dots i,.agenda-month .on .schedule-dots i{outline:1px solid #fff}.agenda-month>small{text-align:center;padding:6px;font-weight:700;color:#526b78}.agenda-month button{display:flex;flex-direction:column;gap:8px;align-items:center;justify-content:flex-start;min-height:80px;padding:10px 5px}.agenda-month .on{background:#0077b6;color:white}.schedule-week-scroll{overflow-x:auto;border:1px solid #d7e5ed;border-radius:14px;background:white;margin-top:12px}.schedule-time-grid{display:grid;grid-template-columns:54px repeat(7,minmax(105px,1fr));min-width:790px}.schedule-time-grid header{height:48px;text-align:center;font-size:12px;font-weight:800;padding:14px 3px;border-bottom:1px solid #d7e5ed;background:#eff6fb;position:relative;z-index:2}.schedule-time-axis{position:relative;min-height:calc(var(--week-height) + 48px)}.schedule-time-axis>span{position:absolute;font-size:10px;color:#526b78;left:8px;transform:translateY(-50%)}.schedule-time-day{min-width:0;border-left:1px solid #e2edf4}.schedule-time-lane{position:relative;height:var(--week-height);background:repeating-linear-gradient(to bottom,transparent 0,transparent 41px,#edf2f7 41px,#edf2f7 42px)}.schedule-week-block{position:absolute;left:3px;right:3px;display:flex;flex-direction:column;gap:3px;align-items:flex-start;text-align:left;background:color-mix(in srgb,var(--c) 13%,white);border:1px solid color-mix(in srgb,var(--c) 35%,white);border-left:4px solid var(--c);border-radius:8px;padding:7px;color:#073b4c;overflow:hidden;cursor:pointer;max-width:calc(100% - 6px)}.schedule-week-block b{font-size:11px;overflow-wrap:anywhere}.schedule-week-block span,.schedule-week-block small{font-size:10px;overflow-wrap:anywhere}.schedule-week-phone{display:none}.builder-viewbar{display:flex;gap:8px;margin:12px 0}.builder-viewbar .on{background:#0077b6;color:white}
@media(max-width:600px){.home-schedule-chip{flex-basis:150px;padding:8px 10px}.home-schedule-head{margin-bottom:6px}.home-schedule-strip{flex-wrap:nowrap}.schedule-week-scroll{display:none}.schedule-week-phone{display:block}.schedule-week-phone>section{margin:16px 0}.schedule-week-phone h3{font-size:14px}.agenda-month button{min-height:58px;padding:8px 3px}.home-schedule{margin-bottom:12px}}
.pm-workspace .agenda-toolbar .btn.on,.pm-workspace .builder-viewbar .btn.on{background:#0077b6;color:#fff}.pm-workspace .home-schedule-chip{border-left:4px solid var(--c)}.pm-workspace .chip{background:color-mix(in srgb,var(--c) 9%,white)}@media(max-width:600px){.schedule-week-extras{display:none}}
.schedule-time-lane{background:repeating-linear-gradient(to bottom,transparent 0,transparent 53px,#edf2f7 53px,#edf2f7 54px)}
.builder-next{padding:12px 14px;background:#edf6fb;border-radius:14px;margin:10px 0;max-width:420px}.builder-next>b{display:block;font-size:12px;margin-bottom:8px}
