/* ================================================================
   INTERACTIVE SECTIONS — closed loop + role switcher
   Layered ON TOP of existing CSS in index.html; no markup changes needed
   except for a light JS-side rewire.
   ================================================================ */

/* =========================================================
   THE CLOSED LOOP — lifecycle section becomes interactive
   ========================================================= */

/* Make the loop SVG bigger & more present. The hero section has room. */
.lifecycle-ilo {
  width: clamp(280px, 34vw, 460px) !important;
  height: clamp(200px, 24vw, 320px) !important;
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
}

/* Reset: slightly larger, livelier strokes */
.lifecycle-ilo svg { overflow: visible; }

/* Traveling dot that JS animates around the loop */
.loop-traveler {
  fill: var(--clay);
  filter: drop-shadow(0 0 6px rgba(30,58,95,0.55));
  transition: none;
}

/* The 4 station nodes: add data-step attribute via JS */
.loop-node {
  transition: r .4s cubic-bezier(.22,.61,.36,1), fill .3s ease;
  cursor: pointer;
}
.loop-node.is-active {
  fill: var(--clay);
  stroke: var(--clay);
  r: 18;
}
.loop-node.is-active + text,
.loop-node.is-active ~ text[data-step-num] {
  fill: #fff !important;
}

/* Labels brighten on active */
.loop-label {
  transition: fill .3s ease, font-weight .3s;
}
.loop-label.is-active {
  fill: var(--clay);
  font-weight: 600;
}

/* ---- The 4 step cards ---- */

