/* ==========================================================================
   PiPO HRIS — LAYER 17 · BUILT FOR THE PEOPLE WHO RUN YOUR ORGANISATION
   Tier 2. Warm white. Four primary audiences as tabs; managers and employees
   handled together in a smaller self-service panel beneath.
   Role UI fragments are deliberately small and distinct from the executive
   dashboards used in the hero and analytics sections.
   ========================================================================== */

.rol { background: var(--paper); }
.rol__head { max-width: 760px; }
.rol__head h2 { margin-top: 1.1rem; }
.rol__head .lede { margin-top: 1.1rem; }

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.rol__tabs {
  display: flex; gap: 2px; margin-top: clamp(28px, 3.2vw, 44px);
  border-bottom: 1px solid var(--line); overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.rol__tabs::-webkit-scrollbar { display: none; }
.rol__tab {
  font: inherit; font-size: .95rem; font-weight: 600; letter-spacing: -.012em;
  color: var(--muted); background: none; border: 0; cursor: pointer;
  padding: .85rem 1.15rem; min-height: 44px; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--t-fast) var(--e-out), border-color var(--t-fast) var(--e-out);
}
.rol__tab:hover { color: var(--ink-3); }
.rol__tab.on { color: var(--emerald-700); border-bottom-color: var(--emerald); }
.rol__tab:focus-visible { outline: 2px solid var(--emerald); outline-offset: -3px; border-radius: 4px; }

/* ── Panels ─────────────────────────────────────────────────────────────── */
.rol__panel { display: none; }
.rol__panel.on { display: grid; }
.rol__panel {
  grid-template-columns: .92fr 1.08fr; gap: clamp(24px, 3.2vw, 56px);
  align-items: center; padding-top: clamp(26px, 3.2vw, 44px);
}
@media (max-width: 940px) { .rol__panel { grid-template-columns: 1fr; } }
.rol__panel > * { min-width: 0; }

.rol__who {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--emerald-700);
}
.rol__panel h3 { font-size: clamp(1.3rem, 2vw, 1.75rem); letter-spacing: -.03em; line-height: 1.18; margin-top: .6rem; }
.rol__panel > div > p { font-size: .98rem; line-height: 1.65; color: var(--muted); margin-top: .9rem; max-width: 44ch; }

.rol__gets { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: .55rem; }
.rol__gets li {
  display: grid; grid-template-columns: 14px 1fr; gap: .65rem; align-items: start;
  font-size: .96rem; line-height: 1.55; color: var(--ink-3);
}
.rol__gets svg { width: 12px; height: 12px; color: var(--emerald); margin-top: .3rem; }

.rol__ask {
  margin-top: 1.5rem; padding: .95rem 1.15rem; border-radius: var(--r);
  background: #fff; border-left: 3px solid var(--emerald);
  font-size: .96rem; line-height: 1.55; color: var(--ink-3);
}
.rol__ask b { color: var(--ink); font-weight: 600; }

/* ── Role UI fragment ───────────────────────────────────────────────────── */
.rui {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-md); overflow: hidden; font-size: 12px;
}
.rui__bar {
  display: flex; align-items: center; gap: .5rem; padding: 9px 13px;
  background: var(--paper); border-bottom: 1px solid var(--line-soft);
}
.rui__bar .dots { display: flex; gap: 4px; }
.rui__bar .dots i { width: 7px; height: 7px; border-radius: 50%; background: #D3DBD7; display: block; }
.rui__bar .url { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted-2); margin-inline: auto; }
.rui__body { padding: 15px 16px 16px; }
.rui__h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rui__h h4, .rui__h b { font-size: 13.5px; font-weight: 700; letter-spacing: -.022em; color: var(--ink); }
.rui__h span { font-size: 9.5px; color: var(--muted-2); font-family: var(--font-mono); }

/* metric row */
.rmet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft);
  border: 1px solid var(--line-soft); border-radius: 9px; overflow: hidden; margin-top: 12px; }
