/* =====================================================================
   Connectwell UI kit — CIS page patterns built on cw-components.css:
   kit menus as links, bell panel footer, and the page frames used by the
   kit pages (home, approvals, notifications, profile, 360 views).
   ===================================================================== */

/* Menus: links look like the buttons; disabled items explain themselves through their tooltip */
a.cw-mi { text-decoration: none; }
a.cw-mi:hover { color: var(--text); }
.cw-mi.cw-disabled { opacity: .5; cursor: not-allowed; }
.cw-mi .cw-i { width: 15px; height: 15px; }
.cw-pop { z-index: 1200; }
.cw-tip { z-index: 2000; }
.cw-panel { z-index: 1150; max-height: calc(100vh - 80px); overflow: auto; }
.cw-drawer { z-index: 1160; }

/* ---------------- Kit buttons on kit pages (mockup .btn) ---------------- */
a.cw-btn { text-decoration: none; }
a.cw-btn:hover { color: var(--text); }
a.cw-btn.cw-primary:hover, a.cw-btn.cw-go:hover { color: #fff; }
.cw-btn .cw-i { width: 15px; height: 15px; }
.cw-btn.cw-is-disabled, .cw-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* ---------------- 360 view ---------------- */
.cw-360 .cw-v360-title { min-width: 0; }
/* a title that is one long word (a pasted URL) wraps instead of running out of the header; meta values too */
.cw-360 .cw-v360-t { min-width: 0; }
.cw-360 .cw-v360-title, .cw-360 .cw-v360-meta { overflow-wrap: anywhere; word-break: break-word; }
.cw-360 .cw-v360-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* attachment tables on 360 views: View / Download sit on one line inside the row, never clipped by it */
.cw-pane .cw-grid td.cw-att-acts { text-align: right; white-space: nowrap; width: 1%; padding-top: 4px !important; padding-bottom: 4px !important; overflow: visible; vertical-align: middle; }
.cw-pane .cw-grid td.cw-att-acts .cw-btn { vertical-align: middle; }
.cw-pane .cw-grid td.cw-att-acts .cw-btn + .cw-btn { margin-left: 4px; }
.cw-pane .cw-grid td { overflow-wrap: anywhere; }
.cw-360 .cw-v360-meta .cw-i { width: 14px; height: 14px; color: var(--faint); }
.cw-360 .cw-waiting { color: var(--wip); font-weight: 600; }
.cw-360 .cw-waiting .cw-i { color: var(--wip); }
.cw-360 .cw-fstep.cw-skip .cw-fdot { border-style: dashed; background: var(--card); color: var(--ok); border-color: var(--ok); }
.cw-360-body .cw-ptabs { border-radius: var(--r-lg) var(--r-lg) 0 0; align-items: center; }
.cw-360-body .cw-ptabs .cw-i { width: 14px; height: 14px; }
.cw-pane { display: none; }
.cw-pane.cw-on { display: block; }
.cw-pane .cw-fsec + .cw-fsec { margin-top: var(--s4); }
.cw-pane .cw-fsec .cw-card__hd { cursor: pointer; }
.cw-pane .cw-fsec .cw-card__hd .cw-chev { margin-left: auto; transition: transform .2s; color: var(--faint); }
.cw-pane .cw-fsec.cw-closed .cw-card__hd .cw-chev { transform: rotate(-90deg); }
.cw-pane .cw-cols > div > .cw-card + .cw-card { margin-top: var(--s4); }
.cw-pane .cw-dl b { overflow-wrap: anywhere; }
.cw-pane .cw-dl .cw-rt p:last-child { margin-bottom: 0; }
.cw-pane .cw-empty { padding: 40px 16px; }
.cw-pane table.cw-grid td { white-space: normal; }
.cw-crumb a { color: var(--muted); }
.cw-crumb a:hover { color: var(--accent); }
.cw-crumb b { color: var(--text); }
@media print {
  #sidebar, .dashboard__header, .cw-360 .cw-v360-act, .cw-360-body .cw-ptabs, .cw-crumb, #toast-container { display: none !important; }
  #mainDashboard.dashboard, #mainDashboard.dashboard.sidebar-collapsed { margin: 0 !important; width: 100% !important; }
  .cw-pane { display: block !important; }
  .cw-card { box-shadow: none !important; }
  body { background: #fff !important; }
  /* Print / save as PDF: the shell's flex rows, clipped body and fixed heights do not split across pages (Chrome
     printed the header and then blank sheets) — print the page as one plain column that flows from page to page */
  @page { size: A4; margin: 12mm; }
  html, body { height: auto !important; min-height: 0 !important; overflow: visible !important; }
  #mainDashboard.dashboard, .dashboard__body, .detail__content, .dashboard__content, .cw-360-body, .cw-360-body > .cw-card__bd {
    display: block !important; height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; position: static !important;
  }
  .cw-360-body, .cw-pane, .cw-pane > .cw-card { break-inside: auto !important; }
  .cw-pane .cw-dl > div, .cw-pane .cw-feed > *, .cw-pane tr, .cw-stages, .cw-360 { break-inside: avoid; }
  .cw-pane .cw-card__hd, .cw-pane h3 { break-after: avoid; }
  .cw-pane + .cw-pane { margin-top: 12px; }
  .cw-factions-bar, .cw-sysbanners, .cw-navbar, .cw-qv-eye, .cw-drawer, .cw-ovl, .cw-pop, .cw-panel, #GlobalFileViewer { display: none !important; }
  /* the stage tracker fits the sheet: on a page narrower than the screen its fixed-width steps were cut off behind a scrollbar */
  .cw-flow { display: flex !important; flex-wrap: nowrap; width: 100% !important; min-width: 0 !important; max-width: 100% !important; overflow: visible !important; padding-left: 0 !important; padding-right: 0 !important; }
  .cw-flow .cw-fstep { flex: 1 1 0 !important; min-width: 0 !important; width: auto !important; }
  .cw-flow .cw-ftitle, .cw-flow .cw-fsub { white-space: normal !important; overflow-wrap: anywhere; font-size: 10px !important; }
  .cw-360, .cw-360 .cw-v360-head { overflow: visible !important; max-width: 100% !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Bell */
.cw-bell a { text-decoration: none; color: inherit; }
.cw-bell__ap:hover { filter: brightness(.98); }
.cw-bell__ft { padding: 10px; text-align: center; border-top: 1px solid var(--line-2); }
.cw-bell__it .cw-b { min-width: 0; }

/* 360: people card, small helper text */
.cw-pane .cw-people { display: flex; flex-direction: column; gap: var(--s3); }
.cw-pane .cw-dl small { display: block; margin-top: 2px; font-size: var(--fs-xs); }
.cw-pane .cw-feed .cw-msg { overflow-wrap: anywhere; }

/* Kit overlays (command palette, kit dialogs) sit above the menu and top bar */
.cw-ovl { z-index: 1300; }
.cw-cmdk .cw-av { flex: 0 0 auto; }
.cw-cmdk__i > .cw-i { width: 15px; height: 15px; color: var(--faint); }


/* Banners under the top bar, What's new, downloads */
.cw-sysbanners { display: flex; flex-direction: column; position: sticky; top: var(--h-top); z-index: 880; }
.cw-sysbanners:empty { display: none; }
.cw-sysban .cw-ibtn { width: 26px; height: 26px; }
#cwGiftBtn .cw-dot-sm { display: none; min-width: 8px; width: 8px; height: 8px; padding: 0; top: 6px; right: 6px; border-width: 2px; }
#cwGiftBtn.cw-fresh .cw-dot-sm { display: block; }
.cw-wn-panel { width: 400px; }
.cw-wn > div { min-width: 0; }
.cw-wn p { font-size: var(--fs-sm); }

/* Quick look: eye on the hovered row, side panel with the 360 header + overview */
.cw-qv-eye { position: fixed; z-index: 950; width: 26px; height: 26px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card); color: var(--text-2); display: none; place-items: center; cursor: pointer; box-shadow: var(--sh-1); padding: 0; }
.cw-qv-eye:hover { color: var(--accent); border-color: var(--accent-line); }
.cw-qv-eye .cw-i { width: 15px; height: 15px; }
.cw-qv-ovl { background: rgba(15, 23, 42, .25); }
.cw-qv.cw-sdrawer { width: min(720px, 94vw); }
.cw-qv .cw-sdrawer__hd .cw-i { width: 17px; height: 17px; }
.cw-qv .cw-360 { box-shadow: none; }
.cw-qv .cw-flow { padding-left: 0; padding-right: 0; }
.cw-qv .cw-qv-cols { grid-template-columns: 1fr; }
.e-grid .e-content tr.e-row.cw-qv-row td.e-rowcell { background: var(--accent-soft) !important; }

/* Progress bar outside KPI cards (360 completion, gatepoints) */
.cw-kbar { height: 4px; background: var(--chip-bg); border-radius: 2px; display: flex; overflow: hidden; }
.cw-kbar i { display: block; height: 100%; }
.cw-people { display: flex; flex-direction: column; gap: var(--s3); }
.cw-cmdk mark, .cw-gs__it mark, #sidebar mark.cw-hl { padding: 0 !important; margin: 0; }
/* Select Action (master registers) keeps its label on one line */
.cw-reg > .cw-reg__head > .dashboard__userAction .e-ddl, .cw-reg > .cw-reg__head > .dashboard__userAction .e-input-group { min-width: 150px; }

/* ---------------- Notifications page: the mockup's inbox (cw-extras.js decorates; markup and scripts unchanged) ---------------- */
.cw-notify .dashboard__table > .dashboard__tableBody { padding: 0 !important; }
.cw-notify .tab-pane > .w-100 { height: auto !important; }
/* toolbar: count on the left, Unread only + actions on the right */
.cw-notify .cw-nbar { position: sticky; top: 0; display: flex !important; align-items: center; gap: var(--s3); margin: 0 !important; padding: 10px var(--s5) !important;
  background: var(--card) !important; box-shadow: none !important; border-bottom: 1px solid var(--line-2); }
.cw-notify .cw-nbar > .btn-group { order: 2; display: inline-flex; gap: var(--s2); }
.cw-notify .cw-nbar > .d-flex { order: 1; margin: 0 auto 0 0 !important; gap: var(--s4); flex-direction: row-reverse; justify-content: flex-end; }
.cw-notify .cw-nbar .text-muted, .cw-notify .cw-nbar #all-tab-count, .cw-notify .cw-nbar #todo-tab-count { font-size: var(--fs-sm) !important; color: var(--muted) !important; }
.cw-notify .cw-nbar .btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; margin: 0 !important; padding: 0 12px !important; border-radius: var(--r-md) !important;
  border: 1px solid var(--line) !important; background: var(--card) !important; color: var(--text) !important; font-size: var(--fs-sm) !important; font-weight: 600; box-shadow: none !important; }
.cw-notify .cw-nbar .btn:hover { background: var(--hover) !important; border-color: var(--line-strong) !important; }
.cw-notify .cw-nbar .btn .cw-i { width: 14px; height: 14px; }
.cw-notify .cw-nbar .clear-all-btn { color: var(--crit) !important; border-color: var(--crit-line) !important; }
.cw-notify .cw-nbar .clear-all-btn:hover { background: var(--crit-bg) !important; }
.cw-notify .cw-nbar .btn:disabled { opacity: .5; }
/* Unread only: the kit switch */
.cw-notify .cw-nbar .form-switch { display: inline-flex; align-items: center; gap: var(--s2); margin: 0 !important; padding: 0 !important; min-height: 0; }
.cw-notify .cw-nbar .form-switch .form-check-input { float: none; margin: 0 !important; width: 34px; height: 20px; transform: none !important; cursor: pointer;
  border: 0 !important; background-color: var(--line-strong) !important; box-shadow: none !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important; }
.cw-notify .cw-nbar .form-switch .form-check-input:checked { background-color: var(--accent) !important; }
/* Delete all takes the same brand red as "Open …" and the Unread switch (it used the darker status red) */
.cw-notify .cw-nbar .clear-all-btn { color: var(--accent) !important; border-color: var(--accent-line) !important; background: var(--card) !important; }
.cw-notify .cw-nbar .clear-all-btn:hover { background: var(--accent-soft) !important; border-color: var(--accent) !important; color: var(--accent) !important; }
.cw-notify .cw-nbar .form-switch .form-check-label { margin: 0 !important; font-size: var(--fs-sm) !important; font-weight: 600 !important; color: var(--text-2); cursor: pointer; }
/* the list: the page scrolls, not an inner 600px box */
.cw-notify .cw-nlist { max-height: none !important; overflow: visible !important; padding: 0 !important; }
.cw-notify .cw-ngrp { padding: 14px var(--s5) 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; background: var(--card); }
/* a row */
.cw-notify .notification-card.cw-nrow { position: relative; display: block !important; margin: 0 !important; padding: 12px var(--s5) 12px 72px !important; border: 0 !important; border-radius: 0 !important;
  border-bottom: 1px solid var(--line-2) !important; background: var(--card) !important; box-shadow: none !important; cursor: pointer; transition: background .12s; }
.cw-notify .notification-card.cw-nrow[style*="display: none"] { display: none !important; }
.cw-notify .notification-card.cw-nrow:hover { background: var(--row-hover) !important; }
.cw-notify .notification-card.cw-nrow.unread { background: color-mix(in srgb, var(--info-bg) 45%, var(--card)) !important; }
.cw-notify .notification-card.cw-nrow.unread:hover { background: color-mix(in srgb, var(--info-bg) 70%, var(--card)) !important; }
.cw-notify .notification-card.cw-nrow.unread::before { content: ""; position: absolute; left: 14px; top: 26px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.cw-notify .cw-nrow .badge { display: none !important; }
.cw-notify .cw-nic { position: absolute; left: 30px; top: 14px; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.cw-notify .cw-nic .cw-i { width: 15px; height: 15px; }
.cw-notify .cw-nic--info { background: var(--info-bg); color: var(--info); }
.cw-notify .cw-nic--crit { background: var(--crit-bg); color: var(--crit); }
.cw-notify .cw-nic--ok { background: var(--ok-bg); color: var(--ok); }
.cw-notify .cw-nic--wip { background: var(--wip-bg); color: var(--wip); }
.cw-notify .cw-nic--idle { background: var(--chip-bg); color: var(--text-2); }
.cw-notify .cw-nkick { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-xs); font-weight: 600; color: var(--muted); line-height: 1.4; }
.cw-notify .cw-nkick > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-notify .cw-nkick .cw-ntime { margin-left: auto; flex: 0 0 auto; font-size: var(--fs-xs) !important; color: var(--muted) !important; font-weight: 500; }
.cw-notify .cw-nrow > .d-flex:first-of-type { margin-top: 2px; }
.cw-notify .cw-nrow .notification-title { display: flex; align-items: center; gap: var(--s2); min-width: 0; font-size: var(--fs-md) !important; font-weight: 500 !important; color: var(--text) !important; line-height: 1.4; }
.cw-notify .cw-nrow.unread .notification-title { font-weight: 700 !important; color: var(--ink) !important; }
.cw-notify .cw-nsubj { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-notify .cw-ncode { flex: 0 0 auto; font-family: var(--mono, ui-monospace, Consolas, monospace); font-size: 11px; font-weight: 600; color: var(--text-2); background: var(--chip-bg); border-radius: var(--r-sm); padding: 1px 6px; }
.cw-notify .cw-nrow p { margin: 2px 0 0 !important; font-size: var(--fs-sm) !important; color: var(--text-2); line-height: 1.45; }
.cw-notify .cw-nrow .cw-nopen { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--accent) !important; text-decoration: none !important; }
.cw-notify .cw-nrow .cw-nopen .cw-i { width: 13px; height: 13px; transition: transform .15s; }
.cw-notify .cw-nrow .cw-nopen:hover { text-decoration: underline !important; }
.cw-notify .cw-nrow .cw-nopen:hover .cw-i { transform: translateX(2px); }
.cw-notify .cw-nempty { padding: 56px var(--s5) !important; }
/* tabs: unread count chips; pager in the kit style; the full-screen loader only after a moment */
.cw-notify .tabHead__item .cw-tcount { margin-left: 6px; }
.cw-notify .tabHead__item.active .cw-tcount { background: var(--accent-soft); color: var(--accent); }
.cw-notify .pagination-container { padding: 12px var(--s5); border-top: 1px solid var(--line-2); }
.cw-notify .modern-pagination { box-shadow: none !important; background: transparent !important; gap: 4px; margin: 0 !important; justify-content: flex-end !important; }
.cw-notify .modern-pagination .page-link { height: 28px; min-width: 28px; display: inline-grid; place-items: center; padding: 0 10px !important; border: 1px solid var(--line) !important; border-radius: var(--r-sm) !important;
  color: var(--text-2) !important; background: var(--card) !important; font-size: var(--fs-sm); font-weight: 600; }
.cw-notify .modern-pagination .page-link:hover { border-color: var(--line-strong) !important; color: var(--ink) !important; }
.cw-notify .modern-pagination .page-item.active .page-link { background: var(--inverse) !important; border-color: var(--inverse) !important; color: var(--on-inverse) !important; }
.cw-notify .modern-pagination .page-item.disabled .page-link { opacity: .45; background: var(--card) !important; }
.cw-notify #notifications-page-loader:not(.hidden) { background: color-mix(in srgb, var(--bg) 70%, transparent); animation: cw-nload .3s step-end both; }
.cw-notify #notifications-page-loader .spinner-border { width: 28px !important; height: 28px !important; border-width: 3px; color: var(--accent) !important; }
.cw-notify #notifications-page-loader #notifications-page-loader-text { font-size: var(--fs-md); color: var(--text-2); }
@keyframes cw-nload { from { visibility: hidden; } to { visibility: visible; } }

/* Live UI kit page (/UiKit, Pages/UiKit) — only its own layout; every component on it is the kit's own */
.cw-kitpage__wrap { display: flex; flex-direction: column; gap: var(--s4); }
.cw-kitpage__wrap > .cw-card + .cw-card { margin-top: 0; }
.cw-kitpage__wrap > .cw-card { scroll-margin-top: 120px; }
.cw-kitpage__intro .cw-card__hd { flex-wrap: wrap; }
.cw-kitpage .cw-spacer { flex: 1 1 auto; }
.cw-kitpage__cap { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.cw-kitpage .cw-sw code { display: block; font-size: var(--fs-xs); }
.cw-kitpage .cw-sw i { border-bottom: 1px solid var(--line-2); }
.cw-kitpage__series { display: flex; gap: 6px; }
.cw-kitpage__series span { width: 44px; height: 22px; border-radius: var(--r-sm); }
.cw-kitpage .cw-typerow code { width: 150px; }
.cw-kitpage__shape { width: 92px; height: 64px; display: grid; place-items: center; text-align: center; background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-xs); color: var(--text-2); line-height: 1.4; }
.cw-kitpage__shape--sh { background: var(--card); border-color: transparent; border-radius: var(--r-lg); }
.cw-kitpage__logo { display: flex; flex-direction: column; gap: var(--s2); align-items: flex-start; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.cw-kitpage__logo img { height: 34px; }
.cw-kitpage__logo span { font-size: var(--fs-xs); color: #6b7280; }
.cw-kitpage__logo--dark { background: #0e1116; border-color: #2b313c; }
.cw-kitpage__logo--dark span { color: #8a93a2; }
.cw-kitpage__bar.modal-footer { display: block !important; padding: 0 !important; margin: 0 !important; border: 0 !important; }
.cw-kitpage__bar .cw-factions-bar { position: static !important; border: 1px solid var(--line) !important; border-radius: var(--r-lg) !important; }
.cw-kitpage__kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cw-kitpage__people { display: flex; flex-wrap: wrap; gap: var(--s3); }
.cw-kitpage__person { display: inline-flex; align-items: center; gap: var(--s2); padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: var(--r-pill); cursor: default; }
.cw-kitpage__person b { display: block; font-size: var(--fs-sm); color: var(--ink); line-height: 1.2; }
.cw-kitpage__person small { display: block; font-size: var(--fs-xs); color: var(--muted); line-height: 1.2; }
.cw-kitpage__person:hover { border-color: var(--line-strong); background: var(--hover); }
.cw-kitpage__seg-on { background: var(--inverse); color: var(--on-inverse) !important; }
.cw-kitpage__narrow { max-width: 220px; }
.cw-kitpage__sects { padding: 0 !important; display: block !important; }
.cw-kitpage__tabs { margin: 0; }
.cw-kitpage__empty { padding: var(--s6) var(--s5); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.cw-kitpage .cw-sep { width: 1px; height: 22px; background: var(--line); display: inline-block; }
.cw-kitpage__logo img { height: 34px !important; width: auto !important; max-width: 240px; }
.cw-kitpage .cw-kit-toc a { text-decoration: none !important; }
.cw-kitpage__intro .cw-card__hd .cw-sub { flex: 1 1 300px; min-width: 0; }
.cw-kitpage__intro .cw-spacer { display: none; }
.cw-kitpage .cw-kit-logos { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.cw-kitpage__toc { position: sticky; top: calc(var(--h-top) + 6px); z-index: 7; margin-top: calc(var(--s2) * -1); }
.cw-kitpage__toc .cw-kit-toc { position: static; padding: 6px var(--s3); }
.cw-kitpage__toc { top: calc(var(--h-top) - 2px); box-shadow: 0 -10px 0 2px var(--bg), var(--sh-1); }

/* ---------------- Org module (org.css) on the kit ---------------- */
/* the page gutter comes from main only: a p-* wrapper round the page content adds none */
:root .dashboard__body main.detail__content > .dashboard__content > :is(.p-1, .p-2, .p-3, .p-4) { padding: 0 !important; }
/* module and view navs: underline tabs on one row (cw-ui.js moves what does not fit into More) */
:root .org-nav { flex-wrap: nowrap; gap: 0; align-items: flex-end; min-width: 0; padding-bottom: 0; margin-bottom: var(--s4); border-bottom: 1px solid var(--line) !important; }
:root .org-nav > a, :root .cw-navmore__btn { flex: 0 0 auto; padding: 9px 12px !important; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; border-radius: 0 !important; background: transparent !important;
  color: var(--text-2) !important; font-size: var(--fs-md); font-weight: 600; white-space: nowrap; text-decoration: none; }
:root .org-nav > a:hover, :root .cw-navmore__btn:hover { color: var(--ink) !important; }
:root .org-nav > a.active, :root .cw-navmore.has-active > .cw-navmore__btn { color: var(--accent) !important; border-bottom-color: var(--accent); }
:root .org-nav > .org-co { margin-left: auto; align-self: center; padding: 0 0 6px var(--s3); }
:root .org-nav > label { align-self: center; margin: 0 0 0 auto; padding-bottom: 6px; }
.cw-navmore { position: relative; flex: 0 0 auto; display: flex; }
.cw-navmore[hidden] { display: none; }
.cw-navmore__btn { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.cw-navmore__menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 1000; min-width: 200px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-2); }
.cw-navmore__menu[hidden] { display: none; }
:root .cw-navmore__menu > a { display: block; padding: 7px 12px; border-radius: var(--r-sm); color: var(--text) !important; font-size: var(--fs-md); text-decoration: none; white-space: nowrap; background: transparent !important; }
:root .cw-navmore__menu > a:hover { background: var(--hover) !important; }
:root .cw-navmore__menu > a.active { color: var(--accent) !important; font-weight: 600; background: var(--accent-soft) !important; }
/* cards, titles and the "not live yet" note on kit tokens */
:root .org-card { border: 1px solid var(--line) !important; border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: var(--s4); margin-bottom: var(--s4); }
:root .org-title h1 { font-size: 18px; font-weight: 700; color: var(--ink); }
:root .org-sub { color: var(--muted); font-size: var(--fs-sm); }
:root .org-warn { border: 1px solid var(--wip-line) !important; background: var(--wip-bg) !important; color: var(--text) !important; border-radius: var(--r-md); }

/* A native file picker reads as a kit secondary button (Org Import, legacy upload forms) */
:root input[type=file]::file-selector-button { height: 26px; margin: 0 10px 0 0; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: var(--text); font: 600 var(--fs-sm) var(--font); cursor: pointer; }
:root input[type=file]::file-selector-button:hover { background: var(--hover); border-color: var(--line-strong); }

/* UI kit page — mobile app section (phone frames + component map) */
.cw-kitpage__phones { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s4); }
.cw-kitpage__phone { margin: 0; display: flex; flex-direction: column; gap: var(--s2); }
.cw-kitpage__phone-frame { border: 6px solid var(--ink); border-radius: 26px; overflow: hidden; background: var(--ink); box-shadow: 0 6px 18px rgba(14, 21, 38, .14); }
.cw-kitpage__phone-frame img { display: block; width: 100%; height: auto; }
.cw-kitpage__phone figcaption { font-size: var(--fs-xs); color: var(--text-2); line-height: 1.4; }
.cw-kitpage__map { width: 100%; border-collapse: collapse; margin-top: var(--s2); font-size: var(--fs-sm); }
.cw-kitpage__map th { text-align: left; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.cw-kitpage__map td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
.cw-kitpage__map td:first-child { color: var(--ink); }
.cw-kitpage__map code { font-size: var(--fs-xs); }
.cw-kitpage__note { margin: 0; font-size: var(--fs-xs); color: var(--muted); }

/* ---------------- Home (Pages/Index): the signed-in user's work hub, on one 3-column grid ----------------
   Every row uses the same three columns (wide cards span two), cards in a row are the same height, headers, list
   rows and footers have fixed heights, and the long list (My work) scrolls inside its card so the row ends level. */
.cw-ent.cw-td { background: var(--info-bg); color: var(--info); }
.cw-ent.cw-pj { background: #f0f9ff; color: #0369a1; }
.cw-ent.cw-ms { background: #f5f3ff; color: #6d28d9; }
.cw-ent.cw-ra { background: #eef0fd; color: #4338ca; }
:root[data-theme="dark"] .cw-ent.cw-pj { background: rgba(56, 189, 248, .14); color: #7dd3fc; }
:root[data-theme="dark"] .cw-ent.cw-ms { background: rgba(167, 139, 250, .16); color: #c4b5fd; }
:root[data-theme="dark"] .cw-ent.cw-ra { background: rgba(129, 140, 248, .16); color: #a5b4fc; }
.cw-home { display: flex; flex-direction: column; gap: var(--s4); }
.cw-home__hd { display: flex; align-items: center; gap: var(--s3); min-height: 44px; }
.cw-home__hd > div:first-child { flex: 1 1 auto; min-width: 0; }
.cw-home__hd h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.cw-home__hd .cw-muted { font-size: var(--fs-sm); }
.cw-home__btn { height: var(--h-btn); padding: 0 var(--s4); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: var(--fs-md); font-weight: 600; display: inline-flex; align-items: center; gap: var(--s2); white-space: nowrap; text-decoration: none; }
.cw-home__btn:hover { background: var(--hover); border-color: var(--line-strong); color: var(--ink); }
.cw-home__btn svg { width: 15px; height: 15px; }
.cw-home__btn--sm { height: 28px; padding: 0 var(--s3); font-size: var(--fs-sm); }
.cw-home__new .dropdown-menu { min-width: 220px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-2); background: var(--card); }
.cw-home__new .dropdown-item { display: flex; align-items: center; gap: var(--s3); padding: 7px 10px; border-radius: var(--r-sm); font-size: var(--fs-md); font-weight: 600; color: var(--text); }
.cw-home__new .dropdown-item:hover { background: var(--hover); color: var(--ink); }
.cw-home__new .dropdown-item .cw-ic { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-sm); flex: 0 0 auto; }
.cw-home__new .dropdown-item .cw-ic svg { width: 15px; height: 15px; }
/* the grid */
.cw-home__g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); align-items: stretch; }
.cw-home__g6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s4); }
.cw-home__s2 { grid-column: span 2; }
.cw-home__s3 { grid-column: 1 / -1; }
.cw-home__stack { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.cw-home .cw-card { margin: 0; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.cw-home__stack > .cw-card { flex: 1 1 auto; }
.cw-home .cw-card__hd { height: 48px; min-height: 48px; padding: 0 var(--s5); flex: 0 0 auto; box-sizing: border-box; }
.cw-home .cw-card__hd h3 { font-size: var(--fs-lg); white-space: nowrap; }
.cw-home .cw-card__hd .cw-sub { font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cw-home .cw-bar5 { width: 3px; height: 18px; }
.cw-home__bd { padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s2); flex: 1 1 auto; min-height: 0; }
.cw-home__ft { margin-top: auto; height: 42px; box-sizing: border-box; padding: 0 var(--s5); border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); color: var(--muted); flex: 0 0 auto; min-width: 0; }
.cw-home__ft > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-home__ft.cw-crit-t { color: var(--crit); font-weight: 700; }
.cw-home__fill { position: relative; flex: 1 1 auto; min-height: 336px; }
.cw-home__scroll { position: absolute; inset: 0; overflow: auto; scrollbar-width: thin; }
.cw-home__big { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.cw-home__meta { font-size: var(--fs-sm); color: var(--muted); }
.cw-home__line { font-size: var(--fs-md); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; display: block; }
a.cw-home__line:hover { color: var(--accent); }
/* totals: six tiles, two per grid column */
.cw-home .cw-kpi { display: flex; flex-direction: column; justify-content: space-between; height: 84px; box-sizing: border-box; text-decoration: none; min-width: 0; }
.cw-home .cw-kpi .cw-lbl, .cw-home .cw-kpi .cw-foot { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-home .cw-kpi .cw-val { line-height: 1; margin: 0; }
/* list rows: one height, fixed columns for chip / status / due */
.cw-home .cw-task { height: 56px; box-sizing: border-box; padding: 0 var(--s5); gap: var(--s3); text-decoration: none; color: inherit; }
.cw-home__list > .cw-task:first-child, .cw-home__scroll > .cw-task:first-child { border-top: 0; }
.cw-home .cw-task:hover { background: var(--hover); }
.cw-home .cw-task .cw-ent { flex: 0 0 140px; box-sizing: border-box; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.cw-home .cw-task .cw-ttl { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.cw-home .cw-task .cw-ttl b { display: block; color: var(--ink); font-size: var(--fs-md); font-weight: 600; }
.cw-home .cw-task .cw-ttl span { font-size: var(--fs-xs); }
.cw-home .cw-task > svg { color: var(--faint); flex: 0 0 14px; width: 14px; height: 14px; }
/* the status shows in full ("Schedule meeting" was cut at both ends in a fixed 92px pill); short ones keep that width */
.cw-home__st { flex: 0 0 auto; min-width: 92px; max-width: 180px; box-sizing: border-box; height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--idle-line); background: var(--idle-bg); color: var(--idle); }
.cw-home__st.cw-ok { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok); }
.cw-home__st.cw-wip { border-color: var(--wip-line); background: var(--wip-bg); color: var(--wip); }
.cw-home__st.cw-crit { border-color: var(--crit-line); background: var(--crit-bg); color: var(--crit); }
.cw-home__st.cw-info { border-color: var(--info-line); background: var(--info-bg); color: var(--info); }
.cw-home .cw-home__due { flex: 0 0 112px; margin-left: 0; text-align: right; font-size: var(--fs-xs); line-height: 1.35; color: var(--muted); }
.cw-home .cw-home__due b { display: block; font-size: var(--fs-sm); color: var(--text-2); }
.cw-home .cw-due-overdue b { color: var(--crit); }
.cw-home .cw-due-today b, .cw-home .cw-due-week b { color: var(--wip); }
.cw-home .cw-due-none b { color: var(--faint); font-weight: 600; }
/* My work: when filter + module chips */
.cw-home__seg { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--card); }
.cw-home__seg button { border: 0; border-left: 1px solid var(--line); background: transparent; padding: 0 10px; height: 28px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.cw-home__seg button:first-child { border-left: 0; }
.cw-home__seg button b { min-width: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--chip-bg); color: var(--text-2); font-size: 11px; line-height: 17px; text-align: center; }
.cw-home__seg button:hover { background: var(--hover); color: var(--ink); }
.cw-home__seg button.cw-on { background: var(--accent-soft); color: var(--accent); }
.cw-home__seg button.cw-on b { background: var(--accent); color: #fff; }
.cw-home__chips { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; height: 46px; box-sizing: border-box; align-items: center; padding: 0 var(--s5); border-bottom: 1px solid var(--line-2); background: var(--surface-3); flex: 0 0 auto; scrollbar-width: thin; }
.cw-home__chip { flex: 0 0 auto; height: 26px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--card); font-size: 11.5px; font-weight: 600; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.cw-home__chip small { font-size: 10.5px; opacity: .75; }
.cw-home__chip:hover { border-color: var(--line-strong); color: var(--ink); }
.cw-home__chip.cw-on { border-color: var(--ink); background: var(--ink); color: var(--card); }
.cw-home__chip[hidden], .cw-home__wi[hidden] { display: none !important; }
.cw-home__none { padding: 28px var(--s5); text-align: center; font-size: var(--fs-md); color: var(--muted); }
/* meetings */
.cw-home__when { flex: 0 0 84px; display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.cw-home__when b { font-size: var(--fs-sm); color: var(--ink); }
.cw-home__when span { font-size: var(--fs-xs); color: var(--muted); }
.cw-home__mtt { flex: 1 1 auto; min-width: 0; text-decoration: none; color: inherit; display: flex; flex-direction: column; border-left: 3px solid var(--info-line); padding-left: var(--s3); }
.cw-home__mtt b { color: var(--ink); font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-home__mtt span { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-home .cw-live .cw-home__mtt { border-left-color: var(--ok); }
.cw-home__join { flex: 0 0 30px; display: inline-grid; place-items: center; width: 30px; height: 30px; box-sizing: border-box; border-radius: var(--r-md); border: 1px solid var(--line); color: var(--info); background: var(--card); }
.cw-home__join:hover { background: var(--info-bg); border-color: var(--info-line); }
.cw-home__join svg { width: 15px; height: 15px; }
.cw-home__joinx { flex: 0 0 30px; }
.cw-home__sk { height: 40px; margin: 8px var(--s5); border-radius: var(--r-md); background: linear-gradient(90deg, var(--surface-3) 0%, var(--line-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: cw-home-sk 1.2s ease-in-out infinite; }
@keyframes cw-home-sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }
/* projects */
.cw-home__pj { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); flex: 1 1 auto; }
.cw-home__pj > a { padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s2); border-left: 1px solid var(--line-2); text-decoration: none; color: inherit; min-width: 0; }
.cw-home__pj > a:first-child { border-left: 0; }
.cw-home__pj > a:hover { background: var(--hover); }
.cw-home__pj .cw-ent { align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cw-home__pj b { font-size: var(--fs-md); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-home__pj .cw-home__meta { font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-home__prog { margin-top: auto; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.cw-home__prog i { display: block; height: 100%; border-radius: 3px; background: var(--info); }
.cw-home__pjs { font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); }
.cw-home__pjs.cw-crit { color: var(--crit); } .cw-home__pjs.cw-ok { color: var(--ok); } .cw-home__pjs.cw-wip { color: var(--wip); }
/* stat tiles (resource requests) */
.cw-home__stats { display: flex; gap: var(--s2); }
.cw-home__stat { flex: 1 1 0; min-width: 0; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
a.cw-home__stat:hover { border-color: var(--line-strong); background: var(--hover); }
.cw-home__stat span { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); line-height: 1.25; }
.cw-home__stat b { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
/* small bar charts (effort, kaizens) */
.cw-home__bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s2); align-items: end; height: 104px; }
.cw-home__col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.cw-home__col > span { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.cw-home__col > em { display: flex; flex-direction: column-reverse; width: 24px; min-height: 4px; border-radius: 4px 4px 2px 2px; overflow: hidden; background: var(--line-2); font-style: normal; }
.cw-home__col > em > i { display: block; }
.cw-home__col.cw-today > span { color: var(--ink); font-weight: 700; }
.cw-home__legend { display: flex; gap: var(--s3); font-size: var(--fs-xs); color: var(--text-2); white-space: nowrap; overflow: hidden; }
.cw-home__legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
/* recently opened: three across, on the grid's columns */
.cw-home__recent { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cw-home__recent > .cw-task { border-top: 0; border-left: 1px solid var(--line-2); }
.cw-home__recent > .cw-task:first-child { border-left: 0; }
.cw-home .cw-empty.cw-compact { padding: 24px var(--s5); }
@media (max-width: 1279px) {
  .cw-home__g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cw-home__g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cw-home__s2 { grid-column: 1 / -1; }
}

/* Purchase Order view: the Download button's icon and text centred */
#poFileDownloadBtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
