/*
 * HRMBase design system
 * Layered on Bootstrap 5.3. Shared by HRMBase Core, Intranet, CBT and Inventory.
 * Location: packages/foundation/resources/assets/css/hrmbase-ui.css
 * Published to: <app>/public/assets/foundation/css/hrmbase-ui.css (php bin/console assets:publish)
 */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-var.woff2") format("woff2-variations"), url("../fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand */
  --hb-navy: #0B1F3A;
  --hb-navy-800: #102846;
  --hb-navy-700: #173257;
  --hb-navy-600: #22426D;
  --hb-royal: #2563EB;
  --hb-royal-700: #1D4ED8;
  --hb-royal-50: #EFF4FF;
  --hb-sky: #38BDF8;
  --hb-sky-100: #E0F4FE;

  /* Neutrals */
  --hb-ink: #0F172A;
  --hb-ink-2: #334155;
  --hb-muted: #5B6B82;
  --hb-surface: #F5F7FB;
  --hb-card: #FFFFFF;
  --hb-border: #E2E8F0;
  --hb-border-strong: #CBD5E1;

  /* Status */
  --hb-success: #15803D;
  --hb-success-bg: #ECFDF3;
  --hb-warning: #B45309;
  --hb-warning-bg: #FFF7E6;
  --hb-danger: #B91C1C;
  --hb-danger-bg: #FEF2F2;
  --hb-neutral: #475569;
  --hb-neutral-bg: #F1F5F9;

  /* Per-application accent: overridden via [data-app] on <body> */
  --hb-accent: var(--hb-royal);

  /* Layout */
  --hb-sidebar-w: 264px;
  --hb-sidebar-w-collapsed: 72px;
  --hb-topbar-h: 60px;
  --hb-radius: 8px;
  --hb-radius-sm: 6px;

  /* Bootstrap integration */
  --bs-body-font-family: "Inter", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-size: 0.875rem;
  --bs-body-line-height: 1.5;
  --bs-body-color: var(--hb-ink);
  --bs-body-bg: var(--hb-surface);
  --bs-border-color: var(--hb-border);
  --bs-primary: var(--hb-royal);
  --bs-primary-rgb: 37, 99, 235;
  --bs-link-color: var(--hb-royal);
  --bs-link-color-rgb: 37, 99, 235;
  --bs-link-hover-color: var(--hb-royal-700);
  --bs-border-radius: var(--hb-radius-sm);
  --bs-focus-ring-color: rgba(37, 99, 235, 0.35);
}

