/* ================= teamworkpnqa layout (from the owner's sketch) =================
   Top banner: logo + site name, "Who signed in" on the right.
   Under it: page tabs. Left: projects with progress bars, Report a problem, Settings. */
/* Page buttons (Projects, Brainstorm, Files, Activity, Search, Shortcuts) live in the left sidebar, so no tab row. */
:root { --pn-bh: 60px; --pn-th: 0px; --pn-top: calc(var(--pn-bh) + var(--pn-th)); --pn-sw: 216px; }
@media (max-width: 900px) { :root { --pn-sw: 180px; } }
@media (max-width: 640px) { :root { --pn-sw: 62px; --pn-bh: 54px; } }
.sidebar .workspace-label { margin-top: 2px; }
.sidebar .nav.active { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 70%, transparent); }

/* ---------- top banner ---------- */
.pn-top { position: fixed; top: 0; left: 0; right: 0; height: var(--pn-bh); z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; background: var(--sidebar-bg); color: var(--side-ink-9, var(--text)); border-bottom: 1px solid color-mix(in srgb, var(--text) 16%, transparent); box-sizing: border-box; }
.pn-top .brand.pn-brand { padding: 0; font-size: inherit; color: inherit; }
.pn-top .pn-mark { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1.5px color-mix(in srgb, currentColor 55%, transparent); }
.pn-top .pn-brand-text b { font-size: 16px; }
.pn-top .pn-brand-text small { font-size: 9.5px; letter-spacing: .14em; }
.pn-who-wrap { position: relative; }
.pn-who { display: flex; flex-direction: column; align-items: center; line-height: 1.25; min-width: 150px; max-width: 46vw; padding: 5px 14px; border: 1.5px solid color-mix(in srgb, currentColor 55%, transparent); border-radius: 9px; background: none; color: inherit; cursor: pointer; font: inherit; }
.pn-who small { font-size: 10px; opacity: .65; }
.pn-who b { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-who:hover, .pn-who[aria-expanded="true"] { border-color: currentColor; }
.pn-who-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 6px; box-shadow: 0 14px 40px rgba(0,0,0,.35); z-index: 40; }
.pn-who-menu a { display: block; padding: 8px 12px; border-radius: 7px; color: inherit; text-decoration: none; font-size: 13px; }
.pn-who-menu a:hover, .pn-who-menu a:focus-visible { background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* ---------- page tabs ---------- */
.pn-tabs { position: fixed; top: var(--pn-bh); left: var(--pn-sw); right: 0; height: var(--pn-th); z-index: 25; display: flex; align-items: center; gap: 8px; padding: 0 22px; background: var(--surface); border-bottom: 1px solid var(--border); box-sizing: border-box; overflow-x: auto; scrollbar-width: none; }
.pn-tabs .nav { width: auto; flex: none; margin: 0; padding: 7px 16px; border: 1.5px solid var(--border); border-radius: 8px; color: var(--text); font-size: 13px; background: none; }
.pn-tabs .nav kbd { display: none; }
.pn-tabs .nav:hover { border-color: color-mix(in srgb, var(--text) 55%, transparent); }
.pn-tabs .nav.active { background: var(--text); border-color: var(--text); color: var(--surface); font-weight: 650; }
.pn-tabs .nav.active span { color: inherit; }
/* Search and Shortcuts buttons get added after Activity by the app: keep them small, pushed right */
.pn-tabs #paletteOpen { margin-left: auto; }
.pn-tabs #paletteOpen ~ .nav, .pn-tabs #paletteOpen { padding: 7px 12px; border-style: dashed; }

/* ---------- sidebar under the banner ---------- */
.sidebar { top: var(--pn-bh); padding-top: 14px; }
.sidebar .sidebar-heading { margin-top: 4px; }
main { margin-top: var(--pn-top); }
main .topbar { height: 54px; }
main .topbar .breadcrumbs { display: none; }
main .topbar { justify-content: flex-end; }
main .topbar > .badge:only-child { display: none; }

/* heights that used the whole screen now leave room for the banner and tabs */
.canvas-shell { height: calc(100dvh - 136px - var(--pn-top)); }
#filesView { height: calc(100dvh - var(--pn-top)); }
.files-layout { height: calc(100dvh - 54px - var(--pn-top)); }

/* projects with task counts and a progress bar */
#projects .nav.pn-proj { display: block; padding: 9px 11px; margin: 0 0 7px; border: 1.5px solid color-mix(in srgb, var(--side-ink-9, var(--text)) 28%, transparent); border-radius: 8px; white-space: normal; }
#projects .nav.pn-proj.active { border-color: var(--side-ink-9, var(--text)); }
.pn-proj-row { display: flex; align-items: baseline; gap: 8px; }
.pn-proj-row b { flex: 1; min-width: 0; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-proj-row small { flex: none; opacity: .7; font-variant-numeric: tabular-nums; }
.pn-bar { display: block; height: 4px; margin-top: 7px; border-radius: 99px; background: color-mix(in srgb, var(--side-ink-9, var(--text)) 16%, transparent); overflow: hidden; }
.pn-bar i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--accent); transition: width calc(.6s * var(--spd, 1)) cubic-bezier(.2,.8,.2,1); }
.pn-proj-all { opacity: .8; }