.lc-grid {
  margin-top: 56px;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.lc {
  background: var(--paper);
  cursor: pointer;
  transition: background .3s ease, transform .3s ease, box-shadow .3s ease;
  position: relative;
  padding: 32px 24px 140px 24px; /* extra bottom room for expanded mini-demo */
  border-right: none !important; /* grid-gap handles separation */
  overflow: hidden;
}
.lc::before {
  display: none !important; /* remove the old clay dot */
}

.lc:hover { background: #FAFAF8; }

.lc.is-active {
  background: var(--ink);
  color: #fff;
  z-index: 2;
  box-shadow: 0 24px 48px rgba(15,24,32,0.12);
}
.lc.is-active .step,
.lc.is-active p,
.lc.is-active ul,
.lc.is-active ul li {
  color: rgba(255,255,255,0.82) !important;
  border-color: rgba(255,255,255,0.18) !important;
}
.lc.is-active h4 { color: #fff !important; }

/* Step number badge — appears top-right of each card */
.lc-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: all .3s ease;
  background: var(--paper);
}
.lc:hover .lc-badge { border-color: var(--clay); color: var(--clay); }
.lc.is-active .lc-badge {
  background: var(--clay);
  color: #fff;
  border-color: var(--clay);
  transform: scale(1.1);
}

/* Expanded mini-demo panel — hidden by default, expands when active */
.lc-demo {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  height: 96px;
  background: var(--chalk);
  border-radius: 8px;
  padding: 14px 16px;
  overflow: hidden;
  transition: all .4s cubic-bezier(.22,.61,.36,1);
  opacity: 0.45;
  transform: translateY(4px);
  pointer-events: none;
}
.lc.is-active .lc-demo {
  opacity: 1;
  transform: translateY(0);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
}

.lc-demo-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.lc.is-active .lc-demo-label { color: rgba(255,255,255,0.6); }

/* --- Mini demo for step 01: MEASURE — looks like a question row --- */
.lc-demo-measure { display: flex; flex-direction: column; gap: 6px; }
.lc-demo-measure .question {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink);
  transition: color .3s;
}
.lc.is-active .lc-demo-measure .question { color: #fff; }
.lc-demo-measure .scale {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.lc-demo-measure .scale i {
  flex: 1;
  height: 6px;
  border-radius: 2px;
  background: rgba(15,24,32,0.12);
}
.lc.is-active .lc-demo-measure .scale i { background: rgba(255,255,255,0.22); }
.lc-demo-measure .scale i.on {
  background: var(--clay);
  box-shadow: 0 0 8px rgba(30,58,95,0.4);
}
.lc.is-active .lc-demo-measure .scale i.on { background: var(--sage); box-shadow: 0 0 10px rgba(107,130,126,0.6); }

/* --- Mini demo for step 02: DIAGNOSE — three benchmark rows --- */
.lc-demo-diagnose { display: flex; flex-direction: column; gap: 5px; }
.lc-demo-diagnose .bench {
  display: grid;
  grid-template-columns: 52px 1fr 28px;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}
.lc-demo-diagnose .bench .l { color: var(--muted); text-transform: uppercase; }
.lc.is-active .lc-demo-diagnose .bench .l { color: rgba(255,255,255,0.55); }
.lc-demo-diagnose .bar {
  height: 5px;
  background: rgba(15,24,32,0.1);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.lc.is-active .lc-demo-diagnose .bar { background: rgba(255,255,255,0.14); }
.lc-demo-diagnose .bar span {
  position: absolute; inset: 0 auto 0 0;
  background: var(--clay);
  border-radius: 99px;
  transition: width 1.2s cubic-bezier(.22,.61,.36,1);
}
.lc.is-active .lc-demo-diagnose .bar span { background: var(--sage); }
.lc-demo-diagnose .v { color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.lc.is-active .lc-demo-diagnose .v { color: #fff; }

/* --- Mini demo for step 03: ACT — a compact action tile --- */
.lc-demo-act { display: flex; gap: 8px; align-items: center; }
.lc-demo-act .bullet {
  width: 14px; height: 14px; border-radius: 3px;
  border: 1.5px solid var(--clay);
  flex: 0 0 14px;
  position: relative;
}
.lc-demo-act .bullet.done::after {
  content: '✓';
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--clay);
  font-size: 10px;
  font-weight: 600;
}
.lc.is-active .lc-demo-act .bullet { border-color: var(--sage); }
.lc.is-active .lc-demo-act .bullet.done::after { color: var(--sage); }
.lc-demo-act .lines { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.lc-demo-act .lines .t {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink);
  line-height: 1.25;
}
.lc.is-active .lc-demo-act .lines .t { color: #fff; }
.lc-demo-act .lines .s {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.lc.is-active .lc-demo-act .lines .s { color: rgba(255,255,255,0.55); }

/* --- Mini demo for step 04: VERIFY — a tiny before/after delta chart --- */
.lc-demo-verify { display: flex; align-items: flex-end; gap: 10px; }
.lc-demo-verify .col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.lc-demo-verify .col .bar {
  width: 100%;
  background: var(--line-strong);
  border-radius: 2px 2px 0 0;
  transition: height 1s ease;
}
.lc.is-active .lc-demo-verify .col .bar { background: rgba(255,255,255,0.35); }
.lc-demo-verify .col .bar.hi { background: var(--clay); }
.lc.is-active .lc-demo-verify .col .bar.hi { background: var(--sage); }
.lc-demo-verify .col .lbl {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.lc.is-active .lc-demo-verify .col .lbl { color: rgba(255,255,255,0.65); }
.lc-demo-verify .delta {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--clay);
  padding-bottom: 4px;
  flex: 0 0 auto;
}
.lc.is-active .lc-demo-verify .delta { color: var(--sage); }

/* Progress ring on the loop SVG — a soft pulse around the active node */
@keyframes loopPulse {
  0% { r: 14; opacity: 0.4; }
  100% { r: 28; opacity: 0; }
}
.loop-pulse {
  animation: loopPulse 1.8s ease-out infinite;
  fill: none;
  stroke: var(--clay);
  stroke-width: 1.5;
  pointer-events: none;
}


/* =========================================================
   THE ROLE SWITCHER — roles section becomes interactive
   ========================================================= */

.roles-ilo {
  width: clamp(300px, 34vw, 480px) !important;
  height: clamp(200px, 22vw, 312px) !important;
}

/* The 4 role mini-cards inside the SVG get highlighting */
.roles-ilo .role-card-bg {
  transition: fill .4s ease, stroke .4s ease;
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1;
}
.roles-ilo .role-card.is-active .role-card-bg {
  fill: var(--ink);
  stroke: var(--ink);
}
.roles-ilo .role-card.is-active text {
  fill: #fff !important;
}
.roles-ilo .role-card {
  cursor: pointer;
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
  transform-origin: center;
  transform-box: fill-box;
}
.roles-ilo .role-card:hover { transform: translateX(-4px); }

/* Role tabs bar — appears ABOVE the grid when JS wires it */
.role-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 32px;
}
.role-tab {
  background: var(--paper);
  border: none;
  padding: 20px 24px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background .3s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 100px;
}
.role-tab:hover { background: #FAFAF8; }
.role-tab.is-active { background: var(--ink); color: #fff; }
.role-tab .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.role-tab.is-active .k { color: var(--sage); }
.role-tab .q {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}
.role-tab.is-active .q { color: #fff; }

/* The dashboard panel — shows what the active role sees */
.role-dash {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  transition: background .4s ease;
}
.role-dash.theme-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.role-dash-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.role-dash.theme-dark .role-dash-chrome {
  border-bottom: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
}
.role-dash-chrome .who em { font-style: normal; color: var(--clay); }
.role-dash.theme-dark .role-dash-chrome .who em { color: var(--sage); }
.role-dash-chrome .live {
  display: inline-flex; align-items: center; gap: 8px;
}
.role-dash-chrome .live::before {
  content:''; width: 6px; height: 6px; border-radius: 99px;
  background: #2F6B4D;
  animation: phxPulse 1.6s ease-in-out infinite;
}

.role-dash-body {
  padding: 32px;
  min-height: 360px;
  position: relative;
}
@media (max-width: 720px) { .role-dash-body { padding: 20px; } }

/* --- Executive dashboard view --- */
.role-view { display: none; }
.role-view.is-active { display: grid; }

.rv-exec {
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: stretch;
}
.rv-exec .quad {
  position: relative;
  aspect-ratio: 1.2 / 1;
  padding: 0 !important;
}
.rv-exec .quad-frame {
  position: absolute; inset: 32px 40px 40px 40px;
  border: 1px solid rgba(255,255,255,0.18);
}
.rv-exec .quad-frame .axis-v {
  position: absolute; top: 0; bottom: 0; left: 50%;
  border-left: 1px dashed rgba(255,255,255,0.18);
}
.rv-exec .quad-frame .axis-h {
  position: absolute; left: 0; right: 0; top: 50%;
  border-top: 1px dashed rgba(255,255,255,0.18);
}
.rv-exec .quad-frame .seg {
  position: absolute;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(107,130,126,0.18);
  transform: translate(-50%, -50%);
  transition: transform .3s;
}
.rv-exec .quad-frame .seg:hover { transform: translate(-50%, -50%) scale(1.5); }
.rv-exec .quad-frame .seg-label {
  position: absolute;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  transform: translate(12px, -50%);
  white-space: nowrap;
}
.rv-exec .quad-labels {
  position: absolute; inset: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.rv-exec .quad-labels .tl { position: absolute; top: 10px; left: 40px; }
.rv-exec .quad-labels .tr { position: absolute; top: 10px; right: 40px; text-align: right; }
.rv-exec .quad-labels .bl { position: absolute; bottom: 12px; left: 40px; }
.rv-exec .quad-labels .br { position: absolute; bottom: 12px; right: 40px; text-align: right; }

.rv-exec .kpis {
  display: flex; flex-direction: column; gap: 20px;
  border-left: 1px solid rgba(255,255,255,0.12);
  padding-left: 32px;
}
.role-dash:not(.theme-dark) .rv-exec .kpis { border-left-color: var(--line); }
.rv-exec .kpi .n {
  font-family: var(--serif);
  font-size: 52px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: inherit;
}
.rv-exec .kpi .n sup {
  font-size: 18px;
  color: var(--sage);
  vertical-align: top;
  margin-left: 6px;
  font-style: italic;
}
.rv-exec .kpi .l {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
}
.role-dash:not(.theme-dark) .rv-exec .kpi .l { color: var(--muted); }

/* --- HR dashboard --- */
.rv-hr {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
.rv-hr .panel {
  background: var(--chalk);
  border-radius: 6px;
  padding: 18px;
}
.role-dash.theme-dark .rv-hr .panel {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.rv-hr .panel .t {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.role-dash.theme-dark .rv-hr .panel .t { color: rgba(255,255,255,0.5); }

.rv-hr .dom-row {
  display: grid; grid-template-columns: 70px 1fr 30px;
  gap: 10px; align-items: center;
  font-size: 11px;
  margin-bottom: 8px;
}
.rv-hr .dom-row .nm { color: var(--ink); font-weight: 500; }
.role-dash.theme-dark .rv-hr .dom-row .nm { color: #fff; }
.rv-hr .dom-row .bar {
  height: 4px; border-radius: 99px; background: rgba(15,24,32,0.12);
  position: relative; overflow: hidden;
}
.role-dash.theme-dark .rv-hr .dom-row .bar { background: rgba(255,255,255,0.14); }
.rv-hr .dom-row .bar span { position: absolute; inset: 0 auto 0 0; background: var(--clay); border-radius: 99px; transition: width 1.2s; }
.role-dash.theme-dark .rv-hr .dom-row .bar span { background: var(--sage); }
.rv-hr .dom-row .pct {
  font-family: var(--mono); font-size: 10px;
  text-align: right; color: var(--muted);
}
.role-dash.theme-dark .rv-hr .dom-row .pct { color: rgba(255,255,255,0.65); }

.rv-hr .cohort {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink);
}
.role-dash.theme-dark .rv-hr .cohort { color: rgba(255,255,255,0.82); }
.rv-hr .cohort .arrow { color: var(--clay); font-weight: 600; }
.role-dash.theme-dark .rv-hr .cohort .arrow { color: var(--sage); }

/* --- Manager dashboard --- */
.rv-mgr {
  grid-template-columns: 1fr;
  gap: 20px;
}
.rv-mgr .team-row {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  align-items: center;
}
.role-dash:not(.theme-dark) .rv-mgr .team-row { border-top-color: var(--line); }
.rv-mgr .team-row:first-child { border-top: none; }
.rv-mgr .team-row .name {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
}
.rv-mgr .team-row .bar {
  height: 6px; border-radius: 99px; background: rgba(255,255,255,0.14);
  position: relative; overflow: hidden;
}
.role-dash:not(.theme-dark) .rv-mgr .team-row .bar { background: rgba(15,24,32,0.08); }
.rv-mgr .team-row .bar span {
  position: absolute; inset: 0 auto 0 0;
  background: var(--sage); border-radius: 99px;
  transition: width 1.4s cubic-bezier(.22,.61,.36,1);
}
.rv-mgr .team-row .bar.warn span { background: #C85A3F; }
.rv-mgr .team-row .val {
  font-family: var(--mono);
  font-size: 14px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rv-mgr .team-row .val em { font-style: normal; color: var(--sage); margin-left: 8px; font-size: 11px; }
.rv-mgr .team-row .val em.dn { color: #C85A3F; }

.rv-mgr .foot {
  padding-top: 20px;
  margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.16);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.role-dash:not(.theme-dark) .rv-mgr .foot {
  border-top-color: var(--line);
  color: var(--muted);
}

/* ============================================================
   DESKTOP SHELL — shared by Executive, HR, Manager role views
   Realistic app-window chrome + sidebar + main content area.
   ============================================================ */

/* Desktop role views use block layout; .rv-emp overrides to grid (see above) */
.role-view { display: none; }
.rv-exec.is-active, .rv-hr.is-active, .rv-mgr.is-active { display: block; }

.rv-exec, .rv-hr, .rv-mgr {
  width: 100%;
}

.dk-window {
  width: 100%;
  background: #14212F;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 2px 0 rgba(255,255,255,0.04) inset,
    0 30px 60px rgba(6, 11, 20, 0.35),
    0 10px 22px rgba(6, 11, 20, 0.22);
  display: flex;
  flex-direction: column;
  min-height: 520px;
}
.role-dash:not(.theme-dark) .dk-window {
  background: #FDFBF6;
  border-color: rgba(20,33,47,0.08);
  box-shadow:
    0 2px 0 rgba(255,255,255,0.04) inset,
    0 30px 60px rgba(20,33,47,0.14),
    0 10px 22px rgba(20,33,47,0.08);
}

/* --- Window chrome (traffic lights + url bar) --- */
.dk-chrome {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.role-dash:not(.theme-dark) .dk-chrome {
  background: #F5EFE2;
  border-bottom: 1px solid rgba(20,33,47,0.06);
}
.dk-dots { display: flex; gap: 6px; }
.dk-dots i {
  width: 11px; height: 11px; border-radius: 99px; display: block;
  background: rgba(255,255,255,0.15);
}
.dk-dots i:nth-child(1) { background: #ED6A5E; }
.dk-dots i:nth-child(2) { background: #F5BF4F; }
.dk-dots i:nth-child(3) { background: #62C454; }

.dk-tab {
  background: rgba(255,255,255,0.04);
  border-radius: 8px 8px 0 0;
  padding: 6px 14px;
  margin-bottom: -10px;
  align-self: end;
  max-width: 260px;
}
.role-dash:not(.theme-dark) .dk-tab {
  background: #FDFBF6;
  border: 1px solid rgba(20,33,47,0.06);
  border-bottom: none;
}
.dk-tab-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block;
}
.role-dash:not(.theme-dark) .dk-tab-title { color: var(--ink); }

.dk-url {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.35);
}
.role-dash:not(.theme-dark) .dk-url { color: var(--muted); }

.dk-chrome-right .dk-who {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.role-dash:not(.theme-dark) .dk-chrome-right .dk-who { color: var(--muted); }

/* --- Body split: sidebar + main --- */
.dk-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  flex: 1;
  min-height: 0;
}

.dk-sidebar {
  background: rgba(0,0,0,0.25);
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 24px 14px 18px;
  display: flex;
  flex-direction: column;
}
.role-dash:not(.theme-dark) .dk-sidebar {
  background: #F8F2E4;
  border-right: 1px solid rgba(20,33,47,0.06);
}

.dk-brand {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #D8E2D1;
  font-weight: 600;
  margin-bottom: 22px;
  padding: 0 8px;
}
.dk-brand-slash { color: rgba(255,255,255,0.35); margin: 0 4px; font-weight: 400; }
.dk-brand em { font-style: normal; color: rgba(255,255,255,0.55); }
.role-dash:not(.theme-dark) .dk-brand { color: var(--ink); }
.role-dash:not(.theme-dark) .dk-brand-slash,
.role-dash:not(.theme-dark) .dk-brand em { color: var(--muted); }

.dk-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.dk-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: none; border: none; cursor: default;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  border-radius: 6px;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.dk-nav-item .dot {
  width: 4px; height: 4px; border-radius: 99px;
  background: rgba(255,255,255,0.22);
  flex: 0 0 4px;
}
.role-dash:not(.theme-dark) .dk-nav-item { color: var(--muted); }
.role-dash:not(.theme-dark) .dk-nav-item .dot { background: rgba(20,33,47,0.2); }
.dk-nav-item.is-active { background: rgba(216,226,209,0.08); color: #F2EDE4; }
.dk-nav-item.is-active .dot { background: #D8E2D1; }
.role-dash:not(.theme-dark) .dk-nav-item.is-active {
  background: rgba(159,184,163,0.15); color: var(--ink);
}
.role-dash:not(.theme-dark) .dk-nav-item.is-active .dot { background: var(--sage); }

.dk-badge {
  margin-left: auto;
  background: rgba(200, 90, 63, 0.18);
  color: #E08D72;
  font-family: var(--mono);
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 99px;
  letter-spacing: 0.08em;
}
.role-dash:not(.theme-dark) .dk-badge {
  background: rgba(200, 90, 63, 0.12);
  color: #B04425;
}

.dk-sidebar-foot {
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 16px;
}
.role-dash:not(.theme-dark) .dk-sidebar-foot { border-top-color: rgba(20,33,47,0.08); }
.dk-user { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.dk-avatar {
  width: 26px; height: 26px; border-radius: 99px;
  background: linear-gradient(135deg, #D8E2D1, #9FB8A3);
  flex: 0 0 26px;
}
.dk-uname {
  font-family: var(--mono); font-size: 10px;
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.04em;
}
.dk-urole {
  font-family: var(--mono); font-size: 9px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.1em;
  margin-top: 1px;
}
.role-dash:not(.theme-dark) .dk-uname { color: var(--ink); }
.role-dash:not(.theme-dark) .dk-urole { color: var(--muted); }

/* --- Main area --- */
.dk-main {
  padding: 28px 32px 32px;
  overflow: hidden;
  min-width: 0;
}

.dx-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.role-dash:not(.theme-dark) .dx-head { border-bottom-color: rgba(20,33,47,0.08); }
.dx-eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
}
.role-dash:not(.theme-dark) .dx-eyebrow { color: var(--muted); }
.dx-title {
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #F2EDE4;
  margin: 0;
  font-weight: 400;
}
.dx-title em { font-style: italic; color: #D8E2D1; }
.role-dash:not(.theme-dark) .dx-title { color: var(--ink); }
.role-dash:not(.theme-dark) .dx-title em { color: #7A9581; }

.dx-head-meta { display: flex; gap: 8px; flex-shrink: 0; }
.dx-chip {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
}
.role-dash:not(.theme-dark) .dx-chip {
  border-color: rgba(20,33,47,0.1);
  color: var(--muted);
}

/* Panels */
.dx-panel {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 18px 18px 16px;
  background: rgba(255,255,255,0.02);
}
.role-dash:not(.theme-dark) .dx-panel {
  border-color: rgba(20,33,47,0.08);
  background: #FFFFFF;
}
.dx-panel-head {
  display: flex; justify-content: space-between;
  align-items: baseline; gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.role-dash:not(.theme-dark) .dx-panel-head { border-bottom-color: rgba(20,33,47,0.06); }
.dx-panel-head .h {
  font-family: var(--serif); font-style: italic;
  font-size: 16px;
  color: #F2EDE4;
}
.role-dash:not(.theme-dark) .dx-panel-head .h { color: var(--ink); }
.dx-panel-head .m {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.role-dash:not(.theme-dark) .dx-panel-head .m { color: var(--muted); }

/* --- Executive specific --- */
.dx-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
/* Exec home — question-driven quick-link cards (mirrors the real product) */
.dx-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dx-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.dx-card:hover { border-color: rgba(255,255,255,0.28); transform: translateY(-2px); background: rgba(255,255,255,0.05); }
.dxc-eye { font-family: var(--mono, ui-monospace, monospace); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.45); }
.dxc-t { font-family: var(--serif, Georgia, serif); font-size: 17px; line-height: 1.2; color: #F2EDE4; letter-spacing: -0.01em; }
.dxc-l { font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.6); flex: 1; }
.dxc-open { display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; font-family: var(--mono, ui-monospace, monospace); font-size: 9px; font-weight: 600; letter-spacing: 0.14em; color: rgba(255,255,255,0.85); }
.dxc-open svg { width: 15px; height: 9px; transition: transform .2s ease; }
.dx-card:hover .dxc-open svg { transform: translateX(3px); }
.dx-chip-solid { background: var(--clay, #2F4A6B) !important; color: #fff !important; border-color: transparent !important; }
/* Light-theme exec card overrides */
.role-dash:not(.theme-dark) .dx-card { border-color: rgba(20,33,47,0.1); background: #FFFFFF; }
.role-dash:not(.theme-dark) .dx-card:hover { border-color: var(--clay, #2F4A6B); background: #FFFFFF; }
.role-dash:not(.theme-dark) .dxc-eye { color: var(--muted); }
.role-dash:not(.theme-dark) .dxc-t { color: var(--ink); }
.role-dash:not(.theme-dark) .dxc-l { color: var(--muted); }
.role-dash:not(.theme-dark) .dxc-open { color: var(--clay, #2F4A6B); }
@media (max-width: 720px) { .dx-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .dx-cards { grid-template-columns: 1fr; } }
.dx-kpi {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px 14px;
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.role-dash:not(.theme-dark) .dx-kpi {
  border-color: rgba(20,33,47,0.08);
  background: #FFFFFF;
}
.dx-kpi .n {
  font-family: var(--serif);
  font-style: italic;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #D8E2D1;
}
.dx-kpi .n em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: rgba(216,226,209,0.55);
  font-weight: 400;
  margin-left: -2px;
}
.role-dash:not(.theme-dark) .dx-kpi .n { color: #7A9581; }
.role-dash:not(.theme-dark) .dx-kpi .n em { color: rgba(122,149,129,0.55); }
.dx-kpi .d { display: flex; flex-direction: column; gap: 2px; }
.dx-kpi .d .up { color: #9FB8A3; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; }
.dx-kpi .d .warn { color: #E08D72; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; }
.dx-kpi .d .l { font-family: var(--mono); font-size: 9px; color: rgba(255,255,255,0.45); letter-spacing: 0.14em; text-transform: uppercase; }
.role-dash:not(.theme-dark) .dx-kpi .d .l { color: var(--muted); }

.dx-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
}
.dx-panel-quad { padding: 18px; }
.dx-quad {
  position: relative;
  aspect-ratio: 1 / 1;
  max-height: 260px;
  margin: 0 auto;
}
.dxq-labels {
  position: absolute; inset: 0;
  pointer-events: none;
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}
.role-dash:not(.theme-dark) .dxq-labels { color: var(--muted); }
.dxq-labels .tl { position: absolute; top: 2px; left: 28px; }
.dxq-labels .tr { position: absolute; top: 2px; right: 28px; text-align: right; }
.dxq-labels .bl { position: absolute; bottom: 4px; left: 28px; }
.dxq-labels .br { position: absolute; bottom: 4px; right: 28px; text-align: right; }
.dxq-frame {
  position: absolute;
  top: 20px; bottom: 20px; left: 24px; right: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px;
}
.role-dash:not(.theme-dark) .dxq-frame { border-color: rgba(20,33,47,0.12); }
.dxq-frame .axv,
.dxq-frame .axh {
  position: absolute;
  background: rgba(255,255,255,0.06);
}
.role-dash:not(.theme-dark) .dxq-frame .axv,
.role-dash:not(.theme-dark) .dxq-frame .axh { background: rgba(20,33,47,0.1); }
.dxq-frame .axv { top: 0; bottom: 0; left: 50%; width: 1px; }
.dxq-frame .axh { left: 0; right: 0; top: 50%; height: 1px; }

.dxq-seg {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 6px;
}
.dxq-seg i {
  width: 10px; height: 10px; border-radius: 99px;
  background: #D8E2D1;
  box-shadow: 0 0 0 3px rgba(216,226,209,0.15);
}
.dxq-seg span {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.7);
}
.role-dash:not(.theme-dark) .dxq-seg span { color: var(--ink); }
.dxq-seg.dxq-warn i { background: #E08D72; box-shadow: 0 0 0 3px rgba(224,141,114,0.18); }

.dx-trend { width: 100%; height: 140px; display: block; margin-bottom: 4px; }
.dx-trend-legend {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 2px 0 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 10px;
}
.role-dash:not(.theme-dark) .dx-trend-legend { color: var(--muted); border-bottom-color: rgba(20,33,47,0.06); }

.dx-cal {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
}
.dx-cal .c { height: 14px; border-radius: 2px; background: rgba(255,255,255,0.06); display: block; }
.role-dash:not(.theme-dark) .dx-cal .c { background: rgba(20,33,47,0.06); }
.dx-cal .c-0 { background: rgba(224,141,114,0.4); }
.dx-cal .c-1 { background: rgba(224,141,114,0.18); }
.dx-cal .c-2 { background: rgba(216,226,209,0.12); }
.dx-cal .c-3 { background: rgba(216,226,209,0.35); }
.dx-cal .c-4 { background: rgba(216,226,209,0.65); }
.role-dash:not(.theme-dark) .dx-cal .c-0 { background: rgba(200,90,63,0.35); }
.role-dash:not(.theme-dark) .dx-cal .c-1 { background: rgba(200,90,63,0.15); }
.role-dash:not(.theme-dark) .dx-cal .c-2 { background: rgba(159,184,163,0.2); }
.role-dash:not(.theme-dark) .dx-cal .c-3 { background: rgba(159,184,163,0.45); }
.role-dash:not(.theme-dark) .dx-cal .c-4 { background: rgba(122,149,129,0.7); }

/* --- HR specific --- */
.hr-signals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.hr-signal {
  border: 1px solid rgba(20,33,47,0.08);
  border-radius: 12px;
  padding: 16px;
  background: #FFFFFF;
}
.role-dash.theme-dark .hr-signal {
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}
.hr-signal.is-warn {
  border-color: rgba(200,90,63,0.3);
  background: rgba(200,90,63,0.05);
}
.hs-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.hs-eyebrow {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.hs-title {
  font-family: var(--serif); font-style: italic;
  font-size: 18px; letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.2;
}
.hs-delta {
  font-family: var(--serif); font-style: italic;
  font-size: 32px; line-height: 1;
  color: #C85A3F;
  letter-spacing: -0.02em;
}
.hs-delta em { font-style: normal; font-size: 12px; color: rgba(200,90,63,0.6); margin-left: 2px; }
.hs-delta.dn { color: #7A9581; }
.hs-spark { margin: 10px 0 12px; }
.hs-action {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #B04425;
  padding-top: 10px; border-top: 1px solid rgba(200,90,63,0.2);
}

.hs-domains { display: flex; flex-direction: column; gap: 10px; }
.hs-dom {
  display: grid;
  grid-template-columns: 60px 1fr 28px;
  gap: 10px;
  align-items: center;
}
.hs-dom .nm { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.hs-dom .bar { height: 3px; background: rgba(20,33,47,0.08); border-radius: 99px; position: relative; overflow: hidden; }
.hs-dom .bar i { position: absolute; inset: 0 auto 0 0; background: #7A9581; border-radius: 99px; display: block; }
.hs-dom .bar.warn i { background: #C85A3F; }
.hs-dom .v { font-family: var(--mono); font-size: 10px; text-align: right; color: var(--ink); }

.hr-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 12px;
}
.hr-panel { padding: 16px 18px; }
.hr-cohorts { display: flex; flex-direction: column; }
.hr-coh {
  display: flex; justify-content: space-between;
  padding: 9px 0;
  border-top: 1px solid rgba(20,33,47,0.06);
  font-family: var(--mono); font-size: 11px;
}
.hr-coh:first-child { border-top: none; }
.hr-coh .nm { color: var(--ink); letter-spacing: 0.04em; }
.hr-coh .v.up { color: #7A9581; }
.hr-coh .v.dn { color: #C85A3F; }
.hr-coh.is-warn { background: rgba(200,90,63,0.04); padding-left: 8px; padding-right: 8px; margin: 0 -8px; border-radius: 4px; }

.hr-plans { display: flex; flex-direction: column; }
.hr-plan {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid rgba(20,33,47,0.06);
  font-size: 12px;
}
.hr-plan:first-child { border-top: none; }
.hr-plan .hp-n {
  font-family: var(--mono); font-size: 9px;
  color: var(--muted); letter-spacing: 0.12em;
}
.hr-plan .hp-t {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.25;
}
.hr-plan .hp-s {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 99px;
}
.hp-s.s-track { background: rgba(159,184,163,0.18); color: #5A7A63; }
.hp-s.s-due   { background: rgba(245,191,79,0.18); color: #8B6B15; }
.hp-s.s-over  { background: rgba(200,90,63,0.15); color: #B04425; }

/* --- Manager specific --- */
.mgr-summary {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.mgr-score {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 20px;
  background: rgba(255,255,255,0.02);
  text-align: center;
}
.role-dash:not(.theme-dark) .mgr-score {
  border-color: rgba(20,33,47,0.08);
  background: #FFFFFF;
}
.mgr-score .ms-num {
  font-family: var(--serif); font-style: italic;
  font-size: 68px; line-height: 0.95;
  letter-spacing: -0.04em;
  color: #D8E2D1;
}
.mgr-score .ms-num em {
  font-style: italic;
  font-size: 36px;
  color: rgba(216,226,209,0.5);
}
.role-dash:not(.theme-dark) .mgr-score .ms-num { color: #7A9581; }
.role-dash:not(.theme-dark) .mgr-score .ms-num em { color: rgba(122,149,129,0.55); }
.mgr-score .ms-lab {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin: 8px 0 4px;
}
.role-dash:not(.theme-dark) .mgr-score .ms-lab { color: var(--muted); }
.mgr-score .ms-delta {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  color: #9FB8A3;
}
.mgr-score .ms-delta.up { color: #9FB8A3; }
.role-dash:not(.theme-dark) .mgr-score .ms-delta { color: #7A9581; }

.mgr-flag {
  border: 1px solid rgba(200,90,63,0.35);
  background: rgba(200,90,63,0.08);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex; flex-direction: column;
}
.mf-eyebrow {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: #E08D72;
  margin-bottom: 6px;
}
.mf-title {
  font-family: var(--serif); font-style: italic;
  font-size: 20px; line-height: 1.2;
  color: #F2EDE4;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.role-dash:not(.theme-dark) .mf-title { color: var(--ink); }
.mf-body {
  font-family: var(--serif); font-size: 13px;
  line-height: 1.5;
  color: rgba(242,237,228,0.7);
  margin-bottom: 10px;
}
.role-dash:not(.theme-dark) .mf-body { color: var(--muted); }
.mf-cta {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #E08D72;
  margin-top: auto;
}

.mgr-panel { padding: 18px 20px; }
.mgr-teams { display: flex; flex-direction: column; gap: 2px; }
.mt-row {
  display: grid;
  grid-template-columns: 160px 1fr 86px 90px;
  gap: 14px;
  align-items: center;
  padding: 10px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.mt-row:hover { background: rgba(255,255,255,0.03); }
.role-dash:not(.theme-dark) .mt-row:hover { background: rgba(20,33,47,0.03); }
.mt-row.is-warn { background: rgba(200,90,63,0.06); }
.mt-name {
  font-family: var(--serif); font-style: italic;
  font-size: 15px;
  color: #F2EDE4;
}
.role-dash:not(.theme-dark) .mt-name { color: var(--ink); }
.mt-name em {
  font-family: var(--mono); font-style: normal;
  font-size: 10px; color: rgba(255,255,255,0.4);
  letter-spacing: 0.1em; margin-left: 6px;
}
.role-dash:not(.theme-dark) .mt-name em { color: var(--muted); }
.mt-bar {
  height: 4px; border-radius: 99px;
  background: rgba(255,255,255,0.1);
  position: relative; overflow: hidden;
}
.role-dash:not(.theme-dark) .mt-bar { background: rgba(20,33,47,0.08); }
.mt-bar i {
  position: absolute; inset: 0 auto 0 0;
  background: #D8E2D1;
  border-radius: 99px;
  display: block;
}
.mt-bar.warn i { background: #E08D72; }
.mt-val {
  font-family: var(--serif); font-style: italic;
  font-size: 20px; color: #F2EDE4;
  display: flex; align-items: baseline; gap: 6px;
  letter-spacing: -0.02em;
}
.role-dash:not(.theme-dark) .mt-val { color: var(--ink); }
.mt-val .up {
  font-family: var(--mono); font-style: normal;
  font-size: 10px; color: #9FB8A3; letter-spacing: 0.08em;
}
.mt-val .dn {
  font-family: var(--mono); font-style: normal;
  font-size: 10px; color: #E08D72; letter-spacing: 0.08em;
}
.mt-state {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  text-align: right;
}
.role-dash:not(.theme-dark) .mt-state { color: var(--muted); }
.mt-state.warn { color: #E08D72; }

.mgr-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.role-dash:not(.theme-dark) .mgr-foot {
  border-top-color: rgba(20,33,47,0.08);
  color: var(--muted);
}

/* Hide the old .role-dash-chrome on exec/hr/mgr too — desktop shell already has its own chrome */
.role-dash:not(.is-emp) .role-dash-chrome { display: none; }
.role-dash:not(.is-emp) .role-dash-body { padding: 28px 36px; }

/* Responsive */
@media (max-width: 1080px) {
  .dx-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dx-split { grid-template-columns: 1fr; }
  .hr-signals, .hr-grid { grid-template-columns: 1fr; }
  .mgr-summary { grid-template-columns: 1fr; }
  .mt-row { grid-template-columns: 140px 1fr 80px; }
  .mt-row .mt-state { display: none; }
}
@media (max-width: 760px) {
  .dk-body { grid-template-columns: 1fr; }
  .dk-sidebar { display: none; }
  .dx-head { flex-direction: column; align-items: flex-start; }
  .dx-head-meta { flex-wrap: wrap; }
}

/* --- Employee view — mobile phone frame + swipeable pages --- */
.role-dash.is-emp .role-dash-chrome { display: none; }
.role-dash.is-emp .role-dash-body { padding: 48px 48px; }
@media (max-width: 900px) {
  .role-dash.is-emp .role-dash-body { padding: 32px 20px; }
}

.rv-emp {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  align-items: center;
}

.emp-phone-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.emp-phone {
  position: relative;
  width: 300px;
  height: 610px;
  border-radius: 42px;
  background: linear-gradient(180deg, #1a1f28 0%, #0e1218 100%);
  padding: 10px;
  box-shadow:
    0 2px 0 rgba(255,255,255,0.06) inset,
    0 -2px 0 rgba(0,0,0,0.35) inset,
    0 30px 60px rgba(6, 11, 20, 0.45),
    0 10px 20px rgba(6, 11, 20, 0.3);
}
.role-dash:not(.theme-dark) .emp-phone {
  box-shadow:
    0 2px 0 rgba(255,255,255,0.06) inset,
    0 -2px 0 rgba(0,0,0,0.35) inset,
    0 30px 60px rgba(20, 33, 47, 0.25),
    0 10px 20px rgba(20, 33, 47, 0.15);
}
.emp-phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 22px;
  background: #000;
  border-radius: 99px;
  z-index: 3;
}
.emp-phone-home {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255,255,255,0.55);
  z-index: 3;
}

.emp-phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: var(--ink, #14212F);
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}
.emp-phone-screen:active { cursor: grabbing; }

.emp-pages {
  display: flex;
  width: 400%;   /* 4 pages */
  height: 100%;
  transition: transform 0.55s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
.emp-page {
  width: 25%;
  height: 100%;
  flex: 0 0 25%;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 52px 22px 28px;
  box-sizing: border-box;
  color: #F2EDE4;
}

.emp-statusbar {
  position: absolute;
  top: 16px; left: 20px; right: 20px;
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(242,237,228,0.7);
  z-index: 2;
}
.emp-statusbar.light { color: rgba(242,237,228,0.85); }
.emp-sb-right { letter-spacing: 0.15em; }

.emp-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242,237,228,0.55);
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(242,237,228,0.08);
  margin-bottom: 18px;
}
.emp-brand { color: rgba(242,237,228,0.75); font-weight: 600; }
.emp-close { font-size: 14px; letter-spacing: 0; color: rgba(242,237,228,0.7); }

/* Page 1 — Today */
.emp-p-today { background: #14212F; }
.emp-today-inner { flex: 1; display: flex; flex-direction: column; }
.emp-eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(242,237,228,0.5);
  margin-bottom: 8px;
}
.emp-bignum {
  font-family: var(--serif);
  font-style: italic;
  font-size: 108px;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #D8E2D1;
  margin: 2px 0 10px;
}
.emp-subtle {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.4;
  color: rgba(242,237,228,0.78);
  margin-bottom: 22px;
  max-width: 230px;
}
.emp-today-bars { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.emp-bar {
  display: grid;
  grid-template-columns: 56px 1fr 24px;
  gap: 10px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.emp-bar .nm { color: rgba(242,237,228,0.6); text-transform: uppercase; }
.emp-bar .bar { position: relative; height: 2px; background: rgba(242,237,228,0.1); border-radius: 99px; overflow: hidden; }
.emp-bar .bar i { position: absolute; inset: 0 auto 0 0; background: #D8E2D1; border-radius: 99px; display: block; }
.emp-bar .v { text-align: right; color: rgba(242,237,228,0.85); }

/* Page 2 — Results */
.emp-p-results { background: #14212F; }
.emp-results-inner { flex: 1; display: flex; flex-direction: column; }
.emp-trend {
  width: 100%;
  height: 160px;
  margin: 12px 0 6px;
  display: block;
}
.emp-trend-legend {
  display: flex; gap: 16px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242,237,228,0.55);
  margin-bottom: 18px;
}
.emp-trend-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 99px; margin-right: 6px; vertical-align: middle; }
.emp-trend-legend .dot-sage { background: #D8E2D1; }
.emp-trend-legend .dot-line { background: rgba(242,237,228,0.3); }
.emp-pillbox { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.emp-pillbox .pill {
  border: 1px solid rgba(242,237,228,0.14);
  border-radius: 12px;
  padding: 12px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.emp-pillbox .pill span {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #D8E2D1;
  margin-bottom: 4px;
  text-transform: none;
}
.emp-pillbox .pill em { font-style: normal; color: rgba(242,237,228,0.55); }

/* Page 3 — Academy */
.emp-p-academy { background: #14212F; }
.emp-academy-inner { flex: 1; display: flex; flex-direction: column; }
.emp-course-card {
  border: 1px solid rgba(242,237,228,0.14);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  background: linear-gradient(145deg, rgba(216,226,209,0.08) 0%, rgba(216,226,209,0.02) 100%);
}
.emp-course-card .c-chapter {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(242,237,228,0.5);
  margin-bottom: 8px;
}
.emp-course-card .c-title {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #F2EDE4;
  margin-bottom: 14px;
}
.emp-course-card .c-title em { font-style: italic; color: #D8E2D1; }
.emp-course-card .c-foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}
.emp-course-card .c-play { color: #D8E2D1; }
.emp-course-card .c-time { color: rgba(242,237,228,0.55); }

.emp-course-list { display: flex; flex-direction: column; }
.emp-course-list .c-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid rgba(242,237,228,0.08);
  font-size: 13px;
}
.emp-course-list .c-row:first-child { border-top: none; }
.emp-course-list .c-row .n {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(242,237,228,0.45);
  letter-spacing: 0.14em;
}
.emp-course-list .c-row .t {
  font-family: var(--serif);
  color: rgba(242,237,228,0.85);
  line-height: 1.3;
}
.emp-course-list .c-row .m {
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(242,237,228,0.4);
  letter-spacing: 0.14em;
}

/* Page 4 — Rest (full-bleed) */
.emp-p-rest {
  background:
    radial-gradient(120% 80% at 50% 100%, rgba(170, 90, 50, 0.35) 0%, rgba(20,33,47,0) 55%),
    linear-gradient(180deg, #0e1218 0%, #14212F 100%);
  padding: 52px 22px 44px;
}
.emp-rest-inner { flex: 1; display: flex; flex-direction: column; }
.emp-rest-chapter, .emp-rest-kicker {
  font-family: var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.emp-rest-chapter { font-size: 9px; color: rgba(216,226,209,0.6); margin-bottom: 6px; }
.emp-rest-kicker  { font-size: 11px; color: #D8E2D1; }
.emp-rest-spacer { flex: 1; }
.emp-rest-title {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: #F2EDE4;
  margin: 0 0 20px;
  font-weight: 400;
}
.emp-rest-title em { font-style: italic; color: #D8E2D1; }
.emp-rest-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
}
.emp-rest-play { display: flex; align-items: center; gap: 10px; }
.emp-rest-play .p-ico {
  width: 28px; height: 28px;
  border-radius: 99px;
  border: 1px solid rgba(242,237,228,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: #F2EDE4;
  padding-left: 2px;
}
.emp-rest-play .p-meta {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(242,237,228,0.6);
  margin-bottom: 2px;
}
.emp-rest-play .p-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: #F2EDE4;
}
.emp-rest-time {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(242,237,228,0.55);
  letter-spacing: 0.1em;
}
.emp-rest-progress {
  height: 2px; background: rgba(242,237,228,0.12); border-radius: 99px; overflow: hidden;
}
.emp-rest-progress i {
  display: block; height: 100%;
  background: #F2EDE4;
  border-radius: 99px;
}

.emp-cta-row {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242,237,228,0.4);
  padding-top: 12px;
  text-align: right;
}
.emp-p-rest .emp-cta-row { display: none; }

/* Right-side explainer + pager */
.emp-side {
  padding: 8px 0;
  max-width: 460px;
}
.emp-side-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 14px;
}
.role-dash:not(.theme-dark) .emp-side-eyebrow { color: var(--muted); }
.emp-side-title {
  font-family: var(--serif);
  font-size: clamp(28px, 2.6vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #F2EDE4;
  margin: 0 0 16px;
  font-weight: 400;
}
.role-dash:not(.theme-dark) .emp-side-title { color: var(--ink); }
.emp-side-body {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255,255,255,0.7);
  margin: 0 0 28px;
  max-width: 420px;
}
.role-dash:not(.theme-dark) .emp-side-body { color: var(--muted); }

.emp-pager {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 400px;
}
.emp-dot {
  background: none;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  padding: 12px 8px 10px;
  cursor: pointer;
  text-align: center;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
  position: relative;
}
.role-dash:not(.theme-dark) .emp-dot { border-color: var(--line); }
.emp-dot::before {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.22);
  transition: background 0.25s, width 0.25s;
}
.role-dash:not(.theme-dark) .emp-dot::before { background: rgba(20,33,47,0.2); }
.emp-dot .dn {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.role-dash:not(.theme-dark) .emp-dot .dn { color: var(--muted); }
.emp-dot.is-active { background: rgba(216,226,209,0.08); border-color: rgba(216,226,209,0.3); }
.role-dash:not(.theme-dark) .emp-dot.is-active { background: rgba(159,184,163,0.12); border-color: rgba(159,184,163,0.45); }
.emp-dot.is-active::before { background: #D8E2D1; width: 32px; }
.emp-dot.is-active .dn { color: #F2EDE4; }
.role-dash:not(.theme-dark) .emp-dot.is-active .dn { color: var(--ink); }
.emp-dot:hover { transform: translateY(-1px); }

.emp-side-hint {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  transition: opacity 0.4s;
}
.role-dash:not(.theme-dark) .emp-side-hint { color: var(--muted); opacity: 0.65; }
.emp-side-hint.is-dim { opacity: 0.35; }

/* Responsive */
@media (max-width: 900px) {
  .role-tabs { grid-template-columns: repeat(2, 1fr); }
  .rv-exec, .rv-hr { grid-template-columns: 1fr !important; }
  .rv-emp {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }
  .lc { padding-bottom: 130px !important; }
}

/* Hide the old .role-grid entirely — replaced by .role-tabs + .role-dash */
.role-grid { display: none !important; }
