/* ============================================================
   XCodefix platform — "Graphite" core
   Shared by every app on the platform. Tokens live in tokens.css,
   generated from ui/theme.php; nothing here hard-codes a colour.
   App-specific vocabulary belongs in the app's own sheet, not here.
   ============================================================ */

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); }
strong { font-weight: 600; }
small { font-size: 12px; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--surface); color: var(--teal-text);
  padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.num, td.num, .metric-val { font-variant-numeric: tabular-nums; }

/* Utilities */
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- App layout ---------- */
.app { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  z-index: 60;
  overflow-y: auto;
  scrollbar-width: thin;
  transition: transform .25s ease;
}

.main {
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column; min-height: 100vh;
}

/* ---------- Brand ---------- */
.brand {
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgb(255 255 255 / .07);
}
.brand-link {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
}
.brand-link:hover { text-decoration: none; }
.brand-logo {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-active), var(--brand));
  border-radius: 8px; color: #fff;
}
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: #fff; line-height: 1.2; }
.brand-name span { color: var(--teal-active); }
.tenant {
  display: block; margin-top: 2px;
  font-size: 11px; color: var(--sidebar-muted);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 500;
}

/* ---------- Sidebar nav ---------- */
.nav { flex: 1; padding: 10px 0 16px; }
.nav-section-label {
  padding: 14px 16px 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--sidebar-muted);
}
.nav-link, .nav-toggle {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px 10px 16px;
  border-left: 3px solid transparent;
  color: var(--sidebar-text);
  font-size: 14px; font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover, .nav-toggle:hover {
  background: rgb(255 255 255 / .05); color: #fff; text-decoration: none;
}
.nav-link:focus-visible, .nav-toggle:focus-visible { outline-offset: -2px; border-radius: 0; }
.nav-link.is-active {
  border-left-color: var(--teal-active);
  color: var(--teal-active);
  background: rgba(20, 184, 166, .1);
}
.nav-link .nav-icon, .nav-toggle .nav-icon { flex: none; opacity: .9; }
.nav-badge {
  margin-left: auto;
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  background: var(--teal); color: #fff;
  border-radius: 999px; font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.nav-toggle .chev { margin-left: auto; transition: transform .2s ease; }
.nav-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-toggle.is-child-active { color: var(--teal-active); }

.submenu { overflow: hidden; }
.submenu[hidden] { display: none; }
.submenu a {
  display: flex; align-items: center;
  min-height: 40px;
  padding: 8px 16px 8px 51px;
  border-left: 3px solid transparent;
  color: var(--sidebar-muted);
  font-size: 13.5px; font-weight: 500;
  transition: color .15s ease, background .15s ease;
}
.submenu a:hover { color: #fff; background: rgb(255 255 255 / .05); text-decoration: none; }
.submenu a:focus-visible { outline-offset: -2px; border-radius: 0; }
.submenu a.is-active {
  border-left-color: var(--teal-active);
  color: var(--teal-active);
  background: rgba(20, 184, 166, .1);
}

.sidebar-foot {
  padding: 14px 16px;
  border-top: 1px solid rgb(255 255 255 / .07);
  font-size: 12px; color: var(--sidebar-muted);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-foot .avatar { width: 32px; height: 32px; font-size: 12px; flex: none; }
.sidebar-foot b { display: block; color: var(--sidebar-text); font-weight: 600; font-size: 12.5px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-card);
}
.hamburger { display: none; }
.topbar-title { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.crumbs {
  font-size: 11px; color: var(--muted); font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--teal-text); }
.crumbs .sep { margin: 0 5px; color: var(--border-table); }
.page-title { font-size: 16px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.global-search {
  position: relative; display: flex; align-items: center;
  width: 300px;
}
.global-search svg { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.global-search input {
  width: 100%; height: 40px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-btn);
  background: var(--bg);
  font-size: 13.5px;
}
.global-search input::placeholder { color: var(--muted); }
.global-search input:focus { outline: 2px solid var(--teal); outline-offset: -1px; background: var(--surface); }

.icon-btn {
  position: relative;
  width: 40px; height: 40px; flex: none;
  display: inline-grid; place-items: center;
  border-radius: var(--radius-btn);
  color: var(--text-2);
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  cursor: pointer;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn.bordered { border-color: var(--border-card); background: var(--surface); }
.icon-btn.bordered:hover { background: var(--bg); }
.bell-dot {
  position: absolute; top: 9px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--surface);
}

.quicklinks {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px;
  border-radius: var(--radius-btn);
  color: var(--text-2); font-weight: 500; font-size: 13.5px;
  transition: background .15s ease, color .15s ease;
  cursor: pointer;
}
.quicklinks:hover { background: var(--bg); color: var(--text); }

.avatar {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-hover); color: var(--brand-tint);
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.a2 { background: #1E3A8A; color: #BFDBFE; }
.avatar.a3 { background: #7C2D12; color: #FED7AA; }
.avatar.a4 { background: #4C1D95; color: #DDD6FE; }
.avatar.a5 { background: #831843; color: #FBCFE8; }

.avatar-btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 4px 8px 4px 4px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background .15s ease;
}
.avatar-btn:hover { background: var(--bg); }
.avatar-meta { text-align: left; line-height: 1.2; }
.avatar-meta b { display: block; font-size: 13px; font-weight: 600; }
.avatar-meta small { color: var(--muted); font-size: 11.5px; }

/* ---------- Content / footer ---------- */
.content {
  flex: 1;
  width: 100%; max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 32px;
}
.footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-card);
  font-size: 12px; color: var(--muted);
  text-align: center;
}
.footer a { color: var(--text-2); }

/* ---------- Page header row ---------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.page-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.page-head .sub { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }
.page-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Grid ---------- */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.overline {
  font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-2);
}
.card-link { font-size: 13px; font-weight: 500; white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border-radius: var(--radius-btn);
  font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-table); }
.btn-secondary:hover { background: var(--bg); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #166534; }
.btn-danger-outline { background: var(--surface); color: var(--danger); border-color: var(--danger-border); }
.btn-danger-outline:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-danger-subtle { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.btn-danger-subtle:hover { background: #FEE2E2; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 7px; }
.btn-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--teal-text); font-weight: 600; font-size: 13.5px;
  cursor: pointer; min-height: 44px;
}
.btn-link:hover { text-decoration: underline; }

/* ---------- Chips / status ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.chip-success { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.chip-warning { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-border); }
.chip-danger  { background: var(--danger-soft);  color: var(--danger);  border-color: var(--danger-border); }
.chip-info    { background: var(--info-soft);    color: var(--info);    border-color: var(--info-border); }
.chip-teal    { background: var(--teal-soft);    color: var(--teal-text); border-color: var(--brand-tint); }
.chip-neutral { background: var(--bg); color: var(--text-2); border-color: var(--border-card); }

.delta {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 7px;
  border-radius: 6px;
  font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.delta svg { flex: none; }
.delta-up   { background: var(--success-soft); color: var(--success); }
.delta-down { background: var(--danger-soft);  color: var(--danger); }
.delta-flat { background: var(--bg); color: var(--text-2); }

/* Person chip (form "applying to") */
.person-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 3px 12px 3px 4px;
  background: var(--teal-soft); border: 1px solid var(--brand-tint);
  border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--teal-text);
}
.person-chip .avatar { width: 24px; height: 24px; font-size: 10px; }
.add-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px dashed var(--border-table); border-radius: 999px;
  color: var(--text-2); font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: border-color .15s ease, color .15s ease;
}
.add-chip:hover { border-color: var(--teal); color: var(--teal-text); }

/* ---------- KPI stat cards ---------- */
.kpi { gap: 8px; }
.kpi .kpi-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi .kpi-value {
  font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi .kpi-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.kpi .spark { color: var(--teal); opacity: .85; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--border-card); border-radius: var(--radius-card); background: var(--surface); }
.card .table-scroll { border: 1px solid var(--border-card); border-radius: 8px; box-shadow: none; }
.data-table { width: 100%; min-width: 560px; font-size: 13.5px; }
.data-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: #F9FAFB;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-2);
  text-align: left;
  padding: 0 14px;
  height: 40px;
  border-bottom: 1px solid var(--border-table);
  white-space: nowrap;
}
.data-table tbody td {
  height: 44px; padding: 6px 14px;
  border-bottom: 1px solid var(--border-card);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: #F9FAFB; }
.data-table .t-right { text-align: right; }
.cell-person { display: flex; align-items: center; gap: 10px; }
.cell-person b { font-weight: 600; }
.cell-person small { display: block; color: var(--muted); font-size: 11.5px; }

/* Metric table (day detail) */
.metric-table { width: 100%; font-size: 13.5px; }
.metric-table th {
  text-align: left; font-weight: 500; color: var(--text-2);
  padding: 8px 0; border-bottom: 1px solid var(--border-card); white-space: nowrap;
}
.metric-table td {
  text-align: right; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 8px 0; border-bottom: 1px solid var(--border-card);
}
.metric-table tr:last-child th, .metric-table tr:last-child td { border-bottom: 0; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--border-card);
  overflow-x: auto;
}
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 0 16px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--text-2); font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--teal-text); border-bottom-color: var(--teal); }
.tab .count {
  min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  background: var(--bg); border: 1px solid var(--border-card);
  border-radius: 999px; font-size: 11px; font-variant-numeric: tabular-nums;
}
.tab[aria-selected="true"] .count { background: var(--teal-soft); border-color: var(--brand-tint); color: var(--teal-text); }
.tab-panel[hidden] { display: none; }