/* Report a problem: outlined button above Settings */
.nav.pn-report { justify-content: center; border: 1.5px solid color-mix(in srgb, var(--side-ink-9, var(--text)) 35%, transparent); margin: 8px 0 4px; }
.nav.pn-report:hover { border-color: var(--side-ink-9, var(--text)); }

@media (max-width: 640px) {
  .pn-top { padding: 0 10px; }
  .pn-top .pn-brand-text small { display: none; }
  .pn-who { min-width: 0; padding: 4px 10px; }
  .pn-who small { display: none; }
  .pn-tabs { padding: 0 10px; gap: 6px; }
  .pn-tabs .nav { padding: 6px 11px; font-size: 12px; }
  #projects .nav.pn-proj { padding: 8px 4px; text-align: center; }
  .pn-proj-row small, .pn-bar { display: none; }
  .nav.pn-report { font-size: 0; padding: 10px 0; }
  .nav.pn-report span { font-size: 16px; }
}

/* ---------- checklist: titles, paste box and green progress bar ---------- */
.checklist-add { align-items: flex-start; }
.checklist-add textarea#checklistNew { flex: 1; min-width: 0; min-height: 40px; max-height: 220px; resize: vertical; font: inherit; line-height: 1.45; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); box-sizing: border-box; }
.checklist-add textarea#checklistNew:focus { outline: none; border-color: var(--accent); }
.cl-tip { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); line-height: 1.4; }
#checklistItems li.cl-head { list-style: none; display: flex; align-items: baseline; gap: 10px; margin: 12px 0 4px; padding: 0; }
#checklistItems li.cl-head:first-child { margin-top: 2px; }
#checklistItems li.cl-head b { font-size: 14px; font-weight: 750; color: var(--text); }
#checklistItems li.cl-head .cl-pc { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
#checklistItems li.cl-head.complete .cl-pc { color: #22a55b; font-weight: 650; }
.pn-cl-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.pn-cl-track { flex: 1; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--text) 13%, transparent); overflow: hidden; }
.pn-cl-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1f9d55, #34d17a); transition: width calc(.5s * var(--spd, 1)) cubic-bezier(.2,.8,.2,1); }
.pn-cl-bar b { flex: none; min-width: 36px; text-align: right; font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.pn-cl-bar.complete b { color: #22a55b; }
.pn-cl-bar.big { margin: 2px 0 10px; }
.pn-cl-bar.big .pn-cl-track { height: 10px; }
.pn-cl-bar.big b { font-size: 14px; min-width: 46px; }
#board .pn-cl-bar { width: 100%; flex: 1 1 100%; box-sizing: border-box; margin: 10px 0 2px; }