body[data-app="hrmbase"] { --hb-accent: var(--hb-royal); }
body[data-app="intranet"] { --hb-accent: #0284C7; }
body[data-app="cbt"] { --hb-accent: #0E7490; }
body[data-app="inventory"] { --hb-accent: #4338CA; }

html { -webkit-text-size-adjust: 100%; }
body { font-feature-settings: "cv11"; text-rendering: optimizeLegibility; }

h1, h2, h3, h4, h5, h6 { color: var(--hb-navy); font-weight: 650; letter-spacing: -0.01em; }
.hb-h1 { font-size: 1.5rem; line-height: 1.25; margin: 0; }
.hb-h2 { font-size: 1.125rem; line-height: 1.35; margin: 0; }
.text-muted, .hb-muted { color: var(--hb-muted) !important; }
.tabular { font-variant-numeric: tabular-nums; }
html { scroll-behavior: auto; }

:focus-visible { outline: 2px solid var(--hb-royal); outline-offset: 2px; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 2000; background: var(--hb-navy); color: #fff; padding: 8px 14px; border-radius: var(--hb-radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------------------------------------------------------------- Shell */
.hb-shell { display: flex; min-height: 100vh; }
.hb-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.hb-content { padding: 24px 28px 48px; width: 100%; max-width: 1480px; }

/* ---------------------------------------------------------------- Sidebar */
.hb-sidebar {
  width: var(--hb-sidebar-w);
  flex: 0 0 var(--hb-sidebar-w);
  /* !important: Bootstrap's .offcanvas-lg forces a transparent background at desktop widths */
  background: var(--hb-navy) !important;
  color: #C9D5E6;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.hb-sidebar .offcanvas-body { padding: 0; display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.hb-brand {
  display: flex; align-items: center; gap: 12px;
  height: var(--hb-topbar-h); padding: 0 20px;
  color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex: 0 0 auto;
}
.hb-brand:hover { color: #fff; }
.hb-brand-mark {
  width: 32px; height: 32px; border-radius: 8px; flex: 0 0 32px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--hb-royal) 0%, var(--hb-sky) 100%);
  color: #fff; font-weight: 800; font-size: 0.8rem; letter-spacing: -0.02em;
}
.hb-brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.hb-brand-name { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
.hb-brand-sub { font-size: 0.72rem; color: #8FA3BF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hb-nav { flex: 1 1 auto; overflow-y: auto; padding: 12px 10px 24px; scrollbar-width: thin; scrollbar-color: var(--hb-navy-600) transparent; }
.hb-nav-group + .hb-nav-group { margin-top: 6px; }
.hb-nav-heading {
  display: flex; align-items: center; width: 100%; gap: 10px;
  padding: 10px 12px 6px; background: none; border: 0;
  color: #8FA3BF; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  text-align: left;
}
button.hb-nav-heading { cursor: pointer; border-radius: var(--hb-radius-sm); }
button.hb-nav-heading:hover { color: #fff; }
.hb-nav-heading .hb-chevron { margin-left: auto; transition: transform 0.15s ease; font-size: 0.7rem; }
.hb-nav-heading[aria-expanded="false"] .hb-chevron { transform: rotate(-90deg); }
.hb-nav-list { list-style: none; margin: 0; padding: 0; }
.hb-nav-link {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; margin: 1px 0; border-radius: var(--hb-radius-sm);
  color: #C9D5E6; text-decoration: none; font-weight: 500;
}
.hb-nav-link .bi { font-size: 1.05rem; width: 20px; text-align: center; color: #8FA3BF; }
.hb-nav-link:hover { background: var(--hb-navy-700); color: #fff; }
.hb-nav-link:hover .bi { color: #fff; }
.hb-nav-link.active { background: var(--hb-navy-700); color: #fff; }
.hb-nav-link.active .bi { color: var(--hb-sky); }
.hb-nav-link.active::before {
  content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--hb-sky);
}
.hb-sidebar-footer { padding: 12px 20px; border-top: 1px solid rgba(255, 255, 255, 0.07); font-size: 0.72rem; color: #8FA3BF; flex: 0 0 auto; }

/* Collapsed (icon-only) sidebar on large screens */
@media (min-width: 992px) {
  body.hb-sidebar-collapsed .hb-sidebar { width: var(--hb-sidebar-w-collapsed); flex-basis: var(--hb-sidebar-w-collapsed); }
  body.hb-sidebar-collapsed .hb-brand-text,
  body.hb-sidebar-collapsed .hb-nav-heading span,
  body.hb-sidebar-collapsed .hb-nav-heading .hb-chevron,
  body.hb-sidebar-collapsed .hb-nav-link span,
  body.hb-sidebar-collapsed .hb-sidebar-footer { display: none; }
  body.hb-sidebar-collapsed .hb-brand { justify-content: center; padding: 0; }
  body.hb-sidebar-collapsed .hb-nav-link { justify-content: center; }
  body.hb-sidebar-collapsed .hb-nav-heading { justify-content: center; }
  body.hb-sidebar-collapsed .hb-nav-list.collapse:not(.show) { display: block; }
}

/* Off-canvas behaviour below 992px */
@media (max-width: 991.98px) {
  .hb-sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 1045; transform: translateX(-100%); visibility: hidden; transition: transform 0.2s ease, visibility 0.2s; }
  .hb-sidebar.show, .hb-sidebar.showing { transform: none; visibility: visible; }
  .hb-content { padding: 16px 16px 40px; }
}

/* ---------------------------------------------------------------- Top bar */
.hb-topbar {
  position: sticky; top: 0; z-index: 1020;
  height: var(--hb-topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--hb-border);
  backdrop-filter: saturate(1.2) blur(6px);
}
.hb-icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: var(--hb-radius-sm); border: 1px solid transparent; background: none; color: var(--hb-ink-2);
  position: relative;
}
.hb-icon-btn:hover { background: var(--hb-neutral-bg); color: var(--hb-navy); }
.hb-icon-btn .bi { font-size: 1.15rem; }
.hb-app-label { font-weight: 600; color: var(--hb-navy); display: flex; align-items: center; gap: 8px; }
.hb-app-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hb-accent); }
.hb-env-bar { height: 4px; background: repeating-linear-gradient(45deg, #F59E0B 0 10px, #0B1F3A 10px 20px); }

/* App switcher */
.hb-switcher { width: 300px; padding: 12px; }
.hb-switcher-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hb-switcher-app {
  display: flex; flex-direction: column; gap: 6px; padding: 12px;
  border: 1px solid var(--hb-border); border-radius: var(--hb-radius);
  text-decoration: none; color: var(--hb-ink);
}
.hb-switcher-app:hover { border-color: var(--hb-royal); background: var(--hb-royal-50); color: var(--hb-navy); }
.hb-switcher-app .bi { font-size: 1.3rem; color: var(--hb-royal); }
.hb-switcher-app.current { border-color: var(--hb-royal); box-shadow: inset 0 0 0 1px var(--hb-royal); }

/* ---------------------------------------------------------------- Page header & breadcrumbs */
.hb-breadcrumb { --bs-breadcrumb-divider: "›"; --bs-breadcrumb-margin-bottom: 6px; font-size: 0.8rem; flex-wrap: nowrap; overflow: hidden; }
.hb-breadcrumb .breadcrumb-item { white-space: nowrap; }
.hb-breadcrumb .breadcrumb-item a { color: var(--hb-muted); text-decoration: none; }
.hb-breadcrumb .breadcrumb-item a:hover { color: var(--hb-royal); text-decoration: underline; }
.hb-breadcrumb .breadcrumb-item.active { color: var(--hb-ink-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 575.98px) {
  .hb-breadcrumb .breadcrumb-item.hb-bc-middle { display: none; }
  .hb-breadcrumb .breadcrumb-item.hb-bc-ellipsis { display: list-item !important; }
}
.hb-bc-ellipsis { display: none !important; }

.hb-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.hb-page-header .hb-subtitle { color: var(--hb-muted); margin: 4px 0 0; max-width: 72ch; }
.hb-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Cards */
.hb-card { background: var(--hb-card); border: 1px solid var(--hb-border); border-radius: var(--hb-radius); }
.hb-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--hb-border); }
.hb-card-title { font-size: 0.95rem; font-weight: 650; color: var(--hb-navy); margin: 0; }
.hb-card-body { padding: 18px; }
.hb-card-footer { padding: 12px 18px; border-top: 1px solid var(--hb-border); background: #FBFCFE; border-radius: 0 0 var(--hb-radius) var(--hb-radius); }

/* Stat card: the figure is the design; label sits below in quiet type */
.hb-stat { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-left: 3px solid var(--hb-accent); text-decoration: none; color: inherit; }
a.hb-stat:hover { background: #FBFCFE; }
.hb-stat-value { font-size: 1.75rem; font-weight: 700; color: var(--hb-navy); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.hb-stat-label { color: var(--hb-muted); font-size: 0.8rem; }
.hb-stat-meta { font-size: 0.75rem; color: var(--hb-ink-2); margin-top: 4px; }

/* ---------------------------------------------------------------- Buttons */
.btn { --bs-btn-font-weight: 550; --bs-btn-padding-y: 0.45rem; --bs-btn-padding-x: 0.9rem; --bs-btn-font-size: 0.875rem; border-radius: var(--hb-radius-sm); }
.btn-primary { --bs-btn-bg: var(--hb-royal); --bs-btn-border-color: var(--hb-royal); --bs-btn-hover-bg: var(--hb-royal-700); --bs-btn-hover-border-color: var(--hb-royal-700); --bs-btn-active-bg: #1E40AF; --bs-btn-disabled-bg: var(--hb-royal); }
.btn-navy { --bs-btn-color: #fff; --bs-btn-bg: var(--hb-navy); --bs-btn-border-color: var(--hb-navy); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--hb-navy-700); --bs-btn-hover-border-color: var(--hb-navy-700); }
.btn-outline-secondary { --bs-btn-color: var(--hb-ink-2); --bs-btn-border-color: var(--hb-border-strong); --bs-btn-hover-bg: var(--hb-neutral-bg); --bs-btn-hover-color: var(--hb-navy); --bs-btn-hover-border-color: var(--hb-border-strong); }
.btn[aria-busy="true"] { pointer-events: none; opacity: 0.75; }

/* ---------------------------------------------------------------- Forms */
.form-label { font-weight: 550; color: var(--hb-ink-2); margin-bottom: 6px; font-size: 0.8125rem; }
.form-label .hb-req { color: var(--hb-danger); margin-left: 2px; }
.form-control, .form-select { border-color: var(--hb-border-strong); border-radius: var(--hb-radius-sm); }
.form-control:not(.form-control-sm):not(.form-control-lg), .form-select:not(.form-select-sm):not(.form-select-lg) { font-size: 0.875rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.form-control:focus, .form-select:focus { border-color: var(--hb-royal); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18); }
.form-text { color: var(--hb-muted); }
.invalid-feedback { font-size: 0.78rem; }
.hb-form-section + .hb-form-section { margin-top: 20px; }
.hb-form-section-title { font-size: 0.9rem; font-weight: 650; color: var(--hb-navy); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--hb-border); }
.hb-error-summary { border-left: 3px solid var(--hb-danger); }

/* ---------------------------------------------------------------- Tables */
.hb-table { --bs-table-bg: transparent; margin: 0; font-size: 0.85rem; }
.hb-table > thead th { background: #F8FAFC; color: var(--hb-muted); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.02em; border-bottom: 1px solid var(--hb-border); padding: 10px 14px; white-space: nowrap; }
.hb-table > tbody td { padding: 11px 14px; border-color: var(--hb-border); vertical-align: middle; }
.hb-table > tbody tr:hover > td { background: #FAFBFD; }
.hb-table th a.hb-sort { color: inherit; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.hb-table-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--hb-border); }
.hb-table-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--hb-border); font-size: 0.8rem; color: var(--hb-muted); flex-wrap: wrap; }

/* Tables become stacked cards on small screens */
@media (max-width: 767.98px) {
  .hb-table-stack thead { display: none; }
  .hb-table-stack tbody tr { display: block; border-bottom: 1px solid var(--hb-border); padding: 10px 14px; }
  .hb-table-stack tbody td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .hb-table-stack tbody td::before { content: attr(data-label); color: var(--hb-muted); font-size: 0.75rem; }
  .hb-table-stack tbody td.hb-td-primary { font-weight: 600; font-size: 0.9rem; }
  .hb-table-stack tbody td.hb-td-primary::before { content: none; }
}

/* ---------------------------------------------------------------- Status badges */
.hb-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.hb-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hb-badge-success { color: var(--hb-success); background: var(--hb-success-bg); }
.hb-badge-warning { color: var(--hb-warning); background: var(--hb-warning-bg); }
.hb-badge-danger { color: var(--hb-danger); background: var(--hb-danger-bg); }
.hb-badge-info { color: var(--hb-royal-700); background: var(--hb-royal-50); }
.hb-badge-neutral { color: var(--hb-neutral); background: var(--hb-neutral-bg); }

/* ---------------------------------------------------------------- Alerts */
.hb-alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--hb-radius); border: 1px solid; font-size: 0.85rem; }
.hb-alert .bi { font-size: 1.1rem; line-height: 1.3; }
.hb-alert-title { font-weight: 650; margin-bottom: 2px; }
.hb-alert-success { background: var(--hb-success-bg); border-color: #BBF7D0; color: #14532D; }
.hb-alert-warning { background: var(--hb-warning-bg); border-color: #FDE68A; color: #78350F; }
.hb-alert-danger { background: var(--hb-danger-bg); border-color: #FECACA; color: #7F1D1D; }
.hb-alert-info { background: var(--hb-royal-50); border-color: #BFDBFE; color: #1E3A8A; }

/* Configuration required marker (business rule not yet signed off) */
.hb-config-required { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 650; color: var(--hb-warning); background: var(--hb-warning-bg); border: 1px dashed #F5C26B; padding: 2px 8px; border-radius: 4px; }

/* ---------------------------------------------------------------- Empty, loading, skeleton */
.hb-empty { text-align: center; padding: 48px 24px; }
.hb-empty-icon { width: 56px; height: 56px; border-radius: 14px; display: inline-grid; place-items: center; background: var(--hb-royal-50); color: var(--hb-royal); font-size: 1.5rem; margin-bottom: 14px; }
.hb-empty h3 { font-size: 1rem; margin-bottom: 6px; }
.hb-empty p { color: var(--hb-muted); max-width: 46ch; margin: 0 auto 16px; }
.hb-skeleton { position: relative; overflow: hidden; background: #EDF1F7; border-radius: 4px; min-height: 12px; }
.hb-skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent); animation: hb-shimmer 1.3s infinite; }
@keyframes hb-shimmer { 100% { transform: translateX(100%); } }

/* ---------------------------------------------------------------- Timeline (approval history, activity) */
.hb-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.hb-timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--hb-border); }
.hb-timeline-item { position: relative; padding: 0 0 18px 36px; }
.hb-timeline-dot { position: absolute; left: 4px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--hb-border-strong); }
.hb-timeline-item.is-success .hb-timeline-dot { border-color: var(--hb-success); }
.hb-timeline-item.is-danger .hb-timeline-dot { border-color: var(--hb-danger); }
.hb-timeline-item.is-current .hb-timeline-dot { border-color: var(--hb-royal); box-shadow: 0 0 0 4px var(--hb-royal-50); }
.hb-timeline-title { font-weight: 600; color: var(--hb-navy); }
.hb-timeline-meta { font-size: 0.75rem; color: var(--hb-muted); }

/* ---------------------------------------------------------------- Auth & error layouts */
.hb-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 480px); background: var(--hb-surface); }
.hb-auth-aside {
  background: var(--hb-navy); color: #C9D5E6; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background-image: radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.16), transparent 42%), linear-gradient(160deg, var(--hb-navy) 0%, #0A1A30 100%);
}
.hb-auth-aside h1 { color: #fff; font-size: 2rem; line-height: 1.2; max-width: 18ch; letter-spacing: -0.02em; }
.hb-auth-aside p { max-width: 46ch; }
.hb-auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 32px; background: #fff; }
.hb-auth-card { width: 100%; max-width: 380px; }
@media (max-width: 991.98px) {
  .hb-auth { grid-template-columns: 1fr; }
  .hb-auth-aside { padding: 28px 24px; }
  .hb-auth-aside h1 { font-size: 1.4rem; }
  .hb-auth-aside .hb-auth-aside-foot { display: none; }
}
.hb-error-code { font-size: 0.8rem; font-weight: 700; color: var(--hb-royal); letter-spacing: 0.06em; }
.hb-reference { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; background: var(--hb-neutral-bg); padding: 2px 6px; border-radius: 4px; }
.hb-debug { max-height: 360px; overflow: auto; font-size: 0.75rem; background: #0F172A; color: #E2E8F0; padding: 14px; border-radius: var(--hb-radius); white-space: pre-wrap; }

/* ---------------------------------------------------------------- Toasts */
.hb-toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 1090; display: flex; flex-direction: column; gap: 8px; }

/* ---------------------------------------------------------------- Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------------------------------------------------------------- Print */
@media print {
  .hb-sidebar, .hb-topbar, .hb-page-actions, .hb-env-bar, .hb-toast-region { display: none !important; }
  .hb-content { padding: 0; max-width: none; }
  body { background: #fff; }
  .hb-card { border: 0; }
}

/* ---------------------------------------------------------------- Avatar */
.hb-avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--hb-navy); color: #fff; font-weight: 650; font-size: 0.78rem; letter-spacing: 0.02em; flex: 0 0 34px; }

/* ---------------------------------------------------------------- Identity: sign-in, verification, account security */
.hb-otp { font-size: 1.35rem; letter-spacing: 0.35em; font-variant-numeric: tabular-nums; text-align: center; max-width: 16rem; }
.hb-auth-card .hb-otp { max-width: none; }
.hb-password .btn { border-color: var(--hb-border-strong); }
.hb-setup { max-width: 760px; }
.hb-steps { counter-reset: hb-step; list-style: none; margin: 0; padding: 8px 24px; }
.hb-steps > li { counter-increment: hb-step; position: relative; padding: 20px 0 20px 48px; border-bottom: 1px solid var(--hb-border); }
.hb-steps > li:last-child { border-bottom: 0; }
.hb-steps > li::before {
  content: counter(hb-step); position: absolute; left: 0; top: 18px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--hb-royal-50); color: var(--hb-royal-700); font-weight: 700; font-size: 0.85rem;
}
.hb-steps .hb-h2 { font-size: 1rem; margin-bottom: 4px; }
.hb-qr { width: 184px; height: 184px; padding: 8px; background: #fff; border: 1px solid var(--hb-border); border-radius: var(--hb-radius); display: grid; place-items: center; }
.hb-qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.hb-secret { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: 0.08em; color: var(--hb-navy); font-weight: 600; }
.hb-setup-form { max-width: 20rem; margin-top: 8px; }
.hb-codes { list-style: none; margin: 0; padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; background: var(--hb-surface); border: 1px dashed var(--hb-border-strong); border-radius: var(--hb-radius); max-width: 420px; }
.hb-codes li { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: 0.06em; color: var(--hb-navy); }
.hb-dl dt { font-weight: 500; color: var(--hb-muted); font-size: 0.8125rem; padding-top: 6px; padding-bottom: 6px; }
.hb-dl dd { padding-top: 6px; padding-bottom: 6px; margin-bottom: 0; }
.hb-activity li + li { border-top: 1px solid var(--hb-border); }
.hb-activity .bi { font-size: 1.05rem; line-height: 1.4; }
.hb-app-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; text-decoration: none; color: var(--hb-ink); height: 100%; }
.hb-app-tile:hover { border-color: var(--hb-royal); color: var(--hb-navy); }
.hb-app-tile .bi { font-size: 1.4rem; color: var(--hb-accent); margin-bottom: 4px; }
.hb-auth-card .hb-empty-icon { width: 48px; height: 48px; font-size: 1.3rem; }
@media print {
  body.hb-printing-codes .hb-content > *:not(.hb-setup), body.hb-printing-codes .hb-setup .btn, body.hb-printing-codes .hb-card-footer { display: none !important; }
}

/* ---------------------------------------------------------------- Access control: users, roles, permissions */
.hb-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; margin: 1px 4px 1px 0; border-radius: 999px; background: var(--hb-surface); border: 1px solid var(--hb-border); font-size: 0.75rem; color: var(--hb-ink); white-space: nowrap; }
.hb-chip-warning { background: #FFF7E6; border-color: #F5D38A; color: #8A5A00; }
.hb-h3 { font-size: 0.9rem; font-weight: 600; color: var(--hb-navy); margin-bottom: 6px; }
.hb-search { min-width: 240px; max-width: 320px; }
.hb-form-card { max-width: 920px; }
.hb-role-picker { border: 0; padding: 0; margin: 0; }
.hb-role-option { padding: 10px 12px 10px 36px; border: 1px solid var(--hb-border); border-radius: var(--hb-radius); margin-bottom: 8px; }
.hb-role-option:has(input:checked) { border-color: var(--hb-royal); background: var(--hb-royal-50); }
.hb-role-picker:disabled .hb-role-option { opacity: 0.85; }
.hb-perm-group { padding: 14px 20px; border-top: 1px solid var(--hb-border); }
.hb-perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 20px; margin-top: 10px; }
.hb-perm-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.7rem; color: var(--hb-muted); }
.hb-perm-list { columns: 2 280px; padding-left: 1.1rem; margin-bottom: 8px; font-size: 0.85rem; }
.hb-perm-list li { break-inside: avoid; margin-bottom: 3px; }
.hb-action-list { display: flex; flex-direction: column; gap: 8px; }
.hb-link-box { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; word-break: break-all; padding: 10px 12px; background: var(--hb-surface); border: 1px dashed var(--hb-border-strong); border-radius: var(--hb-radius); }
.hb-change-detail { color: var(--hb-ink); }

/* Privileged session marker (Super Administrator) */
.hb-privilege-badge { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; padding: 4px 10px; border-radius: 999px; background: #FDECEC; color: #9B1C1C; border: 1px solid #F5B5B5; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }

/* ---------------------------------------------------------------- People: employees and organisation */
.hb-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.hb-kpi { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 16px; text-decoration: none; color: var(--hb-ink); }
.hb-kpi:hover { border-color: var(--hb-royal); }
.hb-kpi .bi { grid-row: span 2; font-size: 1.4rem; color: var(--hb-accent); }
.hb-kpi-value { font-size: 1.35rem; font-weight: 700; color: var(--hb-navy); line-height: 1.1; }
.hb-kpi-label { font-size: 0.8rem; color: var(--hb-muted); }
.hb-kpi-warning .bi { color: #B7791F; }
.hb-kpi-danger .bi, .hb-kpi-danger .hb-kpi-value { color: #B42318; }
.hb-chip-danger { background: #FDECEC; border-color: #F5B5B5; color: #9B1C1C; }
.hb-row-muted > td { color: var(--hb-muted); }
.hb-profile-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.hb-profile-head .hb-page-header { margin-bottom: 6px; }
.hb-avatar-lg { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--hb-navy); color: #fff; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; margin-top: 4px; }
.hb-emp-form { max-width: 1100px; }

/* =================================================================================
 * Brand refresh (Phase 1 step 5): royal and sky carry the interface, navy anchors it.
 * Kept as one section so the palette can be tuned in one place.
 * ================================================================================= */
:root {
  --hb-royal-100: #DBEAFE;
  --hb-royal-200: #BFDBFE;
  --hb-sky-50: #F0F9FF;
  --hb-sky-300: #7DD3FC;
  --hb-sky-600: #0284C7;
  --hb-violet: #7C3AED;
  --hb-violet-50: #F3EEFF;
  --hb-emerald: #059669;
  --hb-emerald-50: #ECFDF5;
  --hb-amber: #D97706;
  --hb-amber-50: #FFFBEB;
  --hb-rose: #E11D48;
  --hb-rose-50: #FFF1F3;
  --hb-grad-brand: linear-gradient(135deg, #2563EB 0%, #38BDF8 100%);
  --hb-grad-deep: linear-gradient(120deg, #0B1F3A 0%, #173E8C 55%, #2563EB 85%, #38BDF8 130%);
  --hb-shadow-brand: 0 6px 18px -8px rgba(37, 99, 235, 0.55);
  --bs-link-color: var(--hb-royal);
  --bs-link-color-rgb: 37, 99, 235;
  --bs-link-hover-color: var(--hb-sky-600);
}

/* Top bar: brand gradient underline, tinted app label */
.hb-topbar { box-shadow: inset 0 -3px 0 0 transparent; position: relative; }
.hb-topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--hb-grad-brand); opacity: 0.9; }
.hb-app-label { background: var(--hb-royal-50); color: var(--hb-royal-700); padding: 4px 12px 4px 10px; border-radius: 999px; font-size: 0.8rem; }
.hb-app-label::before { background: var(--hb-grad-brand); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25); }

/* Sidebar: deep gradient, sky headings, luminous active item */
.hb-sidebar { background: linear-gradient(180deg, #0B1F3A 0%, #0E2750 60%, #12306A 100%); }
.hb-nav-heading { color: var(--hb-sky-300); opacity: 0.9; }
.hb-nav-link:hover { background: rgba(56, 189, 248, 0.12); }
.hb-nav-link:hover .bi { color: var(--hb-sky-300); }
.hb-nav-link.active { background: var(--hb-grad-brand); color: #fff; box-shadow: var(--hb-shadow-brand); }
.hb-nav-link.active .bi { color: #fff; }
.hb-nav-link.active::before { display: none; }
.hb-brand-mark { background: var(--hb-grad-brand) !important; box-shadow: 0 4px 14px -4px rgba(56, 189, 248, 0.7); }

/* Buttons */
.btn-primary {
  --bs-btn-bg: var(--hb-royal); --bs-btn-border-color: transparent; --bs-btn-hover-border-color: transparent;
  background-image: linear-gradient(135deg, #2563EB 0%, #1D8FE0 100%); box-shadow: var(--hb-shadow-brand);
}
.btn-primary:hover { background-image: linear-gradient(135deg, #1D4ED8 0%, #0EA5E9 100%); }
.btn-outline-secondary:hover { background: var(--hb-royal-50); color: var(--hb-royal-700); border-color: var(--hb-royal-200); }
.btn-outline-primary { --bs-btn-color: var(--hb-royal); --bs-btn-border-color: var(--hb-royal-200); --bs-btn-hover-bg: var(--hb-royal-50); --bs-btn-hover-color: var(--hb-royal-700); --bs-btn-hover-border-color: var(--hb-royal); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--hb-sky); box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.28); }
.form-check-input:checked { background-color: var(--hb-royal); border-color: var(--hb-royal); }

/* Headings and cards */
.hb-page-header .hb-h1 { background: linear-gradient(90deg, #0B1F3A 0%, #1D4ED8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hb-card-title { display: flex; align-items: center; gap: 10px; }
.hb-card-title::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: var(--hb-grad-brand); flex: 0 0 4px; }
.hb-card { transition: box-shadow 0.15s ease, border-color 0.15s ease; }
a.hb-card:hover, .hb-app-tile:hover { box-shadow: 0 10px 24px -14px rgba(37, 99, 235, 0.55); border-color: var(--hb-royal-200); }
.hb-breadcrumb .breadcrumb-item.active { color: var(--hb-royal-700); font-weight: 600; }

/* Tables */
.hb-table > thead th { background: linear-gradient(180deg, var(--hb-sky-50) 0%, #EEF4FF 100%); color: var(--hb-navy); border-bottom: 2px solid var(--hb-royal-100); }
.hb-table > tbody tr:hover > td { background: var(--hb-sky-50); }
.pagination { --bs-pagination-active-bg: var(--hb-royal); --bs-pagination-active-border-color: var(--hb-royal); --bs-pagination-color: var(--hb-royal); --bs-pagination-hover-color: var(--hb-royal-700); --bs-pagination-focus-box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.3); }

/* Chips and badges */
.hb-chip { background: var(--hb-royal-50); border-color: var(--hb-royal-100); color: var(--hb-royal-700); }
.hb-badge-info { color: var(--hb-sky-600); background: var(--hb-sky-50); }
.hb-alert-info { background: linear-gradient(135deg, var(--hb-royal-50) 0%, var(--hb-sky-50) 100%); border-color: var(--hb-royal-100); }

/* Avatars */
.hb-avatar, .hb-avatar-lg { background: var(--hb-grad-brand); box-shadow: 0 4px 12px -6px rgba(37, 99, 235, 0.7); }

/* KPI tiles: coloured icon tiles */
.hb-kpi .bi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; color: #fff; background: var(--hb-grad-brand); box-shadow: var(--hb-shadow-brand); }
.hb-kpi-value { color: var(--hb-navy); }
.hb-kpi-warning .bi { background: linear-gradient(135deg, #F59E0B, #FBBF24); color: #fff; box-shadow: 0 6px 16px -8px rgba(217, 119, 6, 0.7); }
.hb-kpi-danger .bi { background: linear-gradient(135deg, #E11D48, #FB7185); color: #fff; box-shadow: 0 6px 16px -8px rgba(225, 29, 72, 0.7); }
.hb-kpi-danger .hb-kpi-value { color: var(--hb-rose); }
.hb-kpi-sky .bi { background: linear-gradient(135deg, #0EA5E9, #38BDF8); }
.hb-kpi-violet .bi { background: linear-gradient(135deg, #7C3AED, #A78BFA); box-shadow: 0 6px 16px -8px rgba(124, 58, 237, 0.7); }
.hb-kpi-emerald .bi { background: linear-gradient(135deg, #059669, #34D399); box-shadow: 0 6px 16px -8px rgba(5, 150, 105, 0.7); }

/* Hero banner (dashboard greeting and key pages) */
.hb-hero { position: relative; overflow: hidden; border-radius: 14px; padding: 22px 26px; margin-bottom: 20px; color: #fff; background: var(--hb-grad-deep); box-shadow: 0 14px 30px -18px rgba(11, 31, 58, 0.8); }
.hb-hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(56, 189, 248, 0.45) 0%, rgba(56, 189, 248, 0) 70%); }
.hb-hero h1 { color: #fff; font-size: 1.45rem; margin: 0 0 4px; font-weight: 700; }
.hb-hero p { color: #CFE6FF; margin: 0; }
.hb-hero .btn-light { color: var(--hb-royal-700); font-weight: 600; }
.hb-hero-actions { position: relative; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* Sign-in screen: royal and sky glow */
.hb-auth-aside { background: radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.35) 0%, rgba(56, 189, 248, 0) 38%), radial-gradient(circle at 10% 90%, rgba(37, 99, 235, 0.45) 0%, rgba(37, 99, 235, 0) 45%), var(--hb-grad-deep) !important; }

/* Modals: brand strip and softer surface */
.modal-content { border: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px -20px rgba(11, 31, 58, 0.55); }
.modal-content::before { content: ""; display: block; height: 4px; background: var(--hb-grad-brand); }
.modal-header { border-bottom-color: var(--hb-border); }
.modal-footer { background: var(--hb-surface); border-top-color: var(--hb-border); }
.modal-backdrop.show { opacity: 0.55; }

/* Step sequence icons and tabs */
.nav-pills.hb-tabs .nav-link { color: var(--hb-ink-2); border-radius: 999px; padding: 6px 14px; font-weight: 500; }
.nav-pills.hb-tabs .nav-link.active { background: var(--hb-grad-brand); color: #fff; box-shadow: var(--hb-shadow-brand); }
.hb-count-pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--hb-rose); color: #fff; font-size: 0.7rem; font-weight: 700; }
.hb-nav-link .hb-count-pill { margin-left: auto; }

/* Timeline (approval history) */
.hb-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; }
.hb-timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--hb-royal-100); }
.hb-timeline li:not(.hb-timeline-item) { position: relative; padding: 0 0 14px 10px; }
.hb-timeline li:not(.hb-timeline-item)::before { content: ""; position: absolute; left: -18px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--hb-grad-brand); box-shadow: 0 0 0 3px #fff; }
.hb-timeline li.hb-timeline-pending::before { background: #F59E0B; }
.hb-timeline li.hb-timeline-rejected::before { background: var(--hb-rose); }
.hb-timeline li.hb-timeline-cancelled::before { background: var(--hb-border-strong); }
/* The approval-timeline component (items with their own dot) keeps its own rail. */
.hb-timeline:has(> .hb-timeline-item) { padding-left: 0; }
.hb-timeline:has(> .hb-timeline-item)::before { left: 11px; background: var(--hb-border); }
.hb-alert-warning { background: var(--hb-amber-50); border-color: #FCD34D; color: #78350F; }
.hb-quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.hb-quick-link { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--hb-border); background: #fff; text-decoration: none; color: var(--hb-ink); font-weight: 500; }
.hb-quick-link .bi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--hb-grad-brand); }
.hb-quick-link:nth-child(4n+2) .bi { background: linear-gradient(135deg, #0EA5E9, #38BDF8); }
.hb-quick-link:nth-child(4n+3) .bi { background: linear-gradient(135deg, #7C3AED, #A78BFA); }
.hb-quick-link:nth-child(4n+4) .bi { background: linear-gradient(135deg, #059669, #34D399); }
.hb-quick-link:hover { border-color: var(--hb-royal-200); box-shadow: 0 10px 24px -14px rgba(37, 99, 235, 0.55); color: var(--hb-royal-700); }

/* ---------------------------------------------------------------- Intranet: news, directory, departments */
.hb-hero-intranet { background: radial-gradient(circle at 90% 10%, rgba(56, 189, 248, 0.5) 0%, rgba(56, 189, 248, 0) 40%), linear-gradient(120deg, #0B1F3A 0%, #0C4A8A 55%, #0284C7 100%); }
.hb-hero-search { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; margin-top: 16px; max-width: 640px; background: #fff; border-radius: 12px; padding: 6px 6px 6px 14px; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.45); }
.hb-hero-search .bi { color: var(--hb-muted); }
.hb-hero-search input { flex: 1 1 auto; border: 0; outline: 0; font-size: 0.95rem; color: var(--hb-ink); min-width: 0; }
.hb-news-card { display: block; padding: 14px 16px; text-decoration: none; color: var(--hb-ink); border-left: 4px solid var(--hb-royal); }
.hb-news-card:hover { color: var(--hb-ink); }
.hb-news-title { font-size: 1rem; font-weight: 650; color: var(--hb-navy); margin: 0 0 4px; }
.hb-news-tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; color: #fff; background: var(--hb-royal); }
.hb-news-violet { border-left-color: var(--hb-violet); } .hb-news-violet .hb-news-tag { background: var(--hb-violet); }
.hb-news-emerald { border-left-color: var(--hb-emerald); } .hb-news-emerald .hb-news-tag { background: var(--hb-emerald); }
.hb-news-sky { border-left-color: #0EA5E9; } .hb-news-sky .hb-news-tag { background: #0EA5E9; }
.hb-people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 16px; }
.hb-person { display: flex; gap: 14px; padding: 14px 16px; align-items: flex-start; }
.hb-person .hb-avatar-lg { width: 48px; height: 48px; font-size: 0.95rem; margin-top: 0; }
.hb-person-name { font-size: 0.95rem; font-weight: 650; color: var(--hb-navy); margin: 0; }
.hb-person-role { font-size: 0.85rem; color: var(--hb-royal-700); font-weight: 500; margin-bottom: 2px; }
.min-w-0 { min-width: 0; }
.hb-dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.hb-article { max-width: 860px; }
.hb-article-lead { font-size: 1.05rem; color: var(--hb-ink-2); font-weight: 500; }
.hb-article-body { line-height: 1.7; }

/* KGIRS Account sign-in: which application the sign-in continues to */
.hb-destination { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--hb-royal-50); border: 1px solid var(--hb-royal-100); color: var(--hb-royal-700); font-size: 0.875rem; }
.hb-destination .bi { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--hb-grad-brand); font-size: 0.9rem; }
.hb-scope-dir { padding: 10px 0; border-bottom: 1px dashed var(--hb-border); }
.hb-scope-dir:last-child { border-bottom: 0; }
.hb-directorate-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.hb-directorate-head > .bi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #7C3AED, #A78BFA); font-size: 1.1rem; }

/* ---------------------------------------------------------------- Payroll */
.hb-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.hb-scale th, .hb-scale td { white-space: nowrap; }
.hb-scale-na { background: var(--hb-surface); }
.hb-payslip { position: relative; padding: 24px 28px; max-width: 900px; overflow: hidden; }
.hb-payslip-watermark { position: absolute; inset: 40% -10% auto; transform: rotate(-18deg); text-align: center; font-size: 2.2rem; font-weight: 800; letter-spacing: 0.1em; color: rgba(225, 29, 72, 0.12); pointer-events: none; }
.hb-payslip-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 3px solid transparent; border-image: var(--hb-grad-brand) 1; margin-bottom: 14px; }
.hb-payslip-org { font-weight: 700; color: var(--hb-navy); font-size: 1.1rem; }
.hb-payslip-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 18px; }
.hb-payslip-meta dt { font-size: 0.75rem; color: var(--hb-muted); font-weight: 500; }
.hb-payslip-meta dd { margin: 0; font-weight: 500; }
.hb-payslip-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.hb-payslip-h { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--hb-royal-700); margin-bottom: 6px; }
.hb-payslip-net { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding: 14px 18px; border-radius: 12px; background: var(--hb-grad-deep); color: #fff; font-size: 1.05rem; }
.hb-payslip-net strong { font-size: 1.4rem; }
@media print {
  .hb-sidebar, .hb-topbar, .hb-no-print, .hb-breadcrumb, .hb-toast-region { display: none !important; }
  .hb-main, .hb-content { margin: 0 !important; padding: 0 !important; }
  .hb-payslip { box-shadow: none; border: 0; max-width: none; }
  .hb-payslip-net { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* Money totals can be long: give KPI tiles room and let large figures wrap instead of overflowing. */
.hb-kpi-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.hb-kpi-grid .hb-kpi { min-width: 0; }
.hb-kpi-grid .hb-kpi-value { font-size: 1.2rem; overflow-wrap: anywhere; line-height: 1.25; }

/* ---------------------------------------------------------------- Leave and attendance */
.hb-leave-preview { padding: 10px 14px; border-radius: 10px; background: var(--hb-royal-50); border: 1px solid var(--hb-royal-100); color: var(--hb-royal-700); font-weight: 500; font-size: 0.9rem; }
.hb-leave-preview.is-over, .hb-leave-preview.is-error { background: var(--hb-rose-50); border-color: #FDA4AF; color: #9F1239; }
.hb-leave-cal { border-collapse: separate; border-spacing: 2px; width: 100%; font-size: 0.75rem; }
.hb-leave-cal th, .hb-leave-cal td { min-width: 22px; height: 30px; text-align: center; border-radius: 4px; }
.hb-leave-cal thead th { color: var(--hb-muted); font-weight: 600; }
.hb-leave-cal thead th.is-today { background: var(--hb-royal); color: #fff; }
.hb-leave-cal .hb-leave-cal-name { text-align: left; min-width: 200px; padding: 4px 10px 4px 0; position: sticky; left: 0; background: #fff; z-index: 1; font-size: 0.85rem; }
.hb-leave-cal td { background: var(--hb-surface); }
.hb-leave-cal .is-weekend { background: #EEF0F4; }
.hb-leave-cal .is-holiday, .hb-leave-key.is-holiday { background: repeating-linear-gradient(45deg, #FEF3C7, #FEF3C7 4px, #FDE68A 4px, #FDE68A 8px); }
.hb-leave-cal td.on-leave, .hb-leave-key.on-leave { background: var(--hb-grad-brand); }
.hb-leave-cal td.on-casual, .hb-leave-key.on-casual { background: linear-gradient(135deg, #0EA5E9, #38BDF8); }
.hb-leave-cal td.on-sick, .hb-leave-key.on-sick { background: linear-gradient(135deg, #E11D48, #FB7185); }
.hb-leave-cal td.on-maternity, .hb-leave-cal td.on-paternity, .hb-leave-key.on-maternity { background: linear-gradient(135deg, #7C3AED, #A78BFA); }
.hb-leave-cal td.on-unpaid, .hb-leave-key.on-unpaid { background: repeating-linear-gradient(135deg, #64748B 0 4px, #94A3B8 4px 8px); }
.hb-leave-key { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }

/* ---------------------------------------------------------------- performance appraisal */
.hb-progress { display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; background: var(--hb-royal-50); overflow: hidden; appearance: none; }
.hb-progress::-webkit-progress-bar { background: var(--hb-royal-50); border-radius: 999px; }
.hb-progress::-webkit-progress-value { background: linear-gradient(90deg, var(--hb-royal-600, #2563EB), var(--hb-sky-400, #38BDF8)); border-radius: 999px; }
.hb-progress::-moz-progress-bar { background: linear-gradient(90deg, var(--hb-royal-600, #2563EB), var(--hb-sky-400, #38BDF8)); border-radius: 999px; }
.hb-card-link { transition: transform .15s ease, box-shadow .15s ease; }
.hb-card-link:hover, .hb-card-link:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11, 31, 58, .10); }
.hb-steps { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; counter-reset: hbstep; }
.hb-steps li { flex: 1 1 120px; padding: 8px 10px 8px 34px; position: relative; border-radius: 10px; background: #F1F5F9; color: #64748B; font-size: .82rem; font-weight: 500; counter-increment: hbstep; }
.hb-steps li::before { content: counter(hbstep); position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%; background: #CBD5E1; color: #fff; font-size: .7rem; display: grid; place-items: center; }
.hb-steps li.is-done { background: #ECFDF5; color: #047857; }
.hb-steps li.is-done::before { content: "\2713"; background: #10B981; }
.hb-steps li.is-current { background: var(--hb-royal-50); color: var(--hb-royal-700); box-shadow: inset 0 0 0 1px var(--hb-royal-100); }
.hb-steps li.is-current::before { background: var(--hb-royal-600, #2563EB); }
.hb-score { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 700; font-size: 1.6rem; color: var(--hb-navy, #0B1F3A); }
.hb-score small { font-size: .85rem; font-weight: 500; color: #64748B; }
.hb-weight-total { font-weight: 600; }
.hb-weight-total.is-off { color: #B91C1C; }
.hb-weight-total.is-ok { color: #047857; }
.hb-objective-input td { vertical-align: top; }
.hb-rating-select { min-width: 190px; }

/* KGIRS emblem in place of the lettered brand mark; footer line on every page. */
.hb-brand-logo { height: 38px; width: auto; flex: 0 0 auto; display: block; }
body.hb-sidebar-collapsed .hb-brand-logo { height: 32px; }
.hb-auth-aside .hb-brand-logo { height: 56px; }
.hb-app-footer { padding: 14px 28px 20px; font-size: 0.75rem; color: #6B7A90; text-align: center; border-top: 1px solid rgba(15, 23, 42, 0.06); }
.hb-auth-main { flex-direction: column; }
.hb-auth-main .hb-app-footer { border-top: 0; padding: 28px 0 0; }
@media print { .hb-app-footer { display: none; } }