/* Segmented control */
.segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
  background: var(--bg); border: 1px solid var(--border-card);
  border-radius: var(--radius-btn);
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button, .segmented a {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  min-height: 32px; padding: 0 14px;
  border-radius: 6px; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.segmented button:hover, .segmented a:hover {
  background: var(--surface); color: var(--text); text-decoration: none;
}
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"],
.segmented a.is-active, .segmented a[aria-current="page"] {
  background: var(--surface); color: var(--teal-text);
  box-shadow: 0 1px 2px rgb(0 0 0 / .08);
}
.segmented .nav-badge { margin-left: 0; }
.segmented a.is-active .nav-badge, .segmented a[aria-current="page"] .nav-badge {
  background: var(--teal-soft); color: var(--teal-text);
}
.segmented :focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--text); }
.req { color: var(--danger); }
.hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; height: 40px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-table);
  border-radius: var(--radius-btn);
  font-size: 13.5px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.input { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.input:hover { border-color: var(--muted); }
.input:focus { outline: 2px solid var(--teal); outline-offset: -1px; border-color: var(--teal); }
.input::placeholder { color: var(--muted); }
select.input {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 34px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chip-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.file-drop {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border: 1px dashed var(--border-table);
  border-radius: var(--radius-btn);
  color: var(--text-2); font-size: 13px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.file-drop:hover { border-color: var(--teal); background: var(--teal-soft); }
.file-drop svg { color: var(--muted); flex: none; }

/* ---------- Notes / alerts ---------- */
.note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--info-border);
  background: var(--info-soft);
  color: #1E3A8A; font-size: 13px;
}
.note svg { flex: none; margin-top: 1px; color: var(--info); }
.note .note-close { margin-left: auto; color: var(--info); cursor: pointer; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; flex: none; }
.note .note-close:hover { background: rgb(29 78 216 / .1); }
.note-warning { border-color: var(--warning-border); background: var(--warning-soft); color: #78350F; }
.note-warning svg { color: var(--warning); }

/* ---------- Progress ---------- */
.progress {
  height: 6px; border-radius: 999px;
  background: #E5E7EB; overflow: hidden;
}
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--teal); }
.progress.warn > span { background: var(--warning); }

