/* Performance UI theme (decisions/0166) -- the Dashboard's theme.css
   header rules (decisions/0149), same dark navy + orange visual language
   as every module (decisions/0044).
*/

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0d1f35;
  color: #d0e4f4;
}

/* Suite-wide dark scrollbar (decisions/0088) -- the default OS/browser
   scrollbar (light grey) looks out of place against every module's dark
   background; same light-on-transparent style applied identically in
   Portal/eMapp/Documents/Vulani's own theme files. */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.4); }

a { color: #f5a623; }

/* ── App header / global nav ── */
#app-header {
  background: linear-gradient(135deg, #0d1f35 0%, #1a3a5c 100%);
  color: white; padding: 10px 18px 8px;
  border-bottom: 2px solid #f5a623;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
#app-header .brand { display: flex; align-items: center; gap: 12px; }
#app-header .logo {
  width: 36px; height: 36px; border-radius: 50%; background: #f5a623;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #0d1f35; flex-shrink: 0;
}
#app-header h1 { font-size: .95rem; font-weight: 700; margin: 0; }
#app-header .back-link { font-size: .75rem; color: #8aaac8; text-decoration: none; }
#app-header .back-link:hover { color: #f5a623; }
#app-header nav { display: flex; gap: 14px; flex-wrap: wrap; }
#app-header nav a { font-size: .8rem; color: #b8d0e8; text-decoration: none; }
#app-header nav a:hover, #app-header nav a.active { color: #f5a623; }
#app-header .session-info { font-size: .75rem; color: #cdd5e0; text-align: right; }

/* decisions/0077: when embedded in Portal this module's own header is
   redundant; standalone access keeps it. */
.vs-embedded #app-header { display: none; }
/* Signed out inside Portal: the loading screen covers the wait for Portal's
   sign-in token; the standalone "Sign in" prompt never shows there. */
.vs-embedded .pf-signin { display: none; }


/* David: a real, hand-bumped version visible on screen at all times, even
   embedded (deliberately outside #app-header so the hide rule above
   doesn't take it down too) -- so a stale tab/iframe is distinguishable
   from a genuinely updated one without opening devtools. Top-right:
   bottom-right collides with the ambient Vulani bubble (decisions/0074). */
#performance-version {
  position: fixed; right: 6px; top: 4px; z-index: 900;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: .62rem; letter-spacing: .06em;
  color: #6b7f94; opacity: .75; pointer-events: none;
}

