/* Phase 40 design layer: Finance Office, My Fees, Admission Journey, Institutional Growth, Officer Evaluation,
   Facilitation and account security. Built on the Reformation tokens (reformation.css) so light and dark
   themes stay first-class. NIIT navy, gold and cream; calm surfaces, one strong action per card. */

.p40-root { --p40-navy: #052b47; --p40-navy-2: #0b3b5d; --p40-gold: #f0b429; --p40-gold-2: #ffd978; }
.p40-hero { position: relative; overflow: hidden; }
.p40-hero::after { content: ""; position: absolute; inset: auto -60px -80px auto; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(240, 180, 41, .22), transparent 70%); pointer-events: none; }
.p40-hero .rf-form-actions { margin-top: 18px; }
.rf-button.p40-gold { color: #052b47; background: linear-gradient(135deg, #ffd978, #f0b429); border-color: transparent; }
.rf-button.p40-on-navy { color: #fff; border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .06); }
.rf-button.p40-on-navy:hover { background: rgba(255, 255, 255, .12); }
.p40-grow { flex: 1 1 200px; }
.p40-mt { margin-top: 16px; }
.p40-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p40-tabs { margin-bottom: 2px; }
.p40-tab-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; color: #fff; background: var(--rf-red); font-size: 10px; }

/* rings, bars, charts */
.p40-ring-track { stroke: var(--rf-hairline-strong); }
.p40-hero .p40-ring-track { stroke: rgba(255, 255, 255, .16); }
.p40-ring-value { stroke: var(--rf-gold); transition: stroke-dashoffset .9s var(--rf-ease); }
.p40-ring-green .p40-ring-value { stroke: var(--rf-green); }
.p40-ring-red .p40-ring-value { stroke: var(--rf-red); }
.p40-ring-blue .p40-ring-value { stroke: var(--rf-blue); }
.p40-ring-muted .p40-ring-value { stroke: var(--rf-text-3); }
.p40-ring-text { fill: var(--rf-text); font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.p40-ring-sub { fill: var(--rf-text-3); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.p40-hero .p40-ring-text { fill: #fff; }
.p40-hero .p40-ring-sub { fill: rgba(255, 255, 255, .64); }
.p40-bar { display: block; width: 100%; height: 8px; }
.p40-bar-track { fill: var(--rf-surface-2); }
.p40-bar-value { fill: var(--rf-gold); }
.p40-bar-green .p40-bar-value { fill: var(--rf-green); }
.p40-bar-red .p40-bar-value { fill: var(--rf-red); }
.p40-bar-blue .p40-bar-value { fill: var(--rf-blue); }
.p40-bar-navy .p40-bar-value { fill: #0b3b5d; }
:root[data-theme="dark"] .p40-bar-navy .p40-bar-value { fill: var(--rf-accent); }
.p40-spark polyline { stroke: var(--rf-gold); }
.p40-spark circle { fill: var(--rf-gold); }
.p40-spark-green polyline { stroke: var(--rf-green); } .p40-spark-green circle { fill: var(--rf-green); }
.p40-spark-navy polyline, .p40-spark-blue polyline { stroke: var(--rf-blue); } .p40-spark-navy circle, .p40-spark-blue circle { fill: var(--rf-blue); }
.p40-columns { display: block; width: 100%; height: auto; max-height: 220px; }
.p40-columns rect { fill: #0b3b5d; }
.p40-columns-green rect { fill: var(--rf-green); }
.p40-columns rect.neg { fill: var(--rf-red); }
:root[data-theme="dark"] .p40-columns rect { fill: var(--rf-accent); }
.p40-col-value { fill: var(--rf-text-2); font-size: 10px; font-weight: 700; }
.p40-col-label { fill: var(--rf-text-3); font-size: 11px; font-weight: 700; }
.p40-delta { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; color: var(--rf-text-2); background: var(--rf-surface-2); font-size: 11px; font-weight: 800; }
.p40-delta.up { color: var(--rf-green); background: var(--rf-green-soft); }
.p40-delta.down { color: var(--rf-red); background: var(--rf-red-soft); }

/* KPI tiles */
.p40-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.p40-kpi { position: relative; display: grid; gap: 4px; padding: 18px; overflow: hidden; border: 1px solid var(--rf-hairline); border-radius: 18px; background: var(--rf-surface); box-shadow: var(--rf-shadow-sm); }
.p40-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--rf-gold); }
.p40-kpi.tone-green::before { background: var(--rf-green); } .p40-kpi.tone-red::before { background: var(--rf-red); } .p40-kpi.tone-blue::before { background: var(--rf-blue); } .p40-kpi.tone-amber::before { background: var(--rf-amber); }
.p40-kpi span { color: var(--rf-text-3); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.p40-kpi strong { font-size: clamp(20px, 2.2vw, 26px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.p40-kpi small { color: var(--rf-text-2); font-size: 12px; }
.p40-kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.p40-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }

/* attention and banners */
.p40-attention { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 20px; border: 1px solid; }
.p40-attention h3 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.p40-attention p:not(.rf-eyebrow) { margin: 4px 0 0; color: var(--rf-text-2); }
.p40-attention.tone-red { border-color: color-mix(in srgb, var(--rf-red) 35%, transparent); background: var(--rf-red-soft); }
.p40-attention.tone-amber { border-color: color-mix(in srgb, var(--rf-amber) 35%, transparent); background: var(--rf-amber-soft); }
.p40-attention.tone-gold { border-color: color-mix(in srgb, var(--rf-gold) 45%, transparent); background: var(--rf-gold-soft); }
.p40-attention-dot { width: 14px; height: 14px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 18%, transparent); animation: p40-pulse 1.8s ease-in-out infinite; }
.p40-attention.tone-red .p40-attention-dot { color: var(--rf-red); } .p40-attention.tone-amber .p40-attention-dot { color: var(--rf-amber); } .p40-attention.tone-gold .p40-attention-dot { color: var(--rf-gold); }
@keyframes p40-pulse { 50% { box-shadow: 0 0 0 11px transparent; } }
.p40-pass-banner { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--rf-gold) 45%, transparent); border-radius: 16px; color: var(--rf-text); background: var(--rf-gold-soft); }
.p40-pass-banner > div { flex: 1; font-size: 14px; }
.p40-warning, .p40-reason { margin: 8px 0 0; color: var(--rf-red); font-size: 12px; font-weight: 600; }
.p40-warning { padding: 10px 12px; border-radius: 12px; background: var(--rf-red-soft); }
.hm-fees-alert { border-color: color-mix(in srgb, var(--rf-red) 30%, transparent); box-shadow: 0 0 0 3px var(--rf-red-soft), var(--rf-shadow); }
.hm-warning-gold { color: var(--rf-gold-ink); } .hm-warning-amber { color: var(--rf-amber); }

/* plan, schedule, timeline */
.p40-plan td { padding: 10px 6px; }
.p40-plan .p40-funding td { color: var(--rf-green); }
.p40-total td { padding-top: 14px; border-top: 2px solid var(--rf-hairline-strong); font-size: 15px; font-weight: 800; }
.p40-total.neg td { color: var(--rf-red); }
.p40-subhead { margin: 18px 0 8px; font-size: 13px; color: var(--rf-text-2); }
.p40-schedule { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: line; }
.p40-schedule li { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--rf-surface-2); font-size: 13px; }
.p40-schedule li.next { outline: 2px solid var(--rf-gold); background: var(--rf-gold-soft); }
.p40-timeline { position: relative; display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.p40-timeline li { position: relative; display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--rf-hairline); }
.p40-timeline-dot { width: 12px; height: 12px; margin-top: 4px; border-radius: 50%; background: var(--rf-text-3); }
.p40-timeline li.tone-green .p40-timeline-dot { background: var(--rf-green); } .p40-timeline li.tone-amber .p40-timeline-dot { background: var(--rf-amber); } .p40-timeline li.tone-red .p40-timeline-dot { background: var(--rf-red); }
.p40-timeline-main { display: grid; gap: 3px; min-width: 0; }
.p40-timeline-main small { color: var(--rf-text-2); font-size: 12px; }
.p40-timeline-side { display: grid; justify-items: end; gap: 4px; }
.p40-reminders { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.p40-reminders li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--rf-surface-2); }
.p40-reminders p { margin: 0; font-size: 13px; }
.p40-reminders small { color: var(--rf-text-3); font-size: 11px; }
.p40-howto ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.p40-howto li { counter-increment: step; padding: 14px; border-radius: 14px; background: var(--rf-surface-2); font-size: 13px; }
.p40-howto li::before { content: counter(step); display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; border-radius: 50%; color: #052b47; background: var(--rf-gold); font-weight: 800; }

/* forms */
.p40-dialog.wide { width: min(980px, calc(100% - 24px)); max-height: calc(100vh - 32px); overflow: auto; }
.p40-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 14px; }
.p40-bank-note { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #052b47, #0b3b5d); }
.p40-bank-note span { color: #ffd978; font-weight: 700; }
.p40-bank-note small { color: rgba(255, 255, 255, .7); }
.p40-drop { position: relative; display: grid; justify-items: center; gap: 4px; padding: 22px; border: 2px dashed var(--rf-hairline-strong); border-radius: 16px; background: var(--rf-surface-2); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.p40-drop:hover, .p40-drop:focus-within { border-color: var(--rf-gold); }
.p40-drop.ready { border-style: solid; border-color: var(--rf-green); background: var(--rf-green-soft); }
.p40-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.p40-drop-icon { font-size: 26px; color: var(--rf-gold); }
.p40-drop small { color: var(--rf-text-3); }
.p40-schedule-edit { display: grid; gap: 8px; margin: 6px 0 0; padding: 14px; border: 1px solid var(--rf-hairline); border-radius: 14px; }
.p40-schedule-edit legend { padding: 0 6px; color: var(--rf-text-2); font-size: 12px; font-weight: 700; }
.p40-line { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; }
.p40-plan-preview { margin: 4px 0 0; padding: 10px 12px; border-radius: 12px; color: var(--rf-text); background: var(--rf-gold-soft); font-size: 13px; }
.p40-secret { margin: 14px 0; padding: 16px; border-radius: 14px; color: #052b47; background: linear-gradient(135deg, #fff5d6, #ffe7a3); font-size: 20px; text-align: center; letter-spacing: .08em; user-select: all; }
.p40-preview-image { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 12px; }
.p40-preview-frame { width: 100%; height: 70vh; border: 0; border-radius: 12px; }

/* lists, filters, tables */
.p40-filters { align-items: center; }
.p40-chipbar { display: flex; flex-wrap: wrap; gap: 6px; }
.p40-filter { padding: 8px 14px; border: 1px solid var(--rf-hairline-strong); border-radius: 999px; color: var(--rf-text-2); background: var(--rf-surface); font-size: 12px; font-weight: 700; }
.p40-filter.active { color: #fff; border-color: transparent; background: #052b47; }
:root[data-theme="dark"] .p40-filter.active { color: #052b47; background: var(--rf-gold); }
.p40-filter.static { cursor: default; }
.p40-rows { display: grid; margin: 0; padding: 0; list-style: none; }
.p40-rows li > button, .p40-row-static { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 6px; border: 0; border-bottom: 1px solid var(--rf-hairline); color: var(--rf-text); background: transparent; text-align: left; }
.p40-rows li > button:hover { background: var(--rf-surface-2); }
.p40-rows li > button > div, .p40-row-static > div { flex: 1; min-width: 0; display: grid; gap: 3px; }
.p40-rows small { color: var(--rf-text-2); font-size: 12px; }
.p40-accounts tbody tr { cursor: pointer; }
.p40-progress-cell { min-width: 110px; }
.p40-progress-cell small { color: var(--rf-text-3); font-size: 11px; }
.p40-drawer { display: grid; gap: 16px; }
.p40-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.p40-drawer-head h3 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.p40-drawer-summary { display: flex; align-items: center; gap: 22px; padding: 18px; border-radius: 18px; background: var(--rf-surface-2); }
.p40-drawer-summary dl, .p40-facts, .p40-mini-finance dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px 18px; flex: 1; margin: 0; }
.p40-drawer-summary dt, .p40-facts dt, .p40-mini-finance dt { color: var(--rf-text-3); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.p40-drawer-summary dd, .p40-facts dd, .p40-mini-finance dd { margin: 2px 0 0; font-weight: 700; }
.p40-mini-finance { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.p40-reminder-hero { display: grid; gap: 14px; }
.p40-approvals, .p40-requests, .p40-evals { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.p40-approval { display: grid; gap: 12px; border-top: 4px solid var(--rf-amber); }
.p40-approval.tone-green { border-top-color: var(--rf-green); } .p40-approval.tone-red { border-top-color: var(--rf-red); }
.p40-approval header { display: flex; justify-content: space-between; gap: 10px; }
.p40-approval h3 { margin: 0; font-size: 26px; letter-spacing: -.03em; }
.p40-statement .p40-section td { padding-top: 14px; color: var(--rf-text-3); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.p40-statement .p40-subtotal td { font-weight: 800; background: var(--rf-surface-2); }
.p40-aging { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr auto; align-items: center; gap: 12px; padding: 7px 0; font-size: 13px; }
.p40-checks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.p40-checks li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--rf-green-soft); }
.p40-checks li > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: var(--rf-green); font-weight: 900; }
.p40-checks li.bad { background: var(--rf-red-soft); }
.p40-checks li.bad > span { background: var(--rf-red); }
.p40-checks small { display: block; color: var(--rf-text-2); font-size: 12px; }
.p40-hash { color: var(--rf-text-3); }
.p40-request { display: flex; justify-content: space-between; gap: 14px; width: 100%; color: var(--rf-text); text-align: left; cursor: pointer; transition: transform .15s var(--rf-ease), box-shadow .2s; }
.p40-request:hover { transform: translateY(-2px); box-shadow: var(--rf-shadow-lg); }
.p40-request h3 { margin: 4px 0; font-size: 16px; }
.p40-request-side { display: grid; justify-items: end; align-content: start; gap: 8px; }
.p40-flow { display: inline-flex; gap: 4px; }
.p40-flow i { width: 16px; height: 5px; border-radius: 3px; background: var(--rf-hairline-strong); }
.p40-flow i.on { background: var(--rf-green); } .p40-flow i.off { background: var(--rf-red-soft); }
.p40-history { display: grid; gap: 10px; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--rf-hairline-strong); list-style: none; }
.p40-history li { position: relative; font-size: 13px; }
.p40-history li::before { content: ""; position: absolute; left: -22px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #052b47; box-shadow: 0 0 0 3px var(--rf-surface); }
.p40-history li.auto::before { background: var(--rf-gold); }
.p40-history small { color: var(--rf-text-2); }

/* admission journey */
/* Every stage stays visible: tiles and columns wrap into rows instead of running off-screen (7 Oct 2026). */
.p40-root, .p40-root > *, [data-aj-body], [data-cases] { min-width: 0; max-width: 100%; }
.p40-funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.p40-funnel-stage { position: relative; display: grid; gap: 2px; padding: 14px 12px; border: 1px solid var(--rf-hairline); border-radius: 16px; color: var(--rf-text); background: var(--rf-surface); text-align: left; box-shadow: var(--rf-shadow-sm); transition: transform .15s var(--rf-ease); }
.p40-funnel-stage:hover { transform: translateY(-2px); }
.p40-funnel-stage.active { outline: 3px solid var(--rf-gold); }
.p40-funnel-stage strong { font-size: 26px; letter-spacing: -.03em; }
.p40-funnel-stage small { color: var(--rf-text-2); font-size: 11px; line-height: 1.25; }
.p40-funnel-stage em { position: absolute; top: 10px; right: 10px; padding: 2px 7px; border-radius: 999px; color: var(--rf-text-2); background: var(--rf-surface-2); font-size: 10px; font-style: normal; font-weight: 800; }
.p40-funnel-no { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #fff; background: #052b47; font-size: 12px; font-weight: 800; }
.p40-funnel-stage.tone-gold .p40-funnel-no { color: #052b47; background: var(--rf-gold); }
.p40-funnel-stage.tone-blue .p40-funnel-no { background: var(--rf-blue); }
.p40-funnel-stage.tone-amber .p40-funnel-no { background: var(--rf-amber); }
.p40-funnel-stage.tone-green .p40-funnel-no { background: var(--rf-green); }
.p40-funnel-stage.tone-muted .p40-funnel-no { background: var(--rf-text-3); }
.p40-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; align-items: start; padding-bottom: 8px; }
.p40-column { display: grid; grid-template-rows: auto 1fr; min-height: 260px; border-radius: 18px; background: var(--rf-surface-2); scroll-snap-align: start; }
.p40-column header { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 14px; border-bottom: 3px solid var(--rf-text-3); }
.p40-column.tone-gold header { border-bottom-color: var(--rf-gold); } .p40-column.tone-blue header { border-bottom-color: var(--rf-blue); } .p40-column.tone-amber header { border-bottom-color: var(--rf-amber); } .p40-column.tone-green header { border-bottom-color: var(--rf-green); }
.p40-column header span { color: var(--rf-text-3); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.p40-column header strong { grid-column: 1; font-size: 13px; line-height: 1.2; }
.p40-column header em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 20px; font-style: normal; font-weight: 800; }
.p40-column-body { display: grid; align-content: start; gap: 8px; padding: 10px; max-height: 560px; overflow-y: auto; }
.p40-case { display: grid; gap: 2px; padding: 12px; border: 1px solid var(--rf-hairline); border-radius: 14px; color: var(--rf-text); background: var(--rf-surface); text-align: left; box-shadow: var(--rf-shadow-sm); transition: transform .15s var(--rf-ease), box-shadow .2s; }
.p40-case:hover { transform: translateY(-2px); box-shadow: var(--rf-shadow); }
.p40-case strong { font-size: 14px; }
.p40-case small { font-size: 12px; }
.p40-case-code { justify-self: start; padding: 2px 8px; border-radius: 6px; color: var(--rf-gold-ink); background: var(--rf-gold-soft); font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.p40-case-foot { margin-top: 6px; color: var(--rf-text-3); font-size: 11px; }
.p40-case.stuck { border-left: 4px solid var(--rf-red); }
.p40-case.due { box-shadow: 0 0 0 2px var(--rf-gold), var(--rf-shadow-sm); }
.p40-case-status { display: grid; gap: 12px; padding: 18px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #052b47, #0f4a73); }
.p40-case-status h3 { margin: 0; font-size: 22px; }
.p40-case-status .rf-eyebrow { color: var(--rf-gold); }
.p40-case-status .rf-muted { color: rgba(255, 255, 255, .72); }
.p40-stepper { display: grid; grid-template-columns: repeat(15, 1fr); gap: 4px; margin: 0; padding: 0; list-style: none; }
.p40-stepper li { display: grid; place-items: center; height: 26px; border-radius: 7px; color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .1); font-size: 10px; font-weight: 800; }
.p40-stepper li.done { color: #052b47; background: rgba(240, 180, 41, .75); }
.p40-stepper li.current { color: #052b47; background: #ffd978; box-shadow: 0 0 0 3px rgba(255, 217, 120, .35); }
.p40-row-static .p40-stepper li { color: var(--rf-text-3); background: var(--rf-surface-2); }
.p40-row-static .p40-stepper li.done { color: #052b47; background: var(--rf-gold-soft); }
.p40-row-static .p40-stepper li.current { color: #052b47; background: var(--rf-gold); }
.p40-next { border-left: 5px solid var(--rf-gold); }
.p40-next p:not(.rf-eyebrow) { margin: 0; font-size: 15px; font-weight: 600; }
.p40-checklist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.p40-checklist label { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--rf-surface-2); font-size: 14px; }

/* growth & evaluation */
.p40-alerts { display: flex; flex-wrap: wrap; gap: 8px; }
.p40-alert { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 0; border-radius: 12px; font-size: 13px; font-weight: 700; }
.p40-alert.tone-red { color: var(--rf-red); background: var(--rf-red-soft); } .p40-alert.tone-amber { color: var(--rf-amber); background: var(--rf-amber-soft); } .p40-alert.tone-gold { color: var(--rf-gold-ink); background: var(--rf-gold-soft); } .p40-alert.tone-green { color: var(--rf-green); background: var(--rf-green-soft); }
.p40-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.p40-target { display: grid; gap: 6px; }
.p40-target span { font-size: 13px; font-weight: 700; }
.p40-target small { color: var(--rf-text-2); font-size: 12px; }
.p40-eval { display: grid; gap: 14px; border-top: 4px solid var(--rf-gold); }
.p40-eval.tone-green { border-top-color: var(--rf-green); } .p40-eval.tone-blue { border-top-color: var(--rf-blue); } .p40-eval.tone-red { border-top-color: var(--rf-red); }
.p40-eval-head { display: flex; align-items: center; gap: 14px; }
.p40-eval-head h3 { margin: 2px 0 4px; font-size: 18px; }
.p40-components { display: grid; gap: 8px; }
.p40-components div { display: grid; grid-template-columns: 110px 1fr 32px; align-items: center; gap: 10px; font-size: 12px; }
.p40-components b { text-align: right; }
.p40-appreciation, .p40-tips { padding: 12px 14px; border-radius: 14px; }
.p40-appreciation { background: var(--rf-green-soft); }
.p40-tips { background: var(--rf-gold-soft); }
.p40-appreciation ul, .p40-tips ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.p40-leave-entry { display: block; margin: 2px 0; font-size: 12px; }
.p40-rhythm { display: grid; grid-template-columns: 70px 1fr 44px; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rf-hairline); font-size: 13px; }
.p40-rhythm-checks { display: flex; gap: 4px; }
.p40-rhythm-checks i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--rf-text-3); background: var(--rf-surface-2); font-size: 12px; font-style: normal; font-weight: 900; }
.p40-rhythm-checks i.ok { color: #fff; background: var(--rf-green); }
.p40-rhythm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.p40-rhythm-card { display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: var(--rf-surface-2); }
.p40-rhythm-card header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.p40-rhythm-card header span { color: var(--rf-text-2); font-size: 12px; }
.p40-rhythm-card ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.p40-rhythm-card li { display: flex; gap: 8px; color: var(--rf-text-2); }
.p40-rhythm-card li.done { color: var(--rf-green); font-weight: 700; }
.p40-week { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.p40-day { display: grid; align-content: start; gap: 8px; min-height: 140px; padding: 12px; border-radius: 16px; background: var(--rf-surface-2); }
.p40-day.today { box-shadow: inset 0 0 0 2px var(--rf-gold); }
.p40-day header { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; }
.p40-task { display: grid; gap: 3px; padding: 10px; border-radius: 12px; background: var(--rf-surface); box-shadow: var(--rf-shadow-sm); font-size: 12px; }
.p40-task.due { border-left: 4px solid var(--rf-red); }
.p40-task p { margin: 4px 0 0; color: var(--rf-text-2); }
.p40-task small { color: var(--rf-text-3); }
.p40-task-course { justify-self: start; padding: 1px 7px; border-radius: 6px; color: #fff; background: #052b47; font-size: 10px; font-weight: 800; }
.p40-compare td { width: 50%; vertical-align: top; }
.p40-compare td:first-child { color: var(--rf-text-2); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--rf-red) 50%, transparent); }

/* identity & access audience filter */
.acc-audience { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.acc-audience-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--rf-hairline-strong); border-radius: 14px; color: var(--rf-text); background: var(--rf-surface); font-size: 14px; font-weight: 800; box-shadow: var(--rf-shadow-sm); }
.acc-audience-chip b { padding: 1px 8px; border-radius: 999px; color: var(--rf-text-2); background: var(--rf-surface-2); font-size: 12px; }
.acc-audience-chip.active { color: #fff; border-color: transparent; background: linear-gradient(135deg, #052b47, #0f4a73); }
.acc-audience-chip.active b { color: #052b47; background: var(--rf-gold); }

/* inactivity warning */
.p40-idle { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: rgba(3, 14, 22, .6); backdrop-filter: blur(6px); }
.p40-idle[hidden] { display: none; }
.p40-idle-card { width: min(420px, calc(100% - 32px)); padding: 28px; border-radius: 24px; color: var(--rf-text); background: var(--rf-elevated); box-shadow: var(--rf-shadow-lg); text-align: center; }
.p40-idle-card h3 { margin: 6px 0 8px; font-size: 22px; }
.p40-idle-card p { color: var(--rf-text-2); }
.p40-idle-card [data-idle-count] { color: var(--rf-red); font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .p40-funnel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .p40-grid { grid-template-columns: 1fr; }
  .p40-howto ol { grid-template-columns: 1fr; }
  .p40-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p40-attention { grid-template-columns: auto 1fr; }
  .p40-attention .rf-button { grid-column: 1 / -1; }
  .p40-drawer-summary { flex-direction: column; align-items: flex-start; }
  .p40-stepper { grid-template-columns: repeat(8, 1fr); }
  .p40-line { grid-template-columns: 1fr 1fr; }
  .p40-aging { grid-template-columns: 1fr 1fr auto; }
  .p40-pass-banner { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .p40-attention-dot { animation: none; }
  .p40-ring-value { transition: none; }
  .p40-case, .p40-request, .p40-funnel-stage { transition: none; }
}

/* Admission Journey filters: a tidy responsive grid; checkboxes read on one line; actions get their own row. */
.p40-filters { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 14px; align-items: end; }
.p40-filters > label { min-width: 0; }
.p40-filters .rf-check { display: flex; align-items: center; gap: 8px; min-height: 42px; white-space: nowrap; font-weight: 700; }
.p40-filters .rf-check input { width: 18px; height: 18px; }
.p40-filters .p40-grow { display: none; }
.p40-filters > .rf-form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 10px; border-top: 1px solid var(--rf-hairline); }
.p40-hero-journey { grid-template-columns: minmax(0, 1fr) auto; overflow: hidden; }
.p40-hero-journey .rf-hero-aside { justify-self: end; }
@media (max-width: 760px) { .p40-hero-journey { grid-template-columns: minmax(0, 1fr); } .p40-hero-journey .rf-hero-aside { justify-self: start; } .p40-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .p40-funnel { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
