:root {
  --purple-900: #1e0b3a;
  --purple-800: #2d1157;
  --purple-700: #3f1a7a;
  --purple-500: #6b3fc4;
  --magenta: #d6246e;
  --magenta-600: #b81c5e;
  --ink: #1d1a24;
  --muted: #6b6578;
  --line: #e7e3ee;
  --bg: #f7f5fa;
  --card: #ffffff;
  --radius: 14px;
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
a { color: var(--purple-500); }
.muted { color: var(--muted); margin: 0; }
.small { font-size: .85rem; }
.eyebrow {
  font-family: var(--font-head); font-weight: 700; font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--magenta); margin: 0 0 .4rem;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 2rem;
  padding: .75rem clamp(16px, 4vw, 40px);
  background: linear-gradient(90deg, var(--purple-900), var(--purple-700));
  color: #fff;
}
.brand { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
  background: var(--magenta); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: .9rem;
}
.brand-text { font-family: var(--font-head); font-weight: 600; font-size: .95rem; }
.topnav { display: flex; gap: 1.25rem; flex: 1; }
.topnav a { color: rgba(255,255,255,.75); text-decoration: none; font-weight: 600; font-size: .9rem; padding: .3rem 0; }
.topnav a.active, .topnav a:hover { color: #fff; border-bottom: 2px solid var(--magenta); }
.user { display: flex; align-items: center; gap: .6rem; }
.user form { margin: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.avatar-fallback { display: inline-grid; place-items: center; background: var(--purple-500); font-weight: 700; }
.user-name { font-weight: 600; font-size: .9rem; }
.link-btn { background: none; border: 0; color: rgba(255,255,255,.75); cursor: pointer; font: inherit; font-size: .85rem; }
.link-btn:hover { color: #fff; text-decoration: underline; }

/* ---------- Page ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 40px) 64px; }
.page.narrow { max-width: 560px; }
.hero { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: end; margin-bottom: 2.5rem; }
.position-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.25rem; min-width: 260px;
}
.position-name { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; margin: 0 0 .2rem; }
.section-title { margin-top: .5rem; }

.stages {
  list-style: none; padding: 0; margin: 1.25rem 0 2rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.stage {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .35rem;
}
.stage-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.stage-num {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--purple-800); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .8rem;
}
.stage-name { font-family: var(--font-head); font-weight: 700; }
.stage-stat { margin: .2rem 0 0; }
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--purple-500), var(--magenta)); }

.empty {
  border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; background: #fff;
}

/* ---------- Buttons & alerts ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.3rem; border-radius: 10px; border: 1.5px solid transparent;
  font-family: var(--font-head); font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--magenta); color: #fff; }
.btn-primary:hover { background: var(--magenta-600); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--muted); }
.btn-block { width: 100%; }
.alert { padding: .75rem 1rem; border-radius: 10px; background: #eef6ee; color: #1f5b2a; margin-bottom: 1rem; font-size: .9rem; }
.alert-error { background: #fdecef; color: #8a1538; }

/* ---------- Login ---------- */
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-hero {
  background:
    radial-gradient(circle at 85% 15%, rgba(214,36,110,.35), transparent 45%),
    linear-gradient(160deg, var(--purple-900), var(--purple-700));
  color: #fff; padding: clamp(28px, 5vw, 64px);
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-hero blockquote {
  font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.1; margin: 0;
}
.hero-sub { font-family: var(--font-head); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; opacity: .75; }
.login-panel { display: grid; place-items: center; padding: 32px 16px; background: #fff; }
.login-box { width: 100%; max-width: 360px; }
.login-box h1 { margin-bottom: .3rem; }
.login-box > .muted { margin-bottom: 1.5rem; }
.dev-login { margin-top: .75rem; }
.fine { margin-top: 1.25rem; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .stages { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { min-height: 220px; gap: 1.5rem; }
  .topbar { flex-wrap: wrap; gap: .75rem 1rem; }
  .topnav { order: 3; flex-basis: 100%; }
  .user-name { display: none; }
  .user { margin-left: auto; }
  .brand-text { font-size: .82rem; }
}
@media (max-width: 480px) {
  .stages { grid-template-columns: 1fr; }
}

/* ================= Step 2 components ================= */
.page.wide { max-width: 1320px; }
.btn-sm { padding: .45rem .85rem; font-size: .82rem; border-radius: 8px; }
.btn-light { background: #fff; color: var(--purple-800); }
.link-btn.dark { color: var(--purple-500); padding: 0; font-weight: 600; }
.link-btn.dark:hover { color: var(--magenta); }
.row-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.title-row form { margin: 0; }

.viewas-banner {
  display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap;
  padding: .6rem 16px; background: var(--magenta); color: #fff; font-size: .9rem; position: sticky; top: 0; z-index: 10;
}
.viewas-banner form { margin: 0; }

.subnav { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 1rem 0 1.5rem; }
.subnav a { padding: .55rem .9rem; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a.active, .subnav a:hover { color: var(--ink); border-bottom-color: var(--magenta); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1.25rem; }
.card h2 { font-size: 1.05rem; }
.error-card { border-color: #f1b7c6; background: #fff7f9; }
.warn-card { border-color: #f3d9a4; background: #fffbf2; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 { margin-bottom: 1.5rem; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.tile:hover { border-color: var(--purple-500); }
.tile-num { font-family: var(--font-head); font-weight: 800; font-size: 2rem; color: var(--purple-800); line-height: 1.1; }
.tile-label { color: var(--muted); font-size: .85rem; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 1.25rem; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-family: var(--font-head); font-weight: 700; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: .7rem .8rem; border-bottom: 1px solid var(--line); background: #faf9fc; white-space: nowrap; }
.table td { padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table.compact td, .table.compact th { padding: .45rem .7rem; }
.card .table-wrap { margin-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.kv { width: 100%; border-collapse: collapse; font-size: .9rem; }
.kv th { text-align: left; color: var(--muted); font-weight: 600; padding: .35rem 1rem .35rem 0; white-space: nowrap; vertical-align: top; width: 1%; }
.kv td { padding: .35rem 0; }

.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82em; background: #f1edf8; color: var(--purple-700); padding: .1rem .4rem; border-radius: 5px; white-space: nowrap; }
.code.big { font-size: .6em; vertical-align: middle; }
.tag { display: inline-block; font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: .05rem .5rem; margin-left: .3rem; }
.pill { display: inline-block; font-size: .75rem; font-weight: 600; border-radius: 99px; padding: .15rem .6rem; white-space: nowrap; }
.pill-done { background: #e3f4e6; color: #1f6b2e; }
.pill-progress { background: #fff2d6; color: #8a5a00; }
.pill-failed { background: #fde3ea; color: #9c1640; }
.pill-exempt { background: #e7e9f7; color: #3a4290; }
.pill-none { background: #f0eef3; color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
input, select { font: inherit; font-size: .9rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); max-width: 100%; }
input:focus, select:focus { outline: 2px solid var(--purple-500); outline-offset: 1px; }
.filters input[name=q] { min-width: 240px; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.progress-cell { min-width: 120px; }
.progress-cell .meter { margin-bottom: .2rem; }

.summary { display: flex; align-items: center; gap: 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin: 1rem 0; }
.summary-line { margin: 0 0 .2rem; font-size: 1.05rem; }
.ring {
  --p: 0; width: 76px; height: 76px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--magenta) calc(var(--p) * 1%), var(--line) 0);
  display: grid; place-items: center;
}
.ring span { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: .95rem; }

.course-group h3 { display: flex; align-items: center; gap: .5rem; font-size: 1rem; margin: 1.5rem 0 .6rem; }
.course-link { color: var(--ink); text-decoration: none; font-weight: 600; }
.course-link:hover { color: var(--purple-500); }
details.record summary { cursor: pointer; color: var(--purple-500); font-weight: 600; font-size: .85rem; }
.record-form { display: grid; gap: .45rem; margin-top: .5rem; min-width: 220px; }
.record-form label { display: grid; gap: .15rem; font-size: .78rem; color: var(--muted); }

.upload-card { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; }
.upload-form { display: grid; gap: .5rem; min-width: 260px; }
.changes { margin: 0; padding-left: 1.2rem; font-size: .9rem; }
.changes li { margin: .15rem 0; }
.chg-remove { color: #9c1640; font-weight: 600; }
.chg-new { color: #1f6b2e; }

.course-hero { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 1.5rem; }
.course-img { width: 140px; height: 105px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); flex: none; }
.prose p { margin: 0 0 .8rem; }
.units { padding-left: 1.3rem; margin: 0; }
.units li { margin: .25rem 0; }

@media (max-width: 900px) {
  .grid-2, .upload-card { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .course-hero { flex-direction: column; align-items: flex-start; }
  .filters input[name=q] { min-width: 0; width: 100%; }
  .summary { align-items: flex-start; }
}

/* Course lists become stacked rows on phones (employee view) */
@media (max-width: 560px) {
  .course-group .table-wrap { overflow: visible; }
  .course-group .table thead { display: none; }
  .course-group .table tr { display: grid; grid-template-columns: auto 1fr; gap: .35rem .75rem; padding: .75rem .85rem; border-bottom: 1px solid var(--line); align-items: center; }
  .course-group .table tr:last-child { border-bottom: 0; }
  .course-group .table td { border: 0; padding: 0; }
  .course-group .table td:first-child { grid-column: 1 / -1; }
  .course-group .table td:nth-child(2), .course-group .table td:nth-child(5) { display: none; }
  .course-group .table td:nth-child(4) { color: var(--muted); font-size: .85rem; }
  .course-group .table td:nth-child(n+6) { grid-column: 1 / -1; }
}

/* ================= Login: stairs & dream ================= */
.login-hero { gap: 2rem; }
.hero-title { font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.08; margin: 0 0 1rem; color: #fff; }
.hero-lead { font-size: clamp(1rem, 1.4vw, 1.15rem); opacity: .85; max-width: 30rem; margin: 0; }
.hero-stairs { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; gap: 6px; max-width: 520px; height: 210px; }
.hs-step, .hs-dream {
  height: calc(var(--h) * 18%); border-radius: 10px 10px 0 0; position: relative;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-bottom: 0;
  display: flex; align-items: flex-start; justify-content: center; padding-top: .5rem;
}
.hs-step span, .hs-dream span { font-family: var(--font-head); font-weight: 700; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; text-align: center; padding: 0 .2rem; }
.hs-dream { background: var(--magenta); border-color: var(--magenta); flex-direction: column; align-items: center; gap: .2rem; }
.hs-star { font-size: 1.1rem !important; }
@media (max-width: 720px) {
  .hero-stairs { height: 140px; }
  .hs-step span, .hs-dream span { font-size: .6rem; }
}

/* ================= My Progress: path strip & stairs ================= */
.path-strip { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.path-cell { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.path-ring { display: flex; align-items: center; gap: 1rem; }
.path-pos { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; margin: 0 0 .2rem; }
.path-strip .path-cell:last-child { background: linear-gradient(140deg, var(--purple-800), var(--purple-500)); color: #fff; border: 0; }
.path-strip .path-cell:last-child .eyebrow { color: #ffb3d0; }
.path-strip .path-cell:last-child .muted { color: rgba(255,255,255,.75); }
.path-strip .path-cell:last-child .code { background: rgba(255,255,255,.15); color: #fff; }

.stairs-head { margin-bottom: 1rem; }
.stairs { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.stair { margin-left: calc(var(--lvl) * 4%); }
.stair > details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stair > details > summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto auto; gap: .5rem 1rem; align-items: center;
  padding: .9rem 1.1rem; border-left: 6px solid var(--line);
}
.stair > details > summary::-webkit-details-marker { display: none; }
.stair > details[open] > summary { border-bottom: 1px solid var(--line); }
.stair-body { padding: .25rem 1.1rem 1rem; }
.stair-body .course-group h3 { margin-top: 1rem; }
.stair-badge { font-family: var(--font-head); font-weight: 700; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 99px; background: #f0eef3; color: var(--muted); white-space: nowrap; }
.stair-title { font-family: var(--font-head); font-weight: 700; }
.stair-chips { display: flex; gap: .3rem; flex-wrap: wrap; }
.chip { font-size: .72rem; font-weight: 600; padding: .1rem .45rem; border-radius: 6px; background: #f1edf8; color: var(--purple-700); white-space: nowrap; }
.chip-done { background: #e3f4e6; color: #1f6b2e; }
.stair-meter { display: flex; align-items: center; gap: .5rem; min-width: 210px; justify-content: flex-end; }
.stair-meter .meter { width: 90px; }
.stair-current > details { border-color: var(--magenta); box-shadow: 0 6px 24px rgba(214,36,110,.12); }
.stair-current > details > summary { border-left-color: var(--magenta); }
.stair-current .stair-badge { background: var(--magenta); color: #fff; }
.stair-next > details > summary { border-left-color: var(--purple-500); }
.stair-next .stair-badge { background: #ece4fb; color: var(--purple-700); }
.stair-ahead > details > summary { border-left-color: var(--purple-800); }
.stair-ahead:first-child .stair-badge { background: var(--purple-800); color: #fff; }
.stair-behind > details { opacity: .85; }

@media (max-width: 900px) {
  .path-strip { grid-template-columns: 1fr; }
  .stair > details > summary { grid-template-columns: auto 1fr; }
  .stair-chips, .stair-meter { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .stair { margin-left: calc(var(--lvl) * 2.5%); }
  .stair-body { padding: 0 .4rem .6rem; }
}

/* ================= Framework report (PM1 Training Category Framework layout) ================= */
:root {
  --st-done: #2e9e44; --st-flag: #d63b4a; --st-prog: #f2a91d; --st-notstarted: #ef8a5a; --st-notenrolled: #6b6b70;
  --st-await: #8f6fd6; --st-code: #3b82f6; --fw-navy: #1f3557; --fw-blue: #2f7fe0;
}
.stair-body .fw { padding-top: .75rem; }
.fw-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.fw-title { font-size: 1.35rem; margin: 0 0 .2rem; }
.fw-meta { display: flex; gap: 1.25rem; margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .9rem; background: #fff; }
.fw-meta dt { font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fw-meta dd { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: .9rem; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: 1rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; }
.kpi-label { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.kpi-value { margin: .15rem 0; font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; line-height: 1.1; }
.kpi-note { margin: 0; font-size: .78rem; color: var(--muted); }
.kpi-bar { height: 5px; border-radius: 99px; background: var(--line); margin-top: .5rem; overflow: hidden; }
.kpi-bar span { display: block; height: 100%; background: var(--st-done); }
.kpi-good .kpi-value { color: var(--st-done); }
.kpi-warn .kpi-value { color: #b7790a; }
.kpi-orange .kpi-value { color: #cc5c2a; }
.kpi-alert { background: #fdecee; border-color: #f4b8c0; }
.kpi-alert .kpi-label, .kpi-alert .kpi-value { color: var(--st-flag); }
.kpi-alert .kpi-bar span { background: var(--st-flag); }
.kpi-neutral .kpi-bar span { background: var(--muted); }

.readiness h3, .findings h3 { font-size: 1rem; margin-bottom: .2rem; }
.rd-row { display: grid; grid-template-columns: 220px 1fr 90px; gap: 1rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--line); }
.rd-row:first-of-type { border-top: 0; }
.rd-name { display: grid; line-height: 1.3; }
.rd-name strong { font-size: .9rem; }
.rd-bar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: #f3f1f6; gap: 2px; }
.rd-pct { display: grid; text-align: right; line-height: 1.3; }
.seg { display: block; min-width: 4px; }
.seg-completed, .seg-passed, .seg-exempted { background: var(--st-done); }
.seg-completedflagged, .seg-failed { background: var(--st-flag); }
.seg-inprogress { background: var(--st-prog); }
.seg-enrollednotstarted { background: var(--st-notstarted); }
.seg-notenrolled { background: var(--st-notenrolled); }
.seg-awaitingresult { background: var(--st-await); }
.seg-codeassigned { background: repeating-linear-gradient(135deg, #dbe8fb 0 4px, #fff 4px 8px); border: 1px dashed var(--st-code); }
.seg-hatch { background: repeating-linear-gradient(135deg, #cfcbd6 0 3px, #f3f1f6 3px 7px); }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .75rem; padding-top: .6rem; border-top: 1px solid var(--line); font-size: .75rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }

.fw-sub { font-size: 1rem; margin: 1.25rem 0 .6rem; }
.fw-wrap { border-radius: 10px; }
.fwm { width: 100%; min-width: 980px; border-collapse: collapse; font-size: .82rem; table-layout: fixed; }
.fwm th { background: var(--fw-navy); color: #fff; text-align: left; font-family: var(--font-head); font-size: .66rem; letter-spacing: .07em; text-transform: uppercase; padding: .55rem .6rem; }
.fwm th.fwm-band { background: var(--fw-blue); text-align: center; }
.fwm th.fwm-blank { background: #fff; }
.fwm .fwm-ref { width: 52px; }
.fwm .fwm-topic { width: 170px; }
.fwm td { border: 1px solid #e3e1e8; padding: .45rem; vertical-align: top; }
.fwm-cat td { background: #eef1f7; padding: .5rem .7rem; }
.fwm-cat-line { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.fwm-cat-line .stage-num { background: var(--fw-navy); width: 22px; height: 22px; font-size: .72rem; }
.fwm-cat-pct { margin-left: auto; font-family: var(--font-head); }
.fwm-track td { background: #f3f8ff; }
.track-title { font-family: var(--font-head); font-size: .72rem; color: var(--fw-navy); letter-spacing: .03em; }
.arrow { text-align: center; color: #9aa6b8; font-size: 1.1rem; padding-top: .6rem; }

.slot { border: 1px solid; border-radius: 6px; padding: .4rem .5rem; margin-bottom: .35rem; font-size: .76rem; line-height: 1.35; }
.slot:last-child { margin-bottom: 0; }
.slot-title { display: flex; gap: .3rem; font-weight: 700; color: var(--ink); }
.slot-title a { color: inherit; text-decoration: none; }
.slot-title a:hover { text-decoration: underline; }
.slot-icon { flex: none; }
.slot-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .7rem; color: var(--muted); margin-left: 1.05rem; }
.slot-status { margin-top: .15rem; font-size: .7rem; color: var(--muted); }
.slot-status b { text-transform: uppercase; letter-spacing: .03em; margin-right: .2rem; }
.slot .win { color: var(--muted); }
.slot .flag { color: var(--st-flag); font-weight: 700; }
.slot-bar { height: 4px; border-radius: 99px; background: rgba(0,0,0,.08); margin-top: .3rem; overflow: hidden; }
.slot-bar span { display: block; height: 100%; background: var(--st-prog); }
.slot-completed, .slot-passed { background: #eaf6ec; border-color: #b7dfbf; } .slot-completed b, .slot-passed b { color: var(--st-done); }
.slot-completedflagged, .slot-failed { background: #fdecee; border-color: #f0a9b2; } .slot-completedflagged b, .slot-failed b { color: var(--st-flag); }
.slot-inprogress { background: #fff6e2; border-color: #f4d48e; } .slot-inprogress b { color: #b7790a; }
.slot-enrollednotstarted { background: #fff1ea; border-color: #f5c3aa; } .slot-enrollednotstarted b { color: #cc5c2a; }
.slot-notenrolled { background: #f4f4f5; border-color: #d0d0d4; } .slot-notenrolled b { color: var(--st-notenrolled); }
.slot-exempted { background: #eef0fb; border-color: #c4c9ef; }
.slot-awaitingresult { background: #f3effc; border-color: #d3c6f2; } .slot-awaitingresult b { color: var(--st-await); }
.slot-codeassigned { background: #f2f7ff; border: 1.5px dashed var(--st-code); } .slot-codeassigned b { color: var(--st-code); }
.slot-inconstruction { background: repeating-linear-gradient(135deg, #f1eff4 0 6px, #fff 6px 12px); border: 1px dashed #c9c5d1; color: var(--muted); }
.slot-inconstruction .slot-title { color: var(--muted); font-weight: 600; }

.findings ol { margin: .5rem 0 0; padding-left: 1.3rem; font-size: .88rem; }
.findings li { margin: .4rem 0; }
.fw-foot { margin-top: .75rem; }

@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .rd-row { grid-template-columns: 1fr 70px; }
  .rd-bar { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 480px) { .kpis { grid-template-columns: 1fr; } }

/* ----- Print: the report prints like the PDF ----- */
@media print {
  .topbar, .viewas-banner, .no-print, .stairs-head, .path-strip, .subnav { display: none !important; }
  body { background: #fff; }
  .page { max-width: none; padding: 0; }
  .stair { margin-left: 0 !important; }
  .stair > details:not([open]) { display: none; }
  .stair > details { border: 0; box-shadow: none; }
  .table-wrap { overflow: visible; border: 0; }
  .fwm { min-width: 0; font-size: 7.5pt; }
  .fwm tr, .slot, .kpi, .rd-row { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.stair-body .fw-wrap { margin-left: -.25rem; margin-right: -.25rem; }
.fwm { min-width: 1040px; }
.fwm .fwm-topic { width: 190px; }

/* ================= Dashboard (current position only) ================= */
.db-hello { margin: 0 0 1rem; }
.db-hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.db-hero .card { margin: 0; }
.db-pos-row { display: flex; gap: 1.25rem; align-items: center; }
.db-title { font-size: 1.6rem; margin: 0 0 .3rem; }
.ring-lg { width: 112px; height: 112px; }
.ring-lg span { width: 88px; height: 88px; display: grid; place-items: center; text-align: center; line-height: 1.05; }
.ring-lg b { font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; }
.ring-lg small { font-size: .62rem; color: var(--muted); font-weight: 600; }
.chip-next { display: inline-block; margin-top: .5rem; background: #ece4fb; color: var(--purple-700); font-family: var(--font-head); font-weight: 700; font-size: .75rem; padding: .25rem .7rem; border-radius: 99px; }
.elig { display: flex; gap: .9rem; align-items: center; margin-top: 1rem; padding: .85rem 1rem; border-radius: 12px; }
.elig-ic { font-size: 1.6rem; }
.elig-no { border: 1.5px dashed var(--purple-500); background: #faf8ff; }
.elig-yes { border: 1.5px solid #8fd09c; background: #e8f6ea; color: #1f5b2a; }
.db-todo ul { list-style: none; padding: 0; margin: .25rem 0 0; }
.db-todo li { display: flex; gap: .6rem; align-items: flex-start; margin: .5rem 0; font-size: .88rem; line-height: 1.4; }
.todo-tag { flex: none; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .62rem; letter-spacing: .04em; padding: .2rem .45rem; border-radius: 5px; margin-top: .1rem; }
.db-stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: 1rem; }
.db-stage { margin: 0; padding: .9rem 1rem; }
.db-stage-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-head); font-weight: 700; margin-bottom: .55rem; }
.db-stage-head .stage-num { width: 22px; height: 22px; font-size: .72rem; margin-right: .3rem; }
.db-stage .rd-bar { height: 9px; }
.db-stage p { margin: .45rem 0 0; }
.db-cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: .6rem; margin-bottom: 1rem; }
.db-cat { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; cursor: pointer; font: inherit; display: grid; gap: .1rem; color: inherit; }
.db-cat:hover { border-color: var(--purple-500); }
.db-cat.on { border-color: var(--magenta); box-shadow: 0 4px 16px rgba(214,36,110,.12); }
.db-cat-n { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; }
.db-cat-n.full { color: var(--st-done); }
.db-cat b { font-size: .8rem; }
.db-cat small { color: var(--muted); font-size: .72rem; }
.db-ach ul { list-style: none; padding: 0; margin: .3rem 0 0; display: grid; gap: .35rem; }
.db-ach li { display: flex; gap: .6rem; align-items: baseline; }
.ach-ic { font-weight: 800; color: var(--purple-500); }
.ach-yes .ach-ic, .ach-cell.ach-yes { color: var(--st-done); }
.fwm th.th-ach { background: var(--magenta); }
.td-ach { background: #fff8fb; }
.ach-cell { font-size: .76rem; line-height: 1.35; margin-bottom: .3rem; color: var(--purple-700); font-weight: 600; }
.st { display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .68rem; padding: .2rem .55rem; border-radius: 99px; white-space: nowrap; }
.st-ok { background: #e3f4e6; color: #1f6b2e; }
.st-part { background: #fff2d6; color: #8a5a00; }
.st-none { background: #f0eef3; color: var(--muted); }
.st-na { background: #f6f5f8; color: #aaa5b5; }
.db-matrix .fwm { min-width: 1080px; }
@media (max-width: 1100px) { .db-cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .db-hero { grid-template-columns: 1fr; }
  .db-stages { grid-template-columns: repeat(2, 1fr); }
  .db-pos-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) { .db-cats { grid-template-columns: repeat(2, 1fr); } .db-stages { grid-template-columns: 1fr; } }

/* Stage row: 4 LPTC stages + Achievement, then a break into the tables */
.db-stages { grid-template-columns: repeat(5, 1fr); margin-bottom: 0; }
.db-stage-ach { background: linear-gradient(160deg, #fff 0%, #fdf0f6 100%); border-color: #f1b7cf; }
.db-stage-ach .db-stage-head { color: var(--magenta-600); }
.ach-num { background: var(--magenta) !important; }
.seg-ach { background: var(--magenta); }
.seg-ach-todo { background: #f7d3e3; }
.ach-list { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .25rem; font-size: .78rem; line-height: 1.35; }
.ach-list li { display: flex; gap: .35rem; color: var(--ink); }
.ach-list .ach-ic { color: var(--magenta); font-weight: 800; }
.ach-list li.ach-yes .ach-ic { color: var(--st-done); }
.db-break { border: 0; border-top: 2px solid var(--line); margin: 1.25rem 0 1rem; }
@media (max-width: 1100px) { .db-stages { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .db-stages { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .db-stages { grid-template-columns: 1fr; } }
.elig-confirm { margin-top: .35rem; padding: .45rem .6rem; background: #fff; border-radius: 8px; border: 1px solid #b8e0c0; font-size: .85rem; }

/* Login stairs: 6 steps with Achieve before the next role */
.hero-stairs { grid-template-columns: repeat(6, 1fr); max-width: 600px; height: 230px; }
.hs-step, .hs-dream { height: calc(var(--h) * 15.5%); }
.hs-ach { background: rgba(214,36,110,.28); border-color: rgba(214,36,110,.55); }
@media (max-width: 720px) { .hero-stairs { height: 150px; gap: 4px; } .hs-step span, .hs-dream span { font-size: .55rem; } }

/* ================= Admin: periodic-table view of a position ================= */
.view-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: .5rem 0 1rem; background: #fff; }
.view-switch a { padding: .45rem 1rem; text-decoration: none; color: var(--muted); font-family: var(--font-head); font-weight: 700; font-size: .82rem; }
.view-switch a.on { background: var(--purple-800); color: #fff; }
.pt-wrap { overflow-x: auto; padding-bottom: .5rem; }
.pt { display: grid; grid-template-columns: 170px repeat(var(--cols), minmax(150px, 1fr)); gap: 6px; min-width: 1100px; }
.pt-corner { }
.pt-colhead { background: var(--fw-navy); color: #fff; border-radius: 8px; padding: .5rem .6rem; font-family: var(--font-head); font-weight: 700; font-size: .8rem; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.pt-colhead small { width: 100%; font-weight: 600; font-size: .66rem; opacity: .75; }
.pt-colhead .stage-num { width: 20px; height: 20px; font-size: .68rem; background: rgba(255,255,255,.18); }
.pt-colhead-ach { background: var(--magenta); }
.pt-rowhead { border-radius: 8px; padding: .55rem .65rem; display: grid; align-content: start; gap: .1rem; color: #fff; }
.pt-rowhead b { font-family: var(--font-head); font-size: .82rem; line-height: 1.2; }
.pt-rowhead small { opacity: .85; font-size: .68rem; }
.pt-num { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; line-height: 1; }
.pt-cell { display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; padding: 4px; background: #f3f1f6; border-radius: 8px; min-height: 92px; }
.el { position: relative; width: 132px; min-height: 84px; border-radius: 7px; padding: 16px 7px 6px; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: #fff; border: 2px solid; }
.el:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.el-ref { position: absolute; top: 3px; left: 6px; font-size: .62rem; font-weight: 700; opacity: .7; }
.el-opt { position: absolute; top: 3px; right: 6px; font-size: .58rem; font-weight: 700; text-transform: uppercase; opacity: .6; }
.el-sym { font-family: var(--font-head); font-weight: 800; font-size: .86rem; letter-spacing: .01em; line-height: 1.15; word-break: break-all; }
.el-name { font-size: .66rem; line-height: 1.25; margin-top: 3px; }
.el-topic { font-size: .58rem; color: var(--muted); margin-top: auto; padding-top: 3px; }
.el-code { background: #f2f7ff; border-style: dashed; }
.el-uc { background: repeating-linear-gradient(135deg, #f1eff4 0 5px, #fff 5px 10px); border-style: dashed; color: var(--muted); }
.el-uc .el-sym { color: #a39fae; }
.el-ach { background: #fdf0f6; border-color: var(--magenta); width: 100%; min-height: 64px; }
.el-ach .el-sym { color: var(--magenta-600); }
/* category families (row header fill + tile border) */
.pt-fam-1 { --fam: #2e7d5b; } .pt-fam-2 { --fam: #2f6fd0; } .pt-fam-3 { --fam: #7b3fc4; }
.pt-fam-4 { --fam: #c9771c; } .pt-fam-5 { --fam: #c2336b; } .pt-fam-0 { --fam: #4b5563; }
.pt-rowhead[class*="pt-fam-"] { background: var(--fam); }
.pt-rowhead:not([class*="pt-fam-"]) { background: var(--magenta); }
.el[class*="pt-fam-"] { border-color: var(--fam); }
.el-live[class*="pt-fam-"] { box-shadow: inset 0 4px 0 var(--fam); }
.el-code[class*="pt-fam-"] { border-color: var(--st-code); }
.el-uc[class*="pt-fam-"] { border-color: #c9c5d1; }
.pt-legend { border-top: 0; margin-top: .5rem; }
/* compact periodic tiles */
.pt { grid-template-columns: 150px 2.6fr 1.3fr 1fr 1fr 1.1fr; gap: 5px; min-width: 1180px; }
.pt-cell { gap: 4px; min-height: 76px; }
.el { width: 104px; min-height: 76px; padding: 14px 6px 5px; border-width: 1.5px; }
.el-sym { font-size: .74rem; }
.el-name { font-size: .6rem; }
.el-uc .el-sym { display: none; }
.el-uc .el-name { margin-top: 0; }
.el-ach { width: 100%; }

/* ---- Growth Map: talent status tiles (My Growth Map) ---- */
.el-status { margin-top: auto; padding-top: 4px; font-family: var(--font-head); font-weight: 700; font-size: .6rem; text-transform: uppercase; letter-spacing: .03em; }
.el-bar { display: block; height: 4px; border-radius: 4px; background: rgba(0,0,0,.12); margin-top: 3px; overflow: hidden; }
.el-bar > span { display: block; height: 100%; background: currentColor; }
.el.st-done  { background: #2e9e44; border-color: #2e9e44 !important; color: #fff; }
.el.st-flag  { background: #fff; border-color: #d63b4a !important; color: #a3202e; box-shadow: inset 0 0 0 2px #f6c9ce; }
.el.st-prog  { background: #fff4d8; border-color: #f2a91d !important; color: #7a4e00; }
.el.st-start { background: #fff; border-color: #ef8a5a !important; color: #a8461a; }
.el.st-enrol { background: #f0eef3; border-color: #8b8b92 !important; color: #4a4a52; }
.el.st-fail  { background: #fdecee; border-color: #d63b4a !important; color: #a3202e; }
.el.st-done .el-ref, .el.st-done .el-opt { opacity: .85; }
.el.st-done .el-status::before { content: "✓ "; }
.el.st-flag .el-status::before { content: "⚑ "; }
.el-ach { cursor: default; }
.el-ach .el-name { font-size: .68rem; font-weight: 600; color: #7a1d47; margin-top: 0; }
.pt-cell-empty { background: transparent; }
.pt-rowhead-ach { background: var(--magenta); }
.db .pt-wrap { margin-top: .25rem; }

/* ---- Xilnex brand logo ---- */
.brand-logo { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 1px 3px rgba(0,0,0,.15); flex-shrink: 0; }
.brand-light .brand-logo { box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.brand-text strong { font-weight: 800; }

/* ---- Growth Map without the Achievement column (4 stage columns) ---- */
.pt { grid-template-columns: 150px 2.6fr 1.3fr 1fr 1fr; min-width: 1060px; }

/* ---- Achievement box: inverted (solid magenta, white text) ---- */
.ach-box, .db-stage.db-stage-ach.ach-box { background: linear-gradient(150deg, var(--magenta) 0%, var(--magenta-600) 100%); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(194, 51, 107, .28); }
.ach-box .db-stage-head, .ach-box .ach-box-head { color: #fff; }
.ach-box .db-stage-head strong { color: #fff; }
.ach-box .ach-num { background: #fff !important; color: var(--magenta-600); }
.ach-box .ach-list { font-size: .86rem; font-weight: 600; gap: .35rem; }
.ach-box .ach-list li { color: #fff; }
.ach-box .ach-list .ach-ic { color: #ffd6e7; }
.ach-box-note { margin: .55rem 0 0; font-size: .74rem; color: rgba(255,255,255,.85); }
.ach-box-head { display: flex; align-items: center; gap: .5rem; font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.ach-box-head strong { margin-left: auto; font-size: 1.1rem; }
.page > .ach-box { border-radius: 14px; padding: 1rem 1.2rem; margin: 0 0 1.1rem; max-width: 760px; }

/* ---- Two Growth Maps per position: Role Ready / Step Up tabs ---- */
.map-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: .4rem 0 1.1rem; max-width: 860px; }
.map-tab { display: grid; gap: .1rem; padding: .8rem 1rem; border-radius: 14px; border: 2px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); position: relative; transition: border-color .15s, box-shadow .15s; }
.map-tab:hover { border-color: var(--purple-500); }
.map-tab .mt-name { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; }
.map-tab .mt-sub { font-size: .78rem; color: var(--muted); }
.map-tab .mt-stat { position: absolute; top: .8rem; right: 1rem; font-family: var(--font-head); font-weight: 700; font-size: .74rem; padding: .2rem .55rem; border-radius: 99px; background: #f0eef3; color: var(--muted); }
.map-tab .mt-stat.ok { background: #e3f4e6; color: #1f6b2e; }
.map-tab::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: #2e7d5b; }
.map-tab-up::before { background: var(--purple-500); }
.map-tab.on { border-color: var(--purple-800); box-shadow: 0 6px 18px rgba(63, 26, 122, .14); }
.map-tab.on .mt-name { color: var(--purple-800); }
.map-tabs-admin { margin-bottom: .4rem; }
@media (max-width: 640px) { .map-tabs { grid-template-columns: 1fr; } }
.db-stages.db-stages-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .db-stages.db-stages-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .db-stages.db-stages-4 { grid-template-columns: 1fr; } }
.elig-info { border: 1.5px dashed var(--line); background: #faf9fb; }
.tag-rr { background: #e3f4e6; color: #1f6b2e; }
.tag-su { background: #efe8fb; color: var(--purple-800); }
.pill-elig { background: #2e9e44; color: #fff; }
.tile-rr .tile-num, .txt-rr { color: #c9771c; }

/* ---- My Team: reporting-line tree ---- */
.team-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin: .8rem 0 1rem; }
.team-stats .ts { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; display: grid; gap: .1rem; }
.team-stats .ts b { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--purple-800); line-height: 1.1; }
.team-stats .ts span { font-size: .8rem; color: var(--muted); }
.team-stats .ts-elig b { color: #2e9e44; }
.team-stats .ts-rr b { color: #c9771c; }
@media (max-width: 900px) { .team-stats { grid-template-columns: repeat(2, 1fr); } }
.team-tools { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { display: none; margin-left: 1.6rem; padding-left: 1rem; border-left: 2px solid var(--line); }
.tree li.open > ul { display: block; }
.tree li { margin: .35rem 0; }
.tn { display: grid; grid-template-columns: 54px 38px minmax(200px, 1.4fr) minmax(260px, 1.2fr) 170px; align-items: center; gap: .7rem;
      background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .55rem .8rem; }
.tn-elig { border-color: #8fd09c; box-shadow: inset 4px 0 0 #2e9e44; }
.tn-toggle { border: 1px solid var(--line); background: #faf8ff; border-radius: 8px; padding: .25rem .4rem; font-family: var(--font-head); font-weight: 700;
             font-size: .78rem; color: var(--purple-800); cursor: pointer; display: inline-flex; gap: .25rem; align-items: center; justify-content: center; }
.tn-toggle:hover { border-color: var(--purple-500); }
.tn-leaf { border: 0; background: none; cursor: default; }
.tn-caret { display: inline-block; transition: transform .15s; }
li.open > .tn .tn-caret { transform: rotate(90deg); }
.tn-av { width: 36px; height: 36px; border-radius: 50%; background: var(--purple-800); color: #fff; display: flex; align-items: center; justify-content: center;
         font-family: var(--font-head); font-weight: 700; font-size: .8rem; overflow: hidden; }
.tn-av img { width: 100%; height: 100%; object-fit: cover; }
.tn-who { display: grid; min-width: 0; }
.tn-who b { font-family: var(--font-head); font-size: .92rem; }
.tn-who span { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-maps { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.tn-map { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: .45rem; }
.tn-map small { grid-column: 1 / -1; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tn-bar { height: 7px; border-radius: 6px; background: #eeeaf3; overflow: hidden; }
.tn-bar > span { display: block; height: 100%; border-radius: 6px; }
.tn-rr .tn-bar > span { background: #2e7d5b; }
.tn-su .tn-bar > span { background: var(--purple-500); }
.tn-map b { font-family: var(--font-head); font-size: .82rem; min-width: 3.6em; text-align: right; }
.tn-flag { text-align: right; }
@media (max-width: 900px) { .tn { grid-template-columns: 54px 38px 1fr; } .tn-maps, .tn-flag { grid-column: 2 / -1; text-align: left; } }

/* ---- Admins page ---- */
.admin-add input { flex: 1; min-width: 320px; }
.nomap { display: flex; gap: 1.1rem; align-items: flex-start; padding: 1.4rem 1.6rem; max-width: 760px; margin-top: 1rem; border-left: 4px solid var(--magenta); }
.nomap-ic { font-size: 2rem; line-height: 1; }
.nomap h2 { margin: 0 0 .35rem; }
.nomap-ask { margin: .6rem 0 0; font-size: 1.02rem; }
/* ---- Not ready in Elevate ---- */
.nr-tiles { grid-template-columns: repeat(4, 1fr); }
.nr-st { display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .7rem; padding: .2rem .55rem; border-radius: 99px; white-space: nowrap; }
.nr-notinelevate { background: #e8f0fe; color: #1f4fa3; }
.nr-inactiveinelevate { background: #fff2d6; color: #8a5a00; }
.nr-inconstruction { background: #f0eef3; color: var(--muted); }
.scroll-box { max-height: 420px; overflow-y: auto; border-radius: 8px; }

/* ---- Profile header (My Growth Map, admin talent page) ---- */
.pbar { display: flex; justify-content: space-between; align-items: stretch; gap: 1rem; flex-wrap: wrap; background: #fff; border: 1px solid var(--line);
        border-radius: 16px; padding: 1rem 1.2rem; margin: 0 0 1.1rem; position: relative; overflow: hidden; }
.pbar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(180deg, var(--purple-500), var(--magenta)); }
.pbar-me { display: flex; gap: 1rem; align-items: center; min-width: 0; }
.pbar-av { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden;
           background: linear-gradient(135deg, var(--purple-800), var(--purple-500)); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.05rem;
           box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); }
.pbar-av img { width: 100%; height: 100%; object-fit: cover; }
.pbar-av.sm { width: 38px; height: 38px; font-size: .78rem; box-shadow: none; }
.pbar-id { display: grid; gap: .2rem; min-width: 0; }
.pbar-hi { font-family: var(--font-head); font-weight: 700; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--magenta); }
.pbar-name { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; line-height: 1.15; color: var(--ink); }
.pbar-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .2rem; }
.pbar-chip { display: inline-flex; align-items: baseline; gap: .4rem; font-size: .82rem; background: var(--soft, #f6f4f9); border: 1px solid var(--line);
             border-radius: 99px; padding: .22rem .7rem; color: var(--ink); }
.pbar-chip i { font-style: normal; font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pbar-cu { background: #efe8fb; border-color: #d9cbf3; }
.pbar-cu b { font-family: var(--font-head); color: var(--purple-800); }
.pbar-mgr { display: grid; align-content: center; gap: .35rem; min-width: 240px; padding-left: 1rem; border-left: 1px dashed var(--line); }
.pbar-label { font-family: var(--font-head); font-weight: 700; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pbar-mgr-card { display: flex; gap: .6rem; align-items: center; text-decoration: none; color: var(--ink); border-radius: 12px; padding: .3rem .5rem .3rem .3rem; margin-left: -.3rem; }
a.pbar-mgr-card:hover { background: #faf8ff; }
.pbar-mgr-id { display: grid; line-height: 1.25; }
.pbar-mgr-id b { font-family: var(--font-head); font-size: .95rem; }
.pbar-mgr-id small { font-size: .78rem; color: var(--muted); }
@media (max-width: 760px) { .pbar-mgr { border-left: 0; padding-left: 0; border-top: 1px dashed var(--line); padding-top: .7rem; width: 100%; } }
.adm-ach { border-radius: 14px; padding: .9rem 1.1rem; margin: 0 0 .9rem; max-width: 760px; }
.txt-ok { color: #1f6b2e; }
.tn-flag { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.tn-va { margin: 0; }
.tn { grid-template-columns: 54px 38px minmax(200px, 1.4fr) minmax(260px, 1.2fr) 250px; }
@media (max-width: 900px) { .tn { grid-template-columns: 54px 38px 1fr; } .tn-flag { justify-content: flex-start; } }
.tn-seen { font-size: .72rem !important; color: var(--muted); }
.tn-seen.never { color: #c9771c; font-weight: 600; }

/* Talents list: activity folded under the name so the table fits */
.emp-name { min-width: 220px; }
.emp-seen { font-size: .74rem; margin-top: .25rem; color: var(--ink, #333); }
.emp-seen .dot { color: var(--muted); margin: 0 .25rem; }
.emp-pos { min-width: 160px; }
.nowrap { white-space: nowrap; }

/* Admin talent page: keep the View as button clear of the profile bar */
.emp-head { margin-bottom: 1rem; }
.emp-head .row-actions { margin-top: 0; }

/* No achievement criteria on Step Up = not eligible: loud red, ask the supervisor */
.db-stage.db-stage-ach.ach-box.ach-missing, .ach-box.ach-missing { background: #b3141f; box-shadow: 0 0 0 3px #ffd2d5, 0 6px 18px rgba(179, 20, 31, .35); }
.ach-missing .ach-num { color: #b3141f !important; }
.ach-missing-title { margin: .4rem 0 0; font-family: var(--font-head); font-weight: 800; font-size: .95rem; color: #fff; }
.ach-missing .ach-box-note { color: #fff; font-weight: 600; }
.elig-stop { border: 2px solid #b3141f; background: #fff1f2; color: #7a0d15; }
.elig-stop b { color: #b3141f; }
/* Do next */
.todo-link { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(63,26,122,.25); }
.todo-link:hover { color: var(--purple-700); border-bottom-color: var(--purple-700); }
.todo-more summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--purple-700); margin: .3rem 0; }
.todo-soon { font-size: .8rem; color: var(--muted); margin: .6rem 0 0; display: flex; gap: .5rem; align-items: center; }
.todo-tag { font-size: .7rem !important; }
/* Keyboard focus */
:focus-visible { outline: 3px solid var(--purple-500); outline-offset: 2px; }

/* My Team: blocked by unbuilt courses (waiting on CU, not the person) */
.pill-blocked { background: #fff4d6; color: #7a5200; border: 1px solid #f0d27a; }
.ts-blocked b { color: #8a6100; }

/* Upload: changes that need a tick before Apply */
.confirm-card { border: 2px solid #b3141f; background: #fff1f2; }
.confirm-card h2 { color: #b3141f; }
.chg-rename { color: #8a6100; font-weight: 600; }
.confirm-box { display: flex; align-items: center; gap: .5rem; font-weight: 600; width: 100%; }

/* Admin overview: data quality */
.dq-card { margin: 1rem 0; }
.dq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .7rem; }
.dq { display: grid; gap: .1rem; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; background: #fbfaf7; }
.dq b { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--purple-800); }
.dq span { font-weight: 600; font-size: .86rem; }
.dq small { color: var(--muted); font-size: .74rem; }
.dq-bad { border-color: #f1b8bd; background: #fff5f6; }
.dq-bad b { color: #b3141f; }

/* Busy overlay while a sync / backup / upload runs */
.busy { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(31, 10, 61, .62); backdrop-filter: blur(3px); animation: busy-in .18s ease-out; }
.busy[hidden] { display: none; }
body.is-busy { overflow: hidden; }
.busy-card { background: #fff; border-radius: 18px; padding: 2rem 2.4rem 1.6rem; width: min(420px, calc(100vw - 32px)); text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.busy-card h2 { margin: .9rem 0 .3rem; font-size: 1.15rem; }
.busy-step { margin: 0 0 1rem; color: var(--muted); min-height: 1.4em; font-size: .92rem; }
.busy-icon { width: 72px; height: 72px; }
.busy-track { fill: none; stroke: #eee8f6; stroke-width: 4; }
.busy-arc { fill: none; stroke: var(--magenta); stroke-width: 4; stroke-linecap: round; transform-origin: 24px 24px; animation: busy-spin 1s linear infinite; }
.busy-sync { fill: none; stroke: var(--purple-700); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transform-origin: 24px 24px; animation: busy-spin 2.4s linear infinite reverse; }
.busy-bar { height: 6px; border-radius: 99px; background: #eee8f6; overflow: hidden; }
.busy-bar span { display: block; height: 100%; width: 35%; border-radius: 99px; background: linear-gradient(90deg, var(--purple-500), var(--magenta)); animation: busy-slide 1.3s ease-in-out infinite; }
.busy-time { margin: .8rem 0 0; font-size: .78rem; color: var(--muted); }
@keyframes busy-spin { to { transform: rotate(360deg); } }
@keyframes busy-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }
@keyframes busy-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .busy-arc, .busy-sync, .busy-bar span { animation-duration: 4s; } }

.dl-form { margin-top: .8rem; display: grid; gap: .3rem; }
.dl-form input { min-width: 240px; }