button {
  padding: 5px 14px; border: 1px solid #3a5a7a; border-radius: 3px;
  cursor: pointer; font-size: 12px; background: #1e3a58; color: #b8d0e8;
  transition: all .15s;
}
button:hover:not(:disabled) { background: #254870; color: white; border-color: #5a7a9a; }
button:disabled { opacity: .4; cursor: default; }

/* ── Page body ── */
/* decisions/0166 (2026-10-14), release 0.2. Roles, not decoration:
   --p is a programme's colour (identity only); --c a status colour, always
   beside its icon and its word. Text stays in ink colours. */
/* decisions/0171: full width, as the Dashboard (was a centred 1480px
   column, which left a wide empty band on a big screen). */
.pf-page { padding: 12px 18px 72px; }
.pf-signin h1 { font-size: 1.1rem; color: #f5a623; margin: 14px 0 6px; }
.pf-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pf-muted { color: #8aaac8; font-size: .8rem; }
.pf-intro { font-size: .85rem; color: #8aaac8; margin: 4px 0 14px; }
.pf-empty { color: #8aaac8; font-size: .82rem; padding: 10px 0; list-style: none; }
.pf-loading { padding: 40px 0; text-align: center; }
.pf-note { font-size: .78rem; color: #fab219; margin: 10px 0 0; }
.pf-count { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 4px; border-radius: 10px;
  background: #1f4266; color: #d0e4f4; font-size: .7rem; font-weight: 600; text-align: center; }
.pf-label { display: block; font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: #8aaac8; margin-bottom: 2px; }

/* Top bar: department, year, quarter, find */
/* padding-right keeps the last control clear of the fixed version badge,
   as Dashboard's picker (badge 36px wide, 6px from the edge). */
.pf-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 4px 44px 12px 0; }
.pf-dept { display: flex; flex-direction: column; margin-right: auto; }
.pf-dept-name, .pf-dept select { font-size: 1.15rem; font-weight: 700; color: #fff; }
.pf-dept select { background: transparent; border: 0; padding: 0; cursor: pointer; }
.pf-dept-sub { font-size: .72rem; color: #8aaac8; letter-spacing: .04em; }
.pf-seg { display: inline-flex; background: #0a182a; border: 1px solid #1f4266; border-radius: 8px; padding: 3px; gap: 2px; }
.pf-seg button { border: 0; background: transparent; color: #b8d0e8; border-radius: 6px; padding: 6px 12px; font-size: .78rem; }
.pf-seg button:hover:not(:disabled) { border: 0; background: #1a3552; }
.pf-seg button.on, .pf-seg button.on:hover:not(:disabled) { background: #f5a623; color: #0d1f35; font-weight: 700; }
.pf-seg button.faint:not(.on) { color: #5d7a97; }
.pf-seg.small button { padding: 4px 10px; font-size: .74rem; }
.pf-find { display: inline-flex; align-items: center; gap: 10px; background: #13283f; border-color: #1f4266; color: #8aaac8; padding: 7px 12px; border-radius: 8px; }
.pf-find kbd { font: inherit; font-size: .66rem; border: 1px solid #2c5179; border-radius: 4px; padding: 1px 5px; color: #b8d0e8; }

/* Tabs */
.pf-tabs { display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid #1f4266; margin-bottom: 16px; flex-wrap: wrap; }
.pf-tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: #8aaac8;
  padding: 8px 14px; font-size: .85rem; }
.pf-tabs button:hover:not(:disabled) { background: none; color: #fff; border: 0; border-bottom: 2px solid #3a5a7a; }
.pf-tabs button.on, .pf-tabs button.on:hover:not(:disabled) { color: #fff; border-bottom: 2px solid #f5a623; }
.pf-source { margin-left: auto; font-size: .68rem; color: #5d7a97; padding: 0 0 8px; max-width: 46%; text-align: right; }

/* Cards */
.pf-card { background: #13283f; border: 1px solid #1f4266; border-radius: 10px; padding: 16px 18px; }
/* Written case, not uppercase: "TIDs" and "QPRs" would read as "TIDS" and "QPRS". */
.pf-card h3 { font-size: .85rem; color: #fff; letter-spacing: .01em; margin: 0 0 6px; font-weight: 600; }

/* Overview */
.pf-overview { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.pf-hero { grid-column: span 5; display: flex; gap: 22px; align-items: center; }
.pf-progs { grid-column: span 7; display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pf-moneycard { grid-column: span 7; }
.pf-trend { grid-column: span 5; }
.pf-attention { grid-column: span 12; }
.pf-trail { grid-column: span 12; }
.pf-ring-wrap { position: relative; width: 168px; height: 168px; flex-shrink: 0; }
.pf-ring { width: 168px; height: 168px; }
.pf-ring-centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; }
.pf-ring-centre b { font-size: 2.3rem; color: #fff; line-height: 1; font-weight: 700; }
.pf-ring-centre b small { font-size: .95rem; color: #8aaac8; font-weight: 400; }
.pf-ring-centre span { font-size: .7rem; color: #8aaac8; margin-top: 4px; max-width: 110px; }
.pf-hero-text h2 { font-size: 1.05rem; color: #fff; margin: 0 0 4px; }
.pf-legend { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 4px; }
.pf-legend button { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 18px;
  background: none; border: 0; padding: 3px 6px; border-radius: 6px; }
.pf-legend button:hover:not(:disabled) { background: #1a3552; border: 0; }
.pf-legend b { color: #fff; font-size: .9rem; }
.pf-status { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: #d0e4f4; white-space: nowrap; }
.pf-status i { font-style: normal; width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--c); color: #0d1f35; font-size: .62rem; font-weight: 800; }
.pf-prog { text-align: left; display: flex; flex-direction: column; gap: 6px; border-top: 3px solid var(--p); border-radius: 10px; padding: 14px 16px; cursor: pointer; color: inherit; font-size: inherit; }
.pf-prog:hover:not(:disabled) { background: #183252; border-color: #2c5179; border-top-color: var(--p); color: inherit; }
.pf-prog-no { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: #8aaac8; }
.pf-prog-name { font-size: .98rem; font-weight: 700; color: #fff; }
.pf-prog-figs { font-size: .78rem; color: #b8d0e8; }
.pf-prog-figs b { font-size: 1.25rem; color: #fff; }
.pf-stack { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; background: #0a182a; }
.pf-prog-money { font-size: .95rem; color: #fff; font-weight: 600; margin-top: auto; }
.pf-prog-money small { font-size: .68rem; color: #8aaac8; font-weight: 400; }
.pf-chart { width: 100%; height: 230px; }
.pf-chart.small { height: 190px; }
.pf-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.pf-row { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 2px 14px;
  background: #0f2236; border: 1px solid #1f4266; border-left: 3px solid var(--p); border-radius: 6px; padding: 9px 12px; color: inherit; font-size: inherit; }
.pf-row:hover:not(:disabled) { background: #183252; border-color: #2c5179; border-left-color: var(--p); color: inherit; }
.pf-row-name { font-size: .82rem; color: #fff; }
.pf-row-fig { font-size: .95rem; color: #fff; font-weight: 700; text-align: right; white-space: nowrap; }
.pf-row-fig small { color: #8aaac8; font-weight: 400; font-size: .72rem; }
.pf-row-why { grid-column: 1 / -1; font-size: .74rem; color: #8aaac8; }
.pf-row-why em { color: #fab219; font-style: normal; }
.pf-timeline { list-style: none; margin: 10px 0 0 6px; padding: 0; }
.pf-timeline li { display: grid; grid-template-columns: 40px minmax(180px, 300px) 1fr auto; gap: 12px; align-items: baseline;
  padding: 8px 0 8px 16px; border-left: 2px solid #1f4266; position: relative; font-size: .78rem; }
.pf-timeline li::before { content: ""; position: absolute; left: -6px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: #2c5179; }
.pf-timeline li.approve::before { background: #0ca30c; }
.pf-tl-q { color: #f5a623; font-weight: 700; }
.pf-tl-who b { color: #fff; font-weight: 600; margin-right: 4px; }
.pf-tl-what { color: #b8d0e8; }
.pf-tl-when { color: #8aaac8; white-space: nowrap; }

/* The performance wall */
.pf-filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.pf-wall-wrap { overflow-x: auto; border: 1px solid #1f4266; border-radius: 10px; }
.pf-wall { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 860px; }
.pf-wall thead th { position: sticky; top: 0; z-index: 2; background: #0f2236; color: #8aaac8; font-size: .72rem; font-weight: 600;
  text-align: center; padding: 8px 6px; border-bottom: 1px solid #1f4266; letter-spacing: .04em; }
.pf-wall thead th:first-child { text-align: left; padding-left: 16px; }
.pf-wall thead th small { display: block; font-weight: 400; color: #5d7a97; letter-spacing: 0; }
.pf-wall thead th.on { color: #f5a623; }
.pf-group th { text-align: left; padding: 14px 16px 6px; background: #0d1f35; color: #fff; font-size: .82rem; border-top: 1px solid #1f4266; }
.pf-group th span { border-left: 4px solid var(--p); padding-left: 8px; }
.pf-group th small { color: #8aaac8; font-weight: 400; margin-left: 10px; }
.pf-ind { cursor: pointer; }
.pf-ind:hover th, .pf-ind:hover td, .pf-ind:focus th, .pf-ind:focus td { background: #183252; }
.pf-ind:focus { outline: none; }
.pf-ind:focus th { box-shadow: inset 3px 0 0 #f5a623; }
.pf-ind th { text-align: left; font-weight: 400; padding: 9px 12px 9px 16px; background: #13283f; border-top: 1px solid #0d1f35;
  min-width: 380px; box-shadow: inset 3px 0 0 var(--p); }
.pf-ind th > span { vertical-align: top; }
.pf-ind-no { display: inline-block; color: #8aaac8; font-size: .8rem; width: 22px; text-align: right; margin-right: 8px; }
.pf-ind-name { display: inline-block; width: calc(100% - 34px); font-size: .82rem; color: #fff; }
.pf-ind-name small { display: block; color: #5d7a97; font-size: .7rem; margin-top: 2px; }
.pf-tag { font-style: normal; font-size: .64rem; padding: 1px 6px; border-radius: 8px; background: #1f4266; color: #b8d0e8; margin-left: 4px; white-space: nowrap; }
.pf-tag.warn { background: rgba(236,131,90,.16); color: #ec835a; }
.pf-c { text-align: center; padding: 8px 6px; background: #13283f; border-top: 1px solid #0d1f35; min-width: 92px; position: relative; }
.pf-c i { font-style: normal; position: absolute; top: 7px; left: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--c);
  color: #0d1f35; font-size: .55rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.pf-c.not_due i, .pf-c.no_report i { background: transparent; color: #4f6a86; }
.pf-c-fig { display: block; font-size: 1.02rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.pf-c-fig.faint { color: #3a5a7a; }
.pf-c-sub { display: block; font-size: .68rem; color: #8aaac8; }
.pf-c-words { font-size: .7rem; color: #b8d0e8; }
.pf-c.achieved { background: linear-gradient(180deg, rgba(12,163,12,.12), rgba(12,163,12,.03)) #13283f; }
.pf-c.not_achieved { background: linear-gradient(180deg, rgba(208,59,59,.18), rgba(208,59,59,.04)) #13283f; }
.pf-c.not_reported { background: linear-gradient(180deg, rgba(250,178,25,.12), rgba(250,178,25,.03)) #13283f; }
.pf-c.no_report { background: repeating-linear-gradient(135deg, #13283f 0 6px, #11243a 6px 12px); }
.pf-c.on { box-shadow: inset 0 0 0 1px rgba(245,166,35,.45); }

/* Checks */
.pf-check { margin-bottom: 14px; }
.pf-check h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-sev { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 600; color: var(--c);
  border: 1px solid var(--c); border-radius: 10px; padding: 1px 8px 1px 6px; }
.pf-sev i { font-style: normal; }

/* The indicator drawer */
.pf-scrim { position: fixed; inset: 0; background: rgba(4,10,20,.55); z-index: 950; animation: pf-fade .15s ease-out; }
.pf-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); background: #0f2236; z-index: 960;
  border-left: 1px solid #1f4266; box-shadow: -18px 0 40px rgba(0,0,0,.4); display: flex; flex-direction: column;
  animation: pf-slide .2s ease-out; }
@keyframes pf-slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pf-fade { from { opacity: 0; } to { opacity: 1; } }
.pf-d-head { padding: 18px 22px 14px; border-bottom: 1px solid #1f4266; border-top: 4px solid var(--p); position: relative; }
.pf-d-head h2 { font-size: 1.08rem; color: #fff; margin: 6px 32px 10px 0; line-height: 1.35; }
.pf-d-head h2 span { color: #8aaac8; }
.pf-d-prog { font-size: .7rem; color: #8aaac8; letter-spacing: .03em; }
.pf-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; padding: 0; border-radius: 50%; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-chips span { font-size: .68rem; color: #b8d0e8; background: #13283f; border: 1px solid #1f4266; border-radius: 10px; padding: 2px 8px; }
.pf-d-body { overflow-y: auto; padding: 6px 22px 80px; }
.pf-d-body section { padding: 14px 0; border-bottom: 1px solid #1a3552; }
.pf-d-body h3 { font-size: .78rem; color: #f5a623; margin: 0 0 8px; font-weight: 600; letter-spacing: .02em; }
.pf-d-body h3 small { color: #8aaac8; font-weight: 400; margin-left: 6px; }
.pf-d-year { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
.pf-big { font-size: 2.4rem; color: #fff; line-height: 1; }
.pf-meter { grid-column: 1 / -1; height: 8px; background: #0a182a; border-radius: 4px; overflow: hidden; }
.pf-meter span { display: block; height: 100%; border-radius: 4px; transition: width .5s ease-out; }
.pf-d-checks ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.pf-d-checks li { font-size: .78rem; color: #d0e4f4; display: flex; gap: 8px; background: #13283f; border-left: 3px solid var(--c); border-radius: 4px; padding: 7px 10px; }
.pf-d-checks li i { color: var(--c); font-style: normal; }
.pf-d-q { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 6px; }
.pf-d-q th, .pf-d-q td { padding: 6px 4px; border-bottom: 1px solid #1a3552; text-align: left; }
.pf-d-q thead th { color: #8aaac8; font-weight: 400; font-size: .7rem; }
.pf-d-q td { color: #fff; font-variant-numeric: tabular-nums; }
.pf-d-note { background: #13283f; border-radius: 6px; padding: 8px 12px; margin-top: 8px; font-size: .78rem; }
.pf-d-note b { color: #f5a623; }
.pf-d-note p { margin: 6px 0 0; color: #d0e4f4; }
.pf-dl { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0; font-size: .78rem; }
.pf-dl dt { color: #8aaac8; }
.pf-dl dd { margin: 0; color: #d0e4f4; line-height: 1.45; }
.pf-d-src ul { margin: 0; padding-left: 18px; font-size: .74rem; color: #8aaac8; }
.pf-link { margin-top: 10px; background: none; border: 0; color: #f5a623; padding: 0; font-size: .8rem; display: block; }
.pf-link:hover:not(:disabled) { background: none; color: #ffc25a; border: 0; text-decoration: underline; }

/* Find (Ctrl+K) */
.pf-finder { position: fixed; top: 12vh; left: 50%; transform: translateX(-50%); width: min(640px, 92vw); z-index: 970;
  background: #0f2236; border: 1px solid #2c5179; border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.5); overflow: hidden; }
.pf-finder input { width: 100%; padding: 16px 18px; font-size: 1rem; background: transparent; border: 0; border-bottom: 1px solid #1f4266; color: #fff; outline: none; }
.pf-finder ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.pf-finder li { padding: 9px 12px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px;
  border-left: 3px solid var(--p); font-size: .84rem; color: #d0e4f4; }
.pf-finder li small { color: #8aaac8; white-space: nowrap; }
.pf-finder li[aria-selected="true"] { background: #1a3552; color: #fff; }

@media (max-width: 1100px) {
  .pf-hero, .pf-progs, .pf-trend, .pf-attention, .pf-moneycard { grid-column: span 12; }
}
@media (max-width: 640px) {
  .pf-page { padding: 8px 16px 72px; }
  .pf-progs { grid-template-columns: minmax(0, 1fr); }
  .pf-hero { flex-direction: column; align-items: flex-start; }
  .pf-source { max-width: 100%; text-align: left; margin-left: 0; }
  .pf-timeline li { grid-template-columns: 34px 1fr; gap: 2px 10px; }
  .pf-tl-what, .pf-tl-when { grid-column: 2; }
  .pf-dl { grid-template-columns: 1fr; }
}
.pf-d-note details { margin-top: 6px; }
.pf-d-note summary { cursor: pointer; display: list-item; }
.pf-d-note details p { white-space: normal; line-height: 1.5; }

/* The department and cycle picker: the same look as Dashboard's and eMapp's
   .context-picker (decisions/0115, 0166). */
.context-picker { display: inline-flex; align-items: center; gap: 8px; }
.context-picker select {
  background: #0f2540; color: #d0e4f4; border: 1px solid #1e3a5f;
  border-radius: 4px; padding: 4px 8px; font-size: 13px; min-width: 90px;
}
.context-picker select#dept-select { min-width: 260px; max-width: 100%; }
.pf-nothing { margin-top: 8px; }
@media (max-width: 640px) {
  .context-picker { display: flex; flex-wrap: wrap; width: 100%; }
  .context-picker select#dept-select { min-width: 0; flex: 1 1 100%; }
}
.pf-basis { font-size: .74rem; color: #8aaac8; margin: 10px 0 0; line-height: 1.5; }
.pf-link.inline { display: inline; margin: 0; font-size: inherit; }

/* Money against delivery (decisions/0166, link 1). */
.pf-money-line { display: flex; align-items: baseline; gap: 6px; font-size: .78rem; color: #b8d0e8; font-weight: 400; }
.pf-money-line b { color: #fff; font-size: .95rem; }
.pf-money-line small { color: #8aaac8; font-size: .68rem; }
.pf-money-pct { margin-left: auto; }
.pf-money-pct.over { color: #ec835a !important; }
.pf-money-bar { display: block; height: 6px; background: #0a182a; border-radius: 3px; overflow: hidden; margin-top: 5px; }
.pf-money-bar span { display: block; height: 100%; background: #3987e5; border-radius: 3px; }
.pf-money-src { display: block; color: #5d7a97; font-size: .64rem; font-weight: 400; margin-top: 3px; }
.pf-moneycard .pf-chart { height: 210px; }