.ring { position: relative; width: 88px; height: 88px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-label {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums;
}

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border-card); border-radius: 2px;
}
.timeline-item { position: relative; padding: 2px 0 16px; }
.timeline-item:last-child { padding-bottom: 2px; }
.timeline-item::before {
  content: ""; position: absolute; left: -22px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--teal);
}

/* ---------- Definition grid ----------
   A labelled key/value block. Promoted out of the HRMS sheet at the split:
   nothing about it is an HR idea, and every app has a details panel. */
.def-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4) var(--space-7); padding: var(--space-5); }
/* .def is HRMS's existing markup; a bare div works too, so a new app does not
   have to know about a wrapper class that carries no meaning. */
.def-grid .def dt, .def-grid > div > dt { font-size: var(--text-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.def-grid .def dd, .def-grid > div > dd { font-size: var(--text-md); font-weight: 500; margin: 0; }
@media (max-width: 900px) { .def-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .def-grid { grid-template-columns: 1fr; } }

.subnav { display: flex; gap: 2px; border-bottom: 1px solid var(--border-card); margin-bottom: 16px; overflow-x: auto; }

.profile-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile-head .who h2 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.profile-head .who .meta { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }
.profile-head .who .meta .sep-dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--border-table); margin: 2px 7px; vertical-align: middle; }
.profile-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.jump { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.jump a { font-weight: 600; }

/* ---------- Empty state ---------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 36px 20px; text-align: center;
}
.empty-state svg { color: var(--border-table); }
.empty-state b { font-size: 14px; font-weight: 600; color: var(--text-2); }
.empty-state p { font-size: 13px; color: var(--muted); max-width: 320px; }

/* ---------- Small utilities ----------
   Used by the shared partials — field labels, table cells, card footers — so
   they belong with them rather than in whichever app happened to define them
   first. */
.muted { color: var(--muted); }
.required-mark { color: var(--danger); margin-left: 2px; }

/* ---------- Auth pages ----------
   The sign-in, reset and invitation screens. Promoted out of the HRMS sheet at
   the platform split: nothing here is an HR idea, and an application without a
   way to sign in does not exist. Colours are tokens so an org's brand reaches
   this page too. */
.auth-body { background: var(--bg); min-height: 100dvh; }
.auth-shell {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: var(--space-8) var(--space-5); gap: var(--space-6);
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface);
  border: 1px solid var(--border-card); border-radius: 12px;
  padding: var(--space-7); box-shadow: 0 1px 3px rgb(0 0 0 / .06);
}
.auth-card.wide { max-width: 640px; }
.auth-brand { display: flex; align-items: center; gap: var(--space-3); margin-bottom: 22px; }
.auth-brand .brand-logo {
  width: 34px; height: 34px; border-radius: var(--radius-btn); background: var(--sidebar-bg);
  color: #fff; display: grid; place-items: center; flex: none;
}
.auth-brand b { display: block; font-size: 15px; color: var(--text); }
.auth-brand small { display: block; font-size: var(--text-sm); color: var(--muted); }
.auth-card h1 { font-size: 20px; font-weight: 600; margin: 0 0 6px; color: var(--text); letter-spacing: -.01em; }
.auth-card .lede { font-size: var(--text-md); color: var(--text-2); margin: 0 0 var(--space-6); line-height: 1.55; }
.auth-actions { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.auth-actions .btn { width: 100%; justify-content: center; }
.auth-links {
  margin-top: 18px; padding-top: var(--space-5); border-top: 1px solid var(--border-card);
  display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between;
  font-size: var(--text-base);
}
.auth-links a { color: var(--brand-text); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-foot { font-size: 12.5px; color: var(--muted); }
.auth-foot a { color: var(--muted); }
.remember-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: 4px; }
.checkbox-inline { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-base); color: var(--text-2); cursor: pointer; }
.checkbox-inline input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.field + .remember-row, .field + .auth-actions { margin-top: var(--space-5); }