@media (max-width: 400px) { .rmet { grid-template-columns: 1fr 1fr; } }
.rmet > div { background: #fff; padding: 10px 11px; }
.rmet .k { font-size: 9px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .07em; }
.rmet .v { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 700;
  letter-spacing: -.035em; color: var(--ink); margin-top: 3px; line-height: 1; }
.rmet .v small { font-size: .6em; font-weight: 600; color: var(--muted); margin-left: 1px; }
.rmet .d { display: block; font-size: 9px; color: var(--muted-2); margin-top: 4px; }

/* record rows */
.rrow { display: grid; gap: 1px; background: var(--line-soft);
  border: 1px solid var(--line-soft); border-radius: 9px; overflow: hidden; margin-top: 11px; }
.rrow__hd, .rrow__r { display: grid; gap: 9px; align-items: center; padding: 9px 11px; background: #fff; }
.rrow__hd { background: var(--paper); font-family: var(--font-mono); font-size: 8px;
  letter-spacing: .11em; text-transform: uppercase; color: var(--muted-2); }
.rrow--3 .rrow__hd, .rrow--3 .rrow__r { grid-template-columns: 1.25fr 1fr auto; }
.rrow--4 .rrow__hd, .rrow--4 .rrow__r { grid-template-columns: 1.15fr .8fr .8fr auto; }
.rrow__r b { font-size: 11px; font-weight: 600; color: var(--ink); }
.rrow__r span { font-size: 10.5px; color: var(--muted); }
.rrow__r .num { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); }

.rchip {
  display: inline-flex; align-items: center; gap: 4px; justify-self: end;
  font-size: 9px; font-weight: 600; padding: 3px 7px; border-radius: 100px; white-space: nowrap;
}
.rchip svg { width: 8px; height: 8px; }
.rchip--ok   { background: var(--emerald-tint); color: var(--emerald-700); }
.rchip--wait { background: var(--st-info-bg);  color: var(--indigo-deep); }
.rchip--flag { background: var(--st-warning-bg); color: var(--st-warning-ink); }
.rchip--neut { background: var(--mist);        color: var(--muted); }

/* mini bar chart, used by the operations panel */
.rbars { display: grid; gap: 7px; margin-top: 11px; }
.rbars__i { display: grid; grid-template-columns: 74px 1fr 34px; gap: 9px; align-items: center; }
.rbars__i span { font-size: 10px; color: var(--muted); }
.rbars__t { height: 7px; border-radius: 4px; background: var(--line-soft); overflow: hidden; }
.rbars__t i { display: block; height: 100%; border-radius: 4px; background: var(--emerald); }
.rbars__i .n { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); text-align: right; }

/* ── Self-service panel: managers + employees ───────────────────────────── */
.selfs {
  margin-top: clamp(32px, 3.6vw, 52px); border-top: 1px solid var(--line);
  padding-top: clamp(24px, 2.8vw, 36px);
  display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(20px, 2.8vw, 46px); align-items: center;
}
@media (max-width: 860px) { .selfs { grid-template-columns: 1fr; } }
.selfs > * { min-width: 0; }
.selfs h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); letter-spacing: -.028em; }
.selfs > div > p { font-size: .98rem; line-height: 1.6; color: var(--muted); margin-top: .7rem; }
.selfs__two { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (max-width: 560px) { .selfs__two { grid-template-columns: 1fr; } }
.selfs__two > div { background: #fff; padding: 16px 18px; }
.selfs__two b { display: block; font-size: .95rem; font-weight: 700; color: var(--ink); letter-spacing: -.018em; }
.selfs__two ul { list-style: none; margin: .7rem 0 0; padding: 0; display: grid; gap: .35rem; }
.selfs__two li { font-size: .94rem; line-height: 1.5; color: var(--muted);
  display: grid; grid-template-columns: 11px 1fr; gap: .5rem; align-items: start; }
.selfs__two li svg { width: 10px; height: 10px; color: var(--emerald); margin-top: .3rem; }

.roltrans {
  margin-top: clamp(30px, 3.4vw, 46px); padding-top: clamp(22px, 2.4vw, 32px);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted-2); text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .rol__tab { transition: none !important; }
}


/* One gold metric per role surface: the cost figure the executive is looking
   for. White surface, so gold carries the rule and the number stays in ink. */
.rmet__gold { background: rgba(176,143,69,.06) !important; }
.rmet__gold .v { color: var(--ink); border-top: 2px solid var(--gold);
                 padding-top: .3rem; margin-top: .25rem; }
.rmet__gold .k { color: var(--st-warning-ink); }

/* The inter-section label sits on a gold hairline: the boundary between
   two sections is exactly where a third brand colour belongs. */
.roltrans { border-top: 0; position: relative; }
.roltrans::before { content: ''; position: absolute; top: 0; left: 50%;
  transform: translateX(-50%); width: 54px; height: 2px;
  background: var(--gold); border-radius: 2px; }
