/* UniControl Tower: four staff modules (Planning, Invoice to cash, Pathways, Retention) and the student My pathway page.
   The staff page is hue-rotated (staff.css); the top-level blocks below are counter-rotated so blue stays blue and red stays red. */
body.staff :is(.tw-ai, .tw-kpis, .tw-flow, .tw-case, .tw-rows, .tw-scroll, .pl-opts, .iv-buckets, .pw-gaps, .tw-phone, .tw-review, .tw-done, .st-case, .tw-chip, .pw-key, .rt-tl, .ivx) { filter: hue-rotate(65deg); }
body.staff :is(.tw-ai, .tw-kpis, .tw-flow, .tw-case, .tw-rows, .tw-scroll, .pl-opts, .iv-buckets, .pw-gaps, .tw-phone, .tw-review, .tw-done, .st-case, .tw-chip, .pw-key, .rt-tl, .st-tiles, .ivx) :is(.tw-ai, .tw-kpis, .tw-flow, .tw-case, .tw-rows, .tw-scroll, .pl-opts, .iv-buckets, .pw-gaps, .tw-phone, .tw-review, .tw-done, .st-case, .tw-chip, .pw-key, .rt-tl) { filter: none; }
body.staff .demo-reset { display: inline-flex !important; }
.tw section { min-width: 0; }
.tw-lbl { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5d6680; margin-bottom: 6px; }
.tw-ai { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; padding: 16px 18px; border: 1px solid #cfd9fb; border-radius: 14px; background: #f6f8ff; margin-bottom: 20px; }
.tw-ai p { margin: 0; font-size: 14px; line-height: 1.5; color: #3a4360; }
.tw-ai .tw-lbl { color: #2448c8; }
.tw-ai .tw-demo { grid-column: 1 / -1; font-size: 12px; color: #6a7390; }
.tw-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tw-kpis > div { padding: 14px 16px; border: 1px solid #e3e6f0; border-radius: 12px; background: #fff; }
.tw-kpis > div.chg { border-color: #2448c8; box-shadow: 0 0 0 1px #2448c8 inset; }
.tw-kpis b { display: block; font-size: 22px; color: #14204a; line-height: 1.2; }
.tw-kpis span { font-size: 13px; color: #5d6680; }
.tw-kpis em { display: block; font-style: normal; font-size: 12px; font-weight: 700; color: #1a7f5a; margin-top: 4px; }
.tw-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; counter-reset: s; }
.tw-flow li { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-top: 3px solid #e3e6f0; font-size: 12px; line-height: 1.35; color: #6a7390; }
.tw-flow li.done { border-top-color: #2448c8; color: #3a4360; }
.tw-flow li.now { border-top-color: #e07b00; color: #14204a; font-weight: 700; }
.tw-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: #eef0f5; color: #5d6680; }
.done .tw-n { background: #2448c8; color: #fff; }
.now .tw-n { background: #e07b00; color: #fff; }
.tw-case { padding: 20px; border: 1px solid #e3e6f0; border-left: 4px solid #2448c8; border-radius: 12px; background: #fff; }
.tw-case > p { margin: 0 0 14px; line-height: 1.55; color: #3a4360; }
.tw-case .section-head h2 { font-size: 16px; }
.tw-case .section-head h2::before { display: none; }
.tw-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tw .btn, .tw-case .btn, .tw-done .btn, .tw-review .btn, .tw-rows .btn, .tw-scroll .btn { color: #2448c8 !important; border-color: #2448c8 !important; background: #fff; }
.tw .btn.primary, .tw-case .btn.primary, .tw-scroll .btn.primary, .tw-review .btn.primary, .tw-done .btn.primary { background: #2448c8 !important; color: #fff !important; }
.tw .btn:hover { background: #eaf0ff; }
.tw .btn.primary:hover { background: #1b39a6 !important; }
.tw-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tw-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tw-chip.ok { color: #13684a; background: #e3f4ec; }
.tw-chip.warn { color: #8a5300; background: #fdf0d9; }
.tw-chip.bad { color: #b42318; background: #fde7e5; }
.tw-chip.info { color: #2448c8; background: #e6ecff; }
.tw-note { font-size: 13px; color: #5d6680; line-height: 1.5; margin: 6px 0 0; }
.tw-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; font-size: 14px; }
.tw-dl dt { color: #5d6680; }
.tw-dl dd { margin: 0; color: #14204a; font-weight: 600; }
.tw-dl.wide { grid-template-columns: repeat(3, auto 1fr); }
.tw-rows { display: grid; gap: 8px; }
.tw-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 12px 14px; border: 1px solid #e3e6f0; border-radius: 10px; background: #fff; font-size: 14px; color: #3a4360; }
.tw-row b { color: #14204a; }
.tw-row small, .tw-tbl small { display: block; color: #6a7390; font-size: 12px; margin-top: 2px; }
.tw-grow { flex: 1 1 260px; min-width: 0; }
.tw-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e3e6f0; border-radius: 12px; background: #fff; }
.tw-tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.tw-tbl th, .tw-tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eef0f5; vertical-align: top; color: #3a4360; }
.tw-tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #5d6680; background: #fafbfe; }
.tw-tbl .num { text-align: right; white-space: nowrap; }
.tw-tbl tr.demo td { background: #f3f6ff; }
.tw-tbl tr.closed td { color: #6a7390; }
.tw-tag { display: inline-block; margin: 0 4px 4px 0; padding: 2px 8px; border-radius: 8px; background: #eef0f5; font-size: 12px; color: #3a4360; }
.tw-review, .tw-done { margin-top: 16px; padding: 18px; border-radius: 12px; border: 1px solid #cfd9fb; background: #f6f8ff; }
.tw-done { border-color: #b7e0cb; background: #f0faf5; }
.tw-done > b { color: #13684a; }
.tw-done > p, .tw-review > p { margin: 6px 0 0; font-size: 14px; color: #3a4360; }
.tw-review h3 { margin: 0 0 6px; font-size: 18px; color: #14204a; }
.tw-list, .tw-checks { margin: 10px 0; padding-left: 18px; font-size: 14px; line-height: 1.7; color: #3a4360; }
.tw-checks { list-style: none; padding-left: 0; }
.tw-checks li::before { content: '✓ '; color: #1a7f5a; font-weight: 700; }
.tw-msg { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px solid #e3e6f0; }
.tw-msg p { margin: 0; font-size: 14px; color: #14204a; line-height: 1.5; }
.tw-field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 13px; color: #5d6680; }
.tw-field textarea, .tw-field select, .tw-field input { font: inherit; font-size: 14px; line-height: 1.5; padding: 10px 12px; border: 1px solid #d5dae8; border-radius: 10px; background: #fff; color: #14204a; width: 100%; box-sizing: border-box; min-height: 44px; }
.tw-time { list-style: none; margin: 8px 0 0; padding: 0 0 0 14px; border-left: 2px solid #d5dae8; font-size: 14px; color: #3a4360; }
.tw-time li { position: relative; padding: 4px 0 10px; }
.tw-time li::before { content: ''; position: absolute; left: -20px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: #2448c8; }
.tw-time li > span { display: block; font-size: 12px; font-weight: 700; color: #5d6680; }
.tw-time small { color: #6a7390; }
.st-case { display: inline-block; align-self: flex-start; padding: 4px 10px; border-radius: 10px; background: #fff4e5; color: #8a5300; font-size: 13px; font-weight: 600; }
/* M1 planning */
.pl-grid { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.pl-grid th { padding: 8px; font-size: 12px; color: #5d6680; background: #fafbfe; border-bottom: 1px solid #eef0f5; text-align: left; }
.pl-grid tbody th { width: 56px; vertical-align: top; }
.pl-grid td { padding: 4px; border: 1px solid #eef0f5; vertical-align: top; height: 64px; }
.pl-s { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; margin-bottom: 4px; border-radius: 8px; background: #eef2ff; border-left: 3px solid #6d82e0; color: #3a4360; }
.pl-s b { color: #14204a; font-size: 12px; }
.pl-s.bad { background: #fde7e5; border-left-color: #c8323a; }
.pl-s.new { background: #e3f4ec; border-left-color: #1a7f5a; }
.pl-s em { font-style: normal; font-weight: 700; font-size: 11px; color: #b42318; }
.pl-s.new em { color: #13684a; }
.pl-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.pl-opt { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid #e3e6f0; border-radius: 12px; background: #fafbfe; }
.pl-opt.on { border-color: #2448c8; background: #f3f6ff; }
.pl-opt header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pl-opt header b { flex: 1 1 140px; color: #14204a; }
.pl-k { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #2448c8; color: #fff; font-weight: 700; }
.pl-opt .btn { margin-top: auto; align-self: flex-start; }
.tw-phone { max-width: 360px; border: 1px solid #d5dae8; border-radius: 22px; padding: 14px; background: #fff; box-shadow: 0 6px 20px rgba(20,30,70,.08); margin-top: 8px; }
.tw-ph-top { font-size: 12px; font-weight: 700; color: #5d0282; padding-bottom: 10px; border-bottom: 1px solid #eef0f5; margin-bottom: 8px; }
.tw-ph-alert { padding: 10px 12px; border-radius: 10px; background: #fff4e5; color: #6b4200; font-size: 13px; margin-bottom: 8px; }
.tw-ph-row { display: grid; grid-template-columns: 78px 1fr; gap: 0 8px; padding: 6px 4px; border-bottom: 1px solid #f2f3f7; font-size: 13px; color: #3a4360; }
.tw-ph-row small { grid-column: 2; color: #6a7390; }
.tw-ph-row b { color: #14204a; }
.tw-ph-row.new { background: #e3f4ec; border-radius: 8px; }
/* M2 invoice */
.iv-buckets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.iv-buckets > div { padding: 14px 16px; border: 1px solid #e3e6f0; border-radius: 12px; background: #fff; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: #5d6680; }
.iv-buckets b { font-size: 20px; color: #14204a; }
.iv-buckets i { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: #2448c8; }
.iv-buckets > div:nth-child(3) i { background: #e07b00; }
.iv-buckets > div:nth-child(4) i { background: #c8323a; }
.iv-q { min-width: 860px; }
/* M2 list and detail, agent steps (blue), person steps (amber), blocked (red), done (green) */
.ivx { --ag: #2f55d4; --ag-bg: #e8eeff; --pe: #c98a12; --pe-bg: #fdf3dc; --pe-ink: #7a5208; --bl: #c0392b; --bl-bg: #fde8e5; --ok: #2e7d4f; --ok-bg: #e4f3ea; --line: #e3e7f1; --ink: #18224a; --mut: #66708c;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; color: var(--ink); }
.iv-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(20, 32, 74, .04), 0 6px 18px rgba(20, 32, 74, .04); margin-bottom: 18px; min-width: 0; }
.iv-mono { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mut); }
.iv-head { padding: 20px 22px; background: linear-gradient(180deg, #fbfcff, #fff); }
.iv-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: flex-end; }
.iv-title { margin: 6px 0 4px; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; color: #1d2b6b; font-weight: 700; }
.iv-sub { margin: 0; color: #4a5372; font-size: 15px; }
.iv-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.iv-fp { font: inherit; font-size: 14px; min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid #d6dbea; background: #fff; color: #2a3563; cursor: pointer; }
.iv-fp[aria-pressed="true"] { border-color: #1d2b6b; box-shadow: 0 0 0 1px #1d2b6b inset; background: #eef1fb; font-weight: 700; }
.iv-count { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: 15px; color: #4a5372; }
.iv-count > span { display: inline-flex; align-items: center; gap: 7px; }
.iv-count b { font-size: 17px; color: var(--ink); }
.iv-count i, .iv-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.agent > i { background: var(--ag); } .person > i { background: var(--pe); } .blocked > i { background: var(--bl); } .closed > i { background: var(--ok); }
.iv-count .agent i { animation: ivPulse 14s ease-in-out infinite; }
.iv-tablecard { overflow: hidden; }
.iv-tw { overflow-x: auto; position: relative; }
.iv-t { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 14px; }
.iv-t th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); padding: 14px 14px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.iv-t td { padding: 14px; border-bottom: 1px solid #eef0f6; vertical-align: middle; }
.iv-t tbody tr { cursor: pointer; transition: background .15s; }
.iv-t tbody tr:hover, .iv-t tbody tr:focus-visible { background: #f6f8fe; outline: none; }
.iv-t tbody tr.demo { background: #fbfaf4; }
.iv-t tbody tr:last-child td { border-bottom: 0; }
.iv-t .num { text-align: right; white-space: nowrap; }
.iv-t td b { color: var(--ink); }
.iv-t td small { display: block; color: var(--mut); font-size: 13px; margin-top: 2px; }
.iv-demo { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ag); background: var(--ag-bg); border-radius: 6px; padding: 1px 6px; vertical-align: 2px; }
.iv-src { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 4px 9px; border-radius: 7px; border: 1px solid #cdd5f0; background: #f2f5ff; color: #2a3a8f; white-space: nowrap; }
.iv-src.housing { border-color: #d8cdee; background: #f6f2ff; color: #5a3c99; }
.iv-src.workstudy { border-color: #c9e0dc; background: #eff8f6; color: #1f6157; }
.iv-step { display: block; font-size: 14px; color: var(--ink); white-space: nowrap; margin-bottom: 6px; }
.iv-bar { display: flex; gap: 4px; }
.iv-bar i { width: 20px; height: 4px; border-radius: 2px; background: #e6e9f2; position: relative; overflow: hidden; }
.iv-bar i.done { background: var(--ok); }
.iv-bar i.agent { background: #b9c7f5; }
.iv-bar i.agent::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--ag), transparent); animation: ivShimmer 11s linear infinite; }
.iv-bar i.person { background: var(--pe); animation: ivBlink 18s ease-in-out infinite; }
.iv-bar i.blocked { background: var(--bl); }
.iv-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 16px; font-size: 13px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.iv-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.iv-pill.agent { color: #2443b0; background: var(--ag-bg); border-color: #cbd6fa; animation: ivGlowA 16s ease-in-out infinite; }
.iv-pill.agent::before { animation: ivPulse 12s ease-in-out infinite; }
.iv-pill.person { color: var(--pe-ink); background: var(--pe-bg); border-color: #efd391; animation: ivGlowP 22s ease-in-out infinite; }
.iv-pill.blocked { color: #fff; background: var(--bl); }
.iv-pill.blocked::before { background: #fff; }
.iv-pill.closed { color: #1f6a3f; background: var(--ok-bg); border-color: #bfe0cb; }
.iv-pill.closed::before { display: none; }
.iv-since { color: var(--mut); white-space: nowrap; }
.iv-chev { color: #9aa2bd; font-size: 22px; text-align: right; }
.iv-foot { font-size: 13px; color: var(--mut); margin: -6px 0 18px; }
.ivx .tw-kpis { margin-bottom: 18px; }
/* detail */
.iv-back { margin-bottom: 8px; }
.iv-back .link { font-size: 15px; }
.iv-dhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; }
.iv-dhead > div:first-child { min-width: 0; flex: 1 1 360px; }
.iv-dhead .iv-title { margin-top: 8px; }
.iv-ref { margin: 0; color: var(--mut); font-size: 14px; }
.iv-dright { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.iv-before { font-size: 13px; color: #4a5372; border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 6px 14px; }
.iv-before b { color: var(--ink); } .iv-before b.g { color: var(--ok); }
.iv-amt { font-size: 30px; font-weight: 700; color: #1d2b6b; }
.iv-stepcard { padding: 16px 18px 12px; }
.iv-sc-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.iv-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--mut); }
.iv-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.iv-sscroll { overflow-x: auto; padding-bottom: 4px; }
.iv-stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(112px, 1fr)); min-width: 784px; }
.iv-node { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 6px 6px 12px; border-radius: 12px; font-size: 13px; color: var(--mut); }
.iv-node::before { content: ''; position: absolute; top: 23px; left: 0; right: 0; height: 2px; background: #e3e7f1; z-index: 0; }
.iv-node:first-child::before { left: 50%; } .iv-node:last-child::before { right: 50%; }
.iv-node.done::before { background: var(--ok); }
.iv-dot { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px dashed #c9cfe0; color: #9aa2bd; font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.iv-node b { color: var(--ink); font-size: 14px; }
.iv-node em { font-style: normal; font-weight: 600; color: var(--ok); }
.iv-node code { font-family: var(--mono); font-size: 11px; color: #8890ab; word-break: break-word; }
.iv-node.done .iv-dot { background: var(--ok); border: 0; color: #fff; }
.iv-node.skip .iv-dot { border-style: solid; }
.iv-node.skip em, .iv-node.todo em { color: #9aa2bd; font-weight: 400; }
.iv-node.agent .iv-dot { border: 3px solid #cbd6fa; border-top-color: var(--ag); animation: ivSpin 9s linear infinite; }
.iv-node.agent em { color: var(--ag); }
.iv-node.person { background: #fffaf0; box-shadow: inset 0 -2px 0 var(--pe); }
.iv-node.person .iv-dot { border: 2px solid var(--pe); background: var(--pe-bg); color: var(--pe-ink); animation: ivRing 20s ease-out infinite; }
.iv-node.person em { color: var(--pe-ink); }
.iv-node.blocked { background: #fff6f5; box-shadow: inset 0 -2px 0 var(--bl); }
.iv-node.blocked .iv-dot { border: 0; background: var(--bl); color: #fff; }
.iv-node.blocked em { color: var(--bl); }
.iv-split { overflow: hidden; }
.iv-split-h { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.iv-split-h > b { font-size: 19px; color: var(--ink); flex: 1 1 auto; }
.iv-who { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 16px; font-size: 13px; font-weight: 600; background: var(--ag-bg); color: #2443b0; border: 1px solid #cbd6fa; }
.iv-who.person { background: var(--pe-bg); color: var(--pe-ink); border-color: #efd391; }
.iv-who.blocked { background: var(--bl-bg); color: var(--bl); border-color: #f3c3bd; }
.iv-who.closed { background: var(--ok-bg); color: #1f6a3f; border-color: #bfe0cb; }
.iv-split-b { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.iv-split-b > div { padding: 18px 20px; min-width: 0; }
.iv-split-b > div + div { border-left: 1px solid var(--line); background: #fcfdff; }
.iv-split-b .iv-mono { margin-bottom: 12px; }
.iv-dec { border: 1.5px solid #cbd6fa; background: #f7f9ff; border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.iv-dec.person { border-color: #ebcd85; background: #fffaf0; }
.iv-dec.blocked { border-color: #f0b8b0; background: #fff6f5; }
.iv-dec.closed { border-color: #bfe0cb; background: #f4fbf7; }
.iv-dec-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.iv-dec-h .iv-mono { margin: 0 !important; color: #2443b0; }
.iv-dec.person .iv-dec-h .iv-mono { color: var(--pe-ink); }
.iv-dec.blocked .iv-dec-h .iv-mono { color: var(--bl); }
.iv-dec.closed .iv-dec-h .iv-mono { color: #1f6a3f; }
.iv-dec h3 { margin: 10px 0 12px; font-size: 21px; color: #1d2b6b; }
.iv-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.iv-facts dt { font-size: 12px; color: var(--mut); }
.iv-facts dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); word-break: break-word; }
.iv-facts dd.ok { color: var(--ok); } .iv-facts dd.bad { color: var(--bl); }
.iv-dec .tw-field textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; line-height: 1.5; }
.iv-why { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.iv-why li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; font-size: 14px; line-height: 1.45; color: #2a3256; animation: ivIn 3.5s ease-out both; }
.iv-why li span { position: relative; padding-left: 18px; }
.iv-why li span::before { content: ''; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.iv-why li.person span::before { background: var(--pe); } .iv-why li.blocked span::before { background: var(--bl); } .iv-why li.agent span::before { background: var(--ag); }
.iv-why code { flex: none; font-family: var(--mono); font-size: 11px; color: #6a7392; background: #f0f2f8; border-radius: 5px; padding: 2px 6px; white-space: nowrap; }
.iv-tabcard { box-shadow: none; padding: 4px 14px 12px; margin: 0; }
.iv-tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.iv-tabs button { font: inherit; font-size: 15px; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 0; min-height: 44px; color: #4a5372; cursor: pointer; }
.iv-tabs button[aria-selected="true"] { color: #1d2b6b; border-bottom-color: #1d2b6b; font-weight: 600; }
.iv-mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.iv-mini th { text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.iv-mini td { padding: 8px; border-bottom: 1px solid #f0f2f8; }
.iv-mini .num { text-align: right; }
.iv-mini code { font-family: var(--mono); font-size: 12px; }
@keyframes ivPulse { 50% { opacity: .35; transform: scale(.8); } }
@keyframes ivShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes ivBlink { 50% { opacity: .45; } }
@keyframes ivGlowA { 50% { box-shadow: 0 0 0 4px rgba(47, 85, 212, .12); } }
@keyframes ivGlowP { 50% { box-shadow: 0 0 0 5px rgba(201, 138, 18, .18); background: #fbe8bd; } }
@keyframes ivRing { 0% { box-shadow: 0 0 0 0 rgba(201, 138, 18, .45); } 70%, 100% { box-shadow: 0 0 0 12px rgba(201, 138, 18, 0); } }
@keyframes ivSpin { to { transform: rotate(360deg); } }
@keyframes ivIn { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) {
  .ivx *, .ivx *::before, .ivx *::after { animation: none !important; transition: none !important; }
  .iv-bar i.agent { background: var(--ag); }
  .iv-node.agent .iv-dot { border-color: var(--ag); }
}
@media (max-width: 860px) {
  .iv-split-b { grid-template-columns: minmax(0, 1fr); }
  .iv-split-b > div + div { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .iv-head { padding: 16px; }
  .iv-split-b > div { padding: 14px; }
  .iv-split-h { padding: 12px 14px; }
  .iv-amt { font-size: 24px; }
  .iv-why li { flex-direction: column; gap: 4px; }
  .iv-why code { margin-left: 18px; }
  .iv-stepper { grid-template-columns: minmax(0, 1fr); min-width: 0; }
  .iv-node { flex-direction: row; flex-wrap: wrap; text-align: left; align-items: center; gap: 2px 10px; padding: 8px 10px 8px 54px; min-height: 52px; }
  .iv-node::before { top: 0; bottom: 0; left: 26px; right: auto; width: 2px; height: auto; }
  .iv-node:first-child::before { left: 26px; top: 50%; } .iv-node:last-child::before { right: auto; bottom: 50%; }
  .iv-dot { position: absolute; left: 9px; top: 50%; margin: -17px 0 0; }
  .iv-node b { flex: 1 1 100%; }
  .iv-node.person, .iv-node.blocked { box-shadow: inset 3px 0 0 var(--pe); }
  .iv-node.blocked { box-shadow: inset 3px 0 0 var(--bl); }
}
/* M3 pathways, student and staff */
.pw-gaps { display: grid; gap: 12px; }
.pw-g { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 10px; align-items: center; font-size: 14px; color: #3a4360; }
.pw-g b { font-size: 13px; font-weight: 600; color: #14204a; white-space: nowrap; }
.pw-gb { display: grid; gap: 3px; }
.pw-gb i { display: block; height: 7px; border-radius: 3px; }
.pw-gb .d, .pw-key.d { background: #2448c8; }
.pw-gb .c, .pw-key.c { background: #e07b00; }
.pw-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; margin: 0 4px 0 8px; }
.pw-key.a { background: #2448c8; } .pw-key.l { background: #e07b00; }
.pw-cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 20px 22px; margin: 8px 0 28px; border-radius: 16px; background: #f3eefa; border: 1px solid #e0d3f0; }
.pw-cta b { font-size: 18px; color: #2a0a4a; }
.pw-cta p { margin: 4px 0 0; max-width: 560px; color: #3d3748; }
.pw-intro { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-bottom: 20px; }
.pw-intro h2 { margin: 6px 0 8px; }
.pw-intro p { color: #3d3748; line-height: 1.55; }
.pw-kick { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b3fa0; }
.pw-ai { margin: 0; padding: 16px; border-radius: 14px; background: #faf8fc; border: 1px solid #ebe6f0; font-size: 14px; }
.pw-ai dt { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b3fa0; }
.pw-ai dd { margin: 2px 0 10px; color: #3d3748; line-height: 1.5; }
.pw-flow li.done { border-top-color: #6b3fa0; } .pw-flow .done .tw-n { background: #6b3fa0; }
.pw-ask { display: flex; gap: 10px; flex-wrap: wrap; }
.pw-ask .field { flex: 1 1 260px; min-width: 0; }
.pw .sq-chips button { color: #5d0282; background: #faf8fc; border-color: #e0d3f0; }
.pw-think { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: #5b5568; font-size: 14px; }
.pw-think span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #e0d3f0; border-top-color: #6b3fa0; animation: pwspin .8s linear infinite; }
@keyframes pwspin { to { transform: rotate(360deg); } }
.pw-recs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.pw-rec, .pw-role { padding: 18px; border: 1px solid #e6e1ec; border-radius: 14px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.pw-rec h3 { margin: 0; font-size: 17px; color: #2a0a4a; }
.pw-rec p { margin: 0; font-size: 14px; color: #3d3748; line-height: 1.5; }
.pw-rec .pw-why { color: #5b5568; }
.pw-rec .btn, .pw-rec .chip { align-self: flex-start; margin-top: auto; }
.pw-h3 { margin: 26px 0 12px; font-size: 18px; color: #2a0a4a; }
.pw-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.pw-role header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pw-role header b { display: block; color: #2a0a4a; }
.pw-role header span { font-size: 13px; color: #6b6478; }
.pw-fit { text-align: center; font-size: 12px; color: #6b6478; }
.pw-fit b { font-size: 22px; color: #1a7f5a !important; }
.pw-why-l, .pw-gap-l { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; line-height: 1.5; }
.pw-why-l li::before { content: '✓ '; color: #1a7f5a; font-weight: 700; }
.pw-gap-l li { color: #8a5300; }
.pw-gap-l li::before { content: 'Gap: '; font-weight: 700; }
html[lang="fr"] .pw-gap-l li::before { content: 'Écart : '; }
.pw-prof { display: grid; gap: 8px; }
.pw-item { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 14px 16px; border: 1px solid #e6e1ec; border-radius: 12px; background: #fff; }
.pw-item > div { flex: 1; min-width: 0; }
.pw-item.fixed { border-color: #b7e0cb; background: #f6fbf8; }
.pw-l { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #6b6478; }
.pw-item p { margin: 2px 0; color: #2a2433; }
.pw-item small { color: #6b6478; font-size: 12px; }
.pw-edit { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.pw-edit .field { flex: 1 1 100%; }
.pw-share { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pw-sel { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #6b6478; margin-bottom: 12px; }
.pw-toggles { display: grid; gap: 4px; }
.pw-tg { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0ecf4; }
.pw-prev { padding: 16px; border-radius: 14px; background: #faf8fc; border: 1px solid #ebe6f0; display: flex; flex-direction: column; gap: 8px; }
.pw-prev b { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #6b6478; }
.pw-prev p { margin: 0; font-size: 14px; color: #2a2433; }
.pw-prev .btn-primary, .pw-prev .btn { align-self: flex-start; }
/* M4 retention */
.rt-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.rt-two { gap: 24px; margin: 14px 0; }
.rt-tl { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; align-items: end; }
.rt-w { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: #5d6680; position: relative; padding-top: 16px; }
.rt-w.sig { background: #fff4f2; border-radius: 8px; }
.rt-bars { height: 90px; display: flex; gap: 3px; align-items: flex-end; }
.rt-bars i { display: block; width: 12px; border-radius: 2px 2px 0 0; }
.rt-bars .a { background: #2448c8; } .rt-bars .l { background: #e07b00; }
.rt-w b { font-size: 12px; color: #14204a; }
.rt-w em { position: absolute; top: 0; font-style: normal; font-weight: 700; color: #b42318; font-size: 10px; white-space: nowrap; }
.rt-sig { padding-left: 18px; }
.rt-resp { display: flex; flex-wrap: wrap; gap: 8px; }
.rt-opt { all: unset; box-sizing: border-box; cursor: pointer; min-height: 44px; padding: 8px 14px; border: 1px solid #d5dae8; border-radius: 12px; background: #fff; display: flex; flex-direction: column; font-size: 14px; color: #14204a; }
.rt-opt small { font-size: 11px; color: #1a7f5a; font-weight: 700; }
.rt-opt[aria-pressed="true"] { border-color: #2448c8; box-shadow: 0 0 0 1px #2448c8 inset; background: #f3f6ff; }
.rt-assign { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tw-bub { max-width: 88%; padding: 10px 12px; border-radius: 14px; font-size: 13px; line-height: 1.5; margin: 6px 0; }
.tw-bub small { display: block; font-weight: 700; color: #5d0282; margin-bottom: 2px; }
.tw-bub.in { background: #f3eefa; color: #2a2433; border-bottom-left-radius: 4px; }
.tw-bub.out { margin-left: auto; background: #5d0282; color: #fff; border-bottom-right-radius: 4px; }
.tw-ph-quick { display: flex; gap: 8px; margin-top: 6px; }
.tw-ph-quick span { padding: 6px 12px; border-radius: 14px; border: 1px solid #e0d3f0; font-size: 12px; color: #5d0282; }
@media (max-width: 860px) {
  .tw-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tw-dl.wide { grid-template-columns: auto 1fr; }
  .iv-buckets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pw-intro, .pw-share { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .tw-ai { grid-template-columns: 1fr; }
  .tw-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-assign { grid-template-columns: 1fr; }
  .pw-g { grid-template-columns: 1fr; gap: 4px; }
  .rt-bars i { width: 8px; }
}
.tw .two > div, .tw .two { min-width: 0; }
.tw .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 860px) { .tw .two { grid-template-columns: minmax(0, 1fr); } }
.rt-h { margin-top: 18px; }
.tw .two .tw-tbl { min-width: 0; }
.tw-tbl .tw-chip { white-space: normal; }
@media (max-width: 560px) { .tw .two .tw-tbl { min-width: 440px; } }
/* Planning step 1: import */
body.staff :is(.pi-grid, .pi-tabs, .bac-bar) { filter: hue-rotate(65deg); }
body.staff :is(.pi-grid) :is(.tw-chip, .tw-note) { filter: none; }
.pi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.pi-src { border: 1px solid #e3e6f0; border-radius: 12px; padding: 14px 16px; background: #fff; }
.pi-src.off { opacity: .5; }
.pi-src header { display: flex; gap: 10px; align-items: flex-start; }
.pi-src header > div { flex: 1; min-width: 0; }
.pi-src header b { display: block; color: #14204a; font-size: 15px; }
.pi-src header small { color: #6a7390; font-size: 12px; }
.pi-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #eef2ff; color: #2448c8; flex: none; }
.pi-n { margin-top: 12px; color: #5d6680; font-size: 13px; }
.pi-n b { font-size: 22px; color: #14204a; }
.pi-f { font-size: 12px; color: #5d6680; margin: 10px 0 0; line-height: 1.45; }
.pi-f .tw-lbl { font-size: 11px; margin-bottom: 2px; }
.pi-tg { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 13px; color: #3a4360; cursor: pointer; }
.pi-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pi-tab { border: 1px solid #cfd9fb; background: #fff; color: #2448c8; border-radius: 16px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.pi-tab.on { background: #2448c8; color: #fff; }
.pl-steps li:first-child { padding: 0; }
.pi-step { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; padding: 10px; width: 100%; height: 100%; cursor: pointer; border-radius: 0 0 8px 8px; }
.pi-step:hover, .pi-step:focus-visible { background: #eef2ff; }
.pi-open { font-size: 12px; font-weight: 700; color: #2448c8; }
.pi-hint { margin: 0 0 6px; }
.tw .bac-bar { height: 8px; border-radius: 4px; background: #eef0f5; overflow: hidden; margin: 6px 0; }
.tw .bac-bar u { display: block; height: 100%; background: #2448c8; transition: width .4s; }
.ivx .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.iv-t td:nth-child(2) { min-width: 220px; }
.iv-demo, .iv-t td small { white-space: normal; }
.iv-demo { white-space: nowrap; }
.iv-t td:nth-child(6) { min-width: 80px; }
/* Compact invoice list: one line per case */
.iv-t { min-width: 860px; font-size: 13px; }
.iv-t td { padding: 6px 12px; }
.iv-t th { padding: 10px 12px 8px; }
.iv-t td.iv-who1 { min-width: 0; white-space: nowrap; max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.iv-t td.iv-who1 small { display: inline; margin: 0 0 0 6px; font-size: 12px; }
.iv-t td:nth-child(2) { min-width: 0; }
.iv-t td:nth-child(4) { white-space: nowrap; }
.iv-t .iv-step { display: inline-block; margin: 0 10px 0 0; min-width: 118px; font-size: 13px; vertical-align: middle; }
.iv-t .iv-bar { display: inline-flex; vertical-align: middle; gap: 3px; }
.iv-t .iv-bar i { width: 14px; }
.iv-t .iv-pill { padding: 2px 10px; font-size: 12px; }
.iv-t .iv-src { font-size: 10px; padding: 2px 7px; letter-spacing: .1em; }
.iv-t .iv-demo { font-size: 10px; }
.iv-t td.iv-who1 { max-width: none; overflow: visible; }
.iv-t td.iv-who1 small { display: inline; white-space: nowrap; }
.iv-t td { white-space: nowrap; }
.iv-t .iv-step { min-width: 128px; }
.iv-t { min-width: 0; }
.iv-rem { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 12px; background: #eef0ff; color: #3a3fa0; border: 1px solid #cfd3f6; white-space: nowrap; }
.iv-none { color: #aab0c4; }