/* One row per thing that can be picked on an auth page: a workspace to open,
   an account to continue as. Each is a submit button, so the row must read as
   a choice rather than as an action. */
.choice-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.choice {
  width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4);
  padding: 14px var(--space-5); text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--radius-btn);
  font: inherit; color: var(--text); transition: border-color .12s, background .12s;
}
.choice:hover { border-color: var(--brand); background: var(--brand-soft); }
.choice:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice-name { font-weight: 550; }
.choice-meta { font-size: var(--text-sm); color: var(--muted); }

@media (max-width: 600px) { .auth-card { padding: 22px; } }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgb(11 18 32 / .55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 16px;
  overflow-y: auto;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 560px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  transform: translateY(8px) scale(.98);
  transition: transform .2s ease;
  display: flex; flex-direction: column;
}
.modal-overlay.is-open .modal { transform: none; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-card);
}
.modal-head h2 { font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-card);
  background: #F9FAFB;
  border-radius: 0 0 12px 12px;
}
.modal-wide { max-width: 760px; }
.modal-head .sub-line { display: block; margin-top: 2px; }

/* ---------- Structured plain text (job descriptions and the like) ---------- */
.jd-body { gap: 20px; }
.jd-body .def-grid { padding: 14px 16px; background: #F9FAFB; border: 1px solid var(--border-card); border-radius: 10px; }
.jd-body section > .overline { margin-bottom: 8px; }
.rich-text { font-size: 14px; line-height: 1.6; }
.rich-text > * + * { margin-top: 10px; }
.rich-text h4 { font-size: 13.5px; font-weight: 600; margin-top: 14px; }
.rich-text h4:first-child { margin-top: 0; }
.rich-text ul, .rich-text ol { padding-left: 22px; margin-top: 6px; }
.rich-text li + li { margin-top: 4px; }
.rich-text p b { font-weight: 600; }

.prio-opt { display: inline-flex; align-items: center; gap: 8px; }
.prio-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.prio-high { background: #DC2626; }
.prio-med { background: #D97706; }
.prio-low { background: #16A34A; }

/* ---------- Scrim (mobile drawer) ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 55;
  background: rgb(11 18 32 / .5);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
body.drawer-open .scrim { opacity: 1; pointer-events: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .col-3 { grid-column: span 6; }
  .col-4 { grid-column: span 6; }
  .col-5 { grid-column: span 6; }
  .col-7, .col-8, .col-9 { grid-column: span 12; }
  .global-search { width: 220px; }
  .def-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  body.drawer-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
  .main { margin-left: 0; }
  .hamburger { display: inline-grid; }
  .avatar-meta { display: none; }
  .quicklinks span { display: none; }
  .quicklinks { width: 40px; padding: 0; justify-content: center; }
  .engage-layout, .todo-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .content { padding: 16px; }
  .topbar { padding: 0 16px; gap: 10px; }
  .global-search { display: none; }
  .col-3, .col-4, .col-5, .col-6 { grid-column: span 12; }
  .form-row { grid-template-columns: 1fr; }
  .def-grid { grid-template-columns: 1fr; }
  .stat-duo { grid-template-columns: 1fr 1fr; }
  .crumbs { display: none; }
  .doc-hero .art { display: none; }
  .profile-head .actions { margin-left: 0; width: 100%; }
}

@media (max-width: 420px) {
  .balance-inline { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .btn { padding: 0 13px; }
  .review-actions { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print-ish niceties ---------- */
::selection { background: var(--brand-tint); color: var(--sidebar-bg); }

/* --- dropdown menus (account, quick links) --------------------------------
   The topbar partial has always emitted .dropdown / .dd-icon / .dd-danger, but
   these rules stayed behind in HRMS's hrms.css when the kit moved here, so One
   and Projects drew the account menu as bare links under the avatar. */
.quicklinks-wrap, .account-wrap { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  min-width: 220px; background: var(--surface); border: 1px solid var(--border-card);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(17, 24, 39, .12);
  padding: 6px; display: flex; flex-direction: column;
}
.dropdown-right { left: auto; right: 0; }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 7px; border: 0; background: none;
  font: inherit; font-size: 13.5px; color: var(--text-2); text-decoration: none;
  text-align: left; cursor: pointer;
}
.dropdown a:hover, .dropdown button:hover { background: var(--bg); color: var(--text); }
.dropdown .dd-icon { width: 16px; height: 16px; color: #6b7280; flex: none; }
.dropdown .dd-danger { color: var(--danger); }
.dropdown .dd-danger:hover { background: var(--danger-soft); }
.dropdown form { margin: 0; }

/* Quick Links picker — also left behind in hrms.css when the kit moved here. */
/* The menu grew from four fixed links into every page the person may open, so
   it needs a search box, its own scroll, and a star per row. It stays a
   .dropdown so opening, closing and Escape keep working unchanged. */
.quicklinks-panel { width: 380px; max-width: calc(100vw - 32px); padding: 8px; }

.ql-search { position: relative; margin-bottom: 6px; }
.ql-search .input { padding-left: 32px; height: 36px; }
.ql-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #9ca3af; pointer-events: none;
}

.ql-list { max-height: min(420px, 60vh); overflow-y: auto; overscroll-behavior: contain; }

.ql-heading {
  margin: 8px 0 2px; padding: 0 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: #9ca3af;
}
.ql-heading:first-child { margin-top: 2px; }

.ql-row { display: flex; align-items: center; gap: 2px; border-radius: 7px; }
.ql-row:hover, .ql-row.is-cursor { background: #f9fafb; }
.ql-row > a { flex: 1; min-width: 0; padding: 8px 4px 8px 10px; }
.ql-row.is-cursor > a { color: #111827; }
.ql-label { flex: none; color: inherit; }
.ql-group {
  flex: 1; min-width: 0; text-align: right; padding-left: 10px;
  font-size: 11.5px; color: #9ca3af;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.ql-row form { margin: 0; flex: none; }
.ql-star {
  width: 30px; height: 30px; padding: 0; margin-right: 4px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: none; border-radius: 6px; cursor: pointer; color: #d1d5db;
}
.ql-star:hover { background: #f3f4f6; color: #f59e0b; }
.ql-star.is-on { color: #f59e0b; }
.ql-star.is-on .ql-star-icon { fill: currentColor; }
.ql-star:focus-visible { outline: 2px solid #0d9488; outline-offset: -2px; }

.ql-empty, .ql-hint { margin: 0; padding: 10px; font-size: 12.5px; color: #6b7280; }
.ql-hint { border-top: 1px solid #f3f4f6; margin-top: 4px; }

@media (max-width: 640px) {
  .quicklinks-panel { width: calc(100vw - 32px); }
  .ql-group { display: none; }
}

/* A wide (wordmark) logo in the square slot is scaled to fit, never squashed. */
.brand-logo img { object-fit: contain; }

/* Colour field (presets + picker + hex) — also left behind in hrms.css. */
/* ---------------------------------------------------------------------------
   Colour field — presets, a native picker and a hex box, all writing into the
   one text input that posts.
   --------------------------------------------------------------------------- */
.color-field-row { display: flex; align-items: center; gap: 10px; }

/* Browsers draw the colour input's swatch with their own padding and chrome.
   Clipping it to a round well of our own is the only way to get a control that
   matches the rest of the form across engines. */
.color-dial {
  position: relative; flex: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border-table); border-radius: var(--radius-btn);
  overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-card);
}
.color-dial input[type="color"] {
  position: absolute; inset: -6px;
  width: calc(100% + 12px); height: calc(100% + 12px);
  padding: 0; border: 0; background: none; cursor: pointer;
  appearance: none; -webkit-appearance: none;
}
.color-dial input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-dial input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 0; }
.color-dial input[type="color"]::-moz-color-swatch { border: 0; }
.color-field:focus-within .color-dial { border-color: var(--teal); }

.color-hex {
  width: 9.5em; flex: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px; text-transform: uppercase;
}

.color-presets { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }

/* A ring rather than a tick: at 22px a glyph drawn over the colour is harder to
   read than the gap that separates the swatch from its outline. */
.color-preset {
  width: 22px; height: 22px; padding: 0; flex: none;
  border: 1px solid rgb(17 24 39 / .14); border-radius: 50%;
  background: var(--preset); cursor: pointer;
  box-shadow: 0 0 0 0 var(--preset);
  transition: box-shadow .12s ease, transform .12s ease;
}
.color-preset:hover { transform: scale(1.12); }
.color-preset[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--preset);
}
.color-preset:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .color-preset { transition: none; }
  .color-preset:hover { transform: none; }
}


/* Field errors — also left behind in hrms.css. */
.field-error {
  display: flex; align-items: flex-start; gap: 6px;
  margin-top: 6px; font-size: 12.5px; line-height: 1.45; color: #b91c1c;
}
.field-error .icon { width: 14px; height: 14px; margin-top: 1px; vertical-align: 0; }
.input.has-error, select.input.has-error, textarea.input.has-error {
  border-color: #dc2626; background: #fffafa;
}
.input.has-error:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .18); }

/* ===========================================================================
   Restored 2026-09-30: rules the platform's own partials use (flash stack,
   breadcrumb switcher, sidebar collapse/rail, pagination, stepper, status
   pages, impersonation/view-as banners, charts, report switcher) that stayed
   behind in HRMS's styles.css/hrms.css when the kit moved here.
   =========================================================================== */
.list-rows { display: flex; flex-direction: column; }
.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.flash-close {
  background: none; border: 0; padding: 2px; cursor: pointer; color: inherit;
  opacity: .6; border-radius: 4px; line-height: 0;
}
.flash-close:hover { opacity: 1; }
.flash-close svg { width: 16px; height: 16px; }
.status-shell { min-height: 100dvh; padding: 32px 16px; }
.status-shell:has(> .status-card) {
  display: grid; place-items: center; text-align: center;
}
.status-card { max-width: 460px; }
.status-card p.status-code {
  font-size: 56px; font-weight: 700; color: var(--teal, #0D9488);
  line-height: 1; letter-spacing: -.03em; margin: 0;
}
.status-card p.status-code .status-icon { width: 44px; height: 44px; }
.status-card h1 { font-size: 20px; font-weight: 600; margin: 14px 0 8px; color: #111827; }
.status-card p { color: #4b5563; font-size: 14.5px; line-height: 1.6; margin: 0 0 22px; }
.impersonation-banner {
  position: fixed; inset: 0 0 auto 0; z-index: 200; height: 44px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  background: #92400e; color: #fffbeb; font-size: 13.5px; padding: 0 16px;
}
.impersonation-banner b { color: #fff; }
.impersonation-banner .ib-message {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.impersonation-banner .ib-form { flex: none; }
.impersonation-banner .ib-icon { width: 16px; height: 16px; vertical-align: -3px; }
.impersonation-banner .ib-form { margin: 0; }
.impersonation-banner .btn { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.impersonation-banner .ib-switch { display: flex; align-items: center; gap: 8px; }
.impersonation-banner .ib-switch-label { color: #fde68a; font-size: 12.5px; white-space: nowrap; }
.impersonation-banner .ib-switch select {
  height: 28px; padding: 0 26px 0 8px; font-size: 12.5px; line-height: 26px;
  background-color: #fffbeb; color: #7c2d12; border: 1px solid #fde68a; border-radius: 6px;
  max-width: 260px;
}
.impersonation-banner .ib-search {
  height: 28px; padding: 0 8px; font-size: 12.5px; max-width: 150px;
  background-color: #fffbeb; color: #7c2d12; border: 1px solid #fde68a; border-radius: 6px;
}
.impersonation-banner .ib-search::placeholder { color: #b45309; }
.impersonation-banner .ib-search[aria-invalid="true"] {
  border-color: #dc2626; background-color: #fef2f2;
}
.impersonation-banner .ib-combo { position: relative; }
.impersonation-banner .ib-combo .ib-search { max-width: 220px; width: 220px; }
.impersonation-banner .ib-list {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 210;
  width: 320px; max-width: min(320px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 80px)); overflow-y: auto;
  margin: 0; padding: 4px; list-style: none;
  background: #fff; color: #1f2937;
  border: 1px solid #e5e7eb; border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}
.impersonation-banner .ib-option {
  display: flex; flex-direction: column; gap: 1px;
  padding: 7px 10px; border-radius: 7px; cursor: pointer;
  font-size: 13px; line-height: 1.35;
}
.impersonation-banner .ib-option.is-active { background: #fef3c7; }
.impersonation-banner .ib-option-name { font-weight: 600; color: #111827; }
.impersonation-banner .ib-option-meta { font-size: 11.5px; color: #6b7280; }
.impersonation-banner .ib-option.is-unavailable { cursor: not-allowed; opacity: .62; }
.impersonation-banner .ib-option.is-unavailable .ib-option-name { font-weight: 500; }
.impersonation-banner .ib-empty {
  padding: 10px; font-size: 12.5px; color: #6b7280; text-align: center;
}
.impersonation-banner .ib-note {
  padding: 8px 10px; font-size: 12px; color: #6b7280; text-align: center;
  border-top: 1px solid var(--border-card, #e5e7eb); background: #f9fafb;
  cursor: default;
}
.viewas-banner { background: #1e3a5f; }
.viewas-banner .btn { background: #eff6ff; color: #1e3a5f; border-color: #bfdbfe; }
.viewas-banner b { color: #fff; }
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-top: 16px;
}
.pagination-summary { font-size: 13px; color: #6b7280; margin: 0; }
.pagination-summary b { color: #374151; font-variant-numeric: tabular-nums; }
.pagination ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.pagination a, .pagination span.is-current, .pagination span.is-disabled {
  min-width: 34px; height: 34px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e5e7eb; border-radius: 7px; background: #fff;
  font-size: 13.5px; color: #374151; text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.pagination a:hover { background: #f9fafb; border-color: #d1d5db; }
.pagination span.is-current { background: var(--teal, #0D9488); border-color: var(--teal, #0D9488); color: #fff; font-weight: 600; }
.pagination span.is-disabled { opacity: .4; }
.pagination .gap { border: 0; background: none; color: #9ca3af; min-width: 20px; }
.pagination svg { width: 16px; height: 16px; }
.stepper { display: flex; gap: 6px; list-style: none; margin: 0 0 26px; padding: 0; flex-wrap: wrap; }
.stepper li { flex: 1 1 90px; min-width: 80px; }
.stepper a, .stepper span {
  display: block; padding: 9px 4px 0; border-top: 3px solid #e5e7eb;
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: #9ca3af; text-decoration: none;
}
.stepper .is-done a, .stepper .is-done span { border-top-color: var(--teal, #0D9488); color: #4b5563; }
.stepper .is-current a, .stepper .is-current span { border-top-color: var(--teal, #0D9488); color: var(--teal-700, #0F766E); }
.stepper small { display: block; font-size: 12.5px; font-weight: 400; text-transform: none; letter-spacing: 0; color: #6b7280; margin-top: 2px; }
.mb-0 { margin-bottom: 0; }
@media (max-width: 720px) {
  .impersonation-banner { font-size: 12.5px; gap: 10px; }
  .impersonation-banner .ib-switch-label { display: none; }
  .impersonation-banner .ib-switch select { max-width: 150px; }
  .impersonation-banner .ib-combo .ib-search { width: 150px; max-width: 150px; }
  .impersonation-banner .ib-list { width: 280px; }
}
.chart { position: relative; width: 100%; min-height: var(--chart-h, 240px); }
.chart .grid line { stroke: var(--border-card, #e5e7eb); stroke-width: 1; }
.chart .axis { fill: var(--text-2, #4b5563); font-size: 11px; }
.chart .row-label { fill: var(--text, #111827); font-size: 12.5px; }
.chart .value { fill: var(--text-2, #4b5563); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .cell-value { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .bar, .chart .slice, .chart .cell { transition: opacity .12s ease; }
.chart .hit:hover ~ *, .chart g:hover .bar, .chart .slice:hover, .chart .cell:hover { opacity: .82; }
.chart .guide { stroke: var(--muted, #9ca3af); stroke-dasharray: 3 3; }
.chart .target { stroke: var(--warning, #b45309); stroke-dasharray: 5 4; stroke-width: 1.5; }
.chart .target-label { fill: var(--warning, #b45309); font-weight: 600; }
.chart .donut-total { font-size: 20px; font-weight: 600; fill: var(--text, #111827); font-variant-numeric: tabular-nums; }
.chart .donut-center { font-size: 11px; fill: var(--text-2, #4b5563); text-transform: uppercase; letter-spacing: .05em; }
.chart-empty { display: grid; place-items: center; color: #9ca3af; font-size: 13px; border: 1px dashed var(--border-card, #e5e7eb); border-radius: 8px; padding: 12px; }
.chart .sw, .chart-tip .sw, .donut-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.report-switcher {
  display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 2px;
  background: var(--bg, #f4f6f8); border: 1px solid var(--border-card, #e5e7eb); border-radius: var(--radius-btn, 8px);
}
.report-switcher a {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-2, #4b5563);
}
.report-switcher a:hover { text-decoration: none; color: var(--text); }
.report-switcher a[aria-current="page"] { background: var(--surface, #fff); color: var(--teal-text); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
@media print {
  .sidebar, .topbar, .scrim, .footer, .page-head-actions, .report-filters, .report-switcher, .flash,
  .impersonation-banner, .chart-legend button[aria-pressed="false"] { display: none !important; }
}
.crumb { position: relative; display: inline-flex; align-items: center; min-width: 0; }
.crumb > a, .crumb > span {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 24ch;
}
.crumb-switch {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 2px; padding: 0;
  border: 0; background: none; border-radius: 4px;
  color: var(--muted); cursor: pointer; opacity: .55;
}
.crumb-switch:hover { opacity: 1; background: #f3f4f6; color: #111827; }
.crumb-switch:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; opacity: 1; }
.crumb-switch svg { display: block; }
.crumb-menu {
  max-height: 60vh; overflow-y: auto;
  text-transform: none; letter-spacing: normal; font-size: 13.5px; font-weight: 400;
}
.crumb-menu a { color: #374151; }
.crumb-menu a.is-active { background: #f0fdfa; color: var(--teal-text); font-weight: 500; }
@media (max-width: 900px) {
  .crumb:not(:last-child), .crumbs .sep { display: none; }
}
.onb-steps .is-current > * { background: var(--teal-soft); color: var(--teal-text); font-weight: 600; }
.sidebar-collapse {
  flex: none;
  width: 28px; height: 28px; border-radius: 6px;
  display: grid; place-items: center;
  color: var(--sidebar-muted);
  transition: background .15s ease, color .15s ease;
}
.sidebar-collapse:hover { background: rgb(255 255 255 / .08); color: #fff; }
.sidebar-collapse .icon { transition: transform .18s ease; }
@media (min-width: 1024px) {
  .nav-railed .main { margin-left: var(--sidebar-rail); }
  .nav-railed .sidebar { width: var(--sidebar-rail); overflow-x: hidden; }
  .nav-railed .sidebar:hover,
  .nav-railed .sidebar:focus-within { width: var(--sidebar-w); box-shadow: var(--shadow-pop); }
  .nav-railed .sidebar-collapse .icon { transform: rotate(180deg); }
  .nav-railed .sidebar:not(:hover):not(:focus-within) .brand-link > span:not(.brand-logo),
  .nav-railed .sidebar:not(:hover):not(:focus-within) .sidebar-collapse,
  .nav-railed .sidebar:not(:hover):not(:focus-within) .nav-link > span:not(.nav-badge),
  .nav-railed .sidebar:not(:hover):not(:focus-within) .nav-toggle > span,
  .nav-railed .sidebar:not(:hover):not(:focus-within) .nav-toggle .chev,
  .nav-railed .sidebar:not(:hover):not(:focus-within) .submenu,
  .nav-railed .sidebar:not(:hover):not(:focus-within) .sidebar-foot > span:not(.avatar) {
    display: none;
  }
  .nav-railed .sidebar:not(:hover):not(:focus-within) .nav-section-label {
    height: 1px; padding: 0; margin: 12px 14px; overflow: hidden;
    background: rgb(255 255 255 / .12); color: transparent;
  }
  .nav-railed .sidebar:not(:hover):not(:focus-within) .nav-badge {
    position: absolute; top: 9px; left: 30px;
    width: 8px; min-width: 8px; height: 8px;
    margin: 0; padding: 0; font-size: 0; line-height: 0; overflow: hidden;
  }
}
@media (max-width: 1023px) {
  .sidebar-collapse { display: none; }
}
.analysis-donut .chart { min-height: 0; }
.journey .stepper span { padding-top: 8px; }
.journey .stepper small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted, #9ca3af); font-variant-numeric: tabular-nums; }
.journey .stepper .is-current small { color: var(--teal-700, #0F766E); }
.journey .stepper .is-terminal span { border-top-color: #B91C1C; color: #B91C1C; }
@media (min-width: 1024px) {
  .nav-railed .sidebar:not(:hover):not(:focus-within) .nav-fav-hint { display: none; }
}

/* Brand row: logo link grows, collapse button sits at the right (from hrms.css). */
.brand { display: flex; align-items: center; gap: 8px; }
.brand-link { flex: 1; min-width: 0; }
