/* PeopleOS HRMS — theme layer over Tabler (Bootstrap 5.3). Light + dark via [data-bs-theme]. */
:root {
  --hr-brand: #2563eb;
  --hr-brand-2: #1e40af;
  --hr-sidebar-bg: #0f172a;
  --hr-sidebar-fg: #cbd5e1;
  --hr-sidebar-active: rgba(37, 99, 235, .18);
  --hr-surface: #ffffff;
  --hr-muted-bg: #f6f8fb;
  --tblr-primary: #2563eb;
  --tblr-primary-rgb: 37, 99, 235;
  --tblr-font-sans-serif: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --tblr-font-monospace: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --hr-font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --tblr-border-radius: 8px;
}
:root[data-bs-theme="dark"] {
  --hr-sidebar-bg: #0b1220;
  --hr-surface: #151f2e;
  --hr-muted-bg: #0f1724;
}
body { background: var(--hr-muted-bg); font-feature-settings: "cv11", "ss01"; }

/* sidebar */
.hr-sidebar { background: var(--hr-sidebar-bg) !important; border-right: 1px solid rgba(255,255,255,.04); }
.hr-sidebar .navbar-brand { padding: 1rem 0 .75rem; }
.hr-brand { display: flex; align-items: center; gap: .55rem; font-size: 1.1rem; color: #fff !important; letter-spacing: -.01em; }
.hr-brand strong { color: #60a5fa; }
.hr-logo { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 9px; background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff; font-size: 1.15rem; }
.hr-sidebar .nav-link { color: var(--hr-sidebar-fg); border-radius: 7px; margin: 1px .5rem; padding: .5rem .75rem; }
.hr-sidebar .nav-item.active > .nav-link, .hr-sidebar .nav-link:hover { background: var(--hr-sidebar-active); color: #fff; }
.hr-sidebar .dropdown-menu { background: transparent !important; border: 0; box-shadow: none; padding: 0 0 .25rem 1.6rem; }
.hr-sidebar .dropdown-item { color: #94a3b8; font-size: .8125rem; border-radius: 6px; padding: .35rem .75rem; margin-right: .5rem; }
.hr-sidebar .dropdown-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.hr-sidebar .dropdown-item.active { color: #fff; background: rgba(37,99,235,.35); }
.hr-nav-section { color: #64748b; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; padding: 1rem 1.25rem .35rem; font-weight: 600; }
@media (min-width: 992px) {
  .navbar-vertical.navbar-expand-lg { width: 16.5rem; }
  .navbar-vertical.navbar-expand-lg ~ .page-wrapper, .navbar-vertical.navbar-expand-lg ~ .navbar { margin-left: 16.5rem; }
  .hr-sidebar .navbar-collapse { overflow-y: auto; max-height: calc(100vh - 64px); scrollbar-width: thin; }
}

/* top bar */
.hr-topbar { background: var(--hr-surface); border-bottom: 1px solid var(--tblr-border-color); min-height: 56px; position: sticky; top: 0; z-index: 1020; }
.hr-global-search { max-width: 420px; }
.hr-notif-menu { width: 360px; max-width: 92vw; }
.hr-notif-menu .list-group { max-height: 420px; overflow-y: auto; }
.badge-notification { position: absolute; top: 2px; right: 0; font-size: .6rem; min-width: 1.1rem; }

/* page */
.page-header { margin-bottom: .25rem; }
.page-title { font-weight: 650; letter-spacing: -.01em; }
.card { border-radius: 10px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.card-header { min-height: 3.25rem; }
.hr-form-section { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--tblr-secondary); font-weight: 600; border-bottom: 1px solid var(--tblr-border-color); padding-bottom: .35rem; margin-top: .5rem; }
.hr-search { min-width: 240px; flex: 0 1 320px; }

/* tables */
.datatable th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.datatable th.sortable::after { content: "\eb3b"; font-family: "tabler-icons"; opacity: .25; margin-left: .25rem; font-size: .8rem; }
.datatable th.sortable.asc::after { content: "\ea62"; opacity: .8; }
.datatable th.sortable.desc::after { content: "\ea5f"; opacity: .8; }
[data-table].is-loading tbody { opacity: .5; transition: opacity .15s; }
.table td { vertical-align: middle; }

/* KPI tiles */
.kpi { position: relative; overflow: hidden; }
.kpi .kpi-label { font-size: .75rem; color: var(--tblr-secondary); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kpi .kpi-value { font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin-top: .25rem; }
.kpi .kpi-sub { font-size: .78rem; color: var(--tblr-secondary); margin-top: .15rem; }
.kpi .kpi-icon { position: absolute; right: 1rem; top: 1rem; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 1.25rem; }
.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 200px; }

/* org chart */
.orgchart { overflow-x: auto; padding: 1rem 0 2rem; }
.orgchart ul { padding-top: 20px; position: relative; display: flex; justify-content: center; padding-left: 0; margin: 0; }
.orgchart li { list-style: none; text-align: center; position: relative; padding: 20px 6px 0; }
.orgchart li::before, .orgchart li::after { content: ''; position: absolute; top: 0; right: 50%; border-top: 1px solid var(--tblr-border-color); width: 50%; height: 20px; }
.orgchart li::after { right: auto; left: 50%; border-left: 1px solid var(--tblr-border-color); }
.orgchart li:only-child::after, .orgchart li:only-child::before { display: none; }
.orgchart li:only-child { padding-top: 0; }
.orgchart li:first-child::before, .orgchart li:last-child::after { border: 0 none; }
.orgchart li:last-child::before { border-right: 1px solid var(--tblr-border-color); border-radius: 0 6px 0 0; }
.orgchart li:first-child::after { border-radius: 6px 0 0 0; }
.orgchart ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 1px solid var(--tblr-border-color); height: 20px; }
.org-node { display: inline-block; min-width: 150px; padding: .6rem .75rem; border: 1px solid var(--tblr-border-color); border-radius: 10px; background: var(--hr-surface); }
.org-node .name { font-weight: 600; font-size: .82rem; }
.org-node .role { font-size: .72rem; color: var(--tblr-secondary); }

/* timeline + misc */
.hr-timeline { list-style: none; padding-left: 0; position: relative; }
.hr-timeline li { position: relative; padding: 0 0 1rem 1.6rem; }
.hr-timeline li::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: -6px; border-left: 2px solid var(--tblr-border-color); }
.hr-timeline li:last-child::before { display: none; }
.hr-timeline li .dot { position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--hr-brand); border: 3px solid var(--hr-surface); box-shadow: 0 0 0 1px var(--hr-brand); }
.pipeline { display: flex; gap: .75rem; overflow-x: auto; padding-bottom: .5rem; }
.pipeline-col { min-width: 250px; flex: 1 0 250px; background: var(--hr-muted-bg); border: 1px solid var(--tblr-border-color); border-radius: 10px; padding: .6rem; }
.pipeline-col h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--tblr-secondary); display: flex; justify-content: space-between; }
.pipeline-card { background: var(--hr-surface); border: 1px solid var(--tblr-border-color); border-radius: 8px; padding: .55rem .65rem; margin-bottom: .5rem; cursor: grab; }
.pipeline-card.dragging { opacity: .5; }
.pipeline-col.drop-hover { outline: 2px dashed var(--hr-brand); }
.masked { font-family: var(--tblr-font-monospace); letter-spacing: .02em; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1200px 600px at 10% -10%, rgba(37,99,235,.18), transparent), radial-gradient(900px 500px at 110% 110%, rgba(99,102,241,.16), transparent), var(--hr-muted-bg); padding: 16px; }
.auth-card { width: 100%; max-width: 420px; }
.att-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.att-cal .d { border: 1px solid var(--tblr-border-color); border-radius: 6px; min-height: 64px; padding: 4px 6px; font-size: .75rem; background: var(--hr-surface); }
.att-cal .d .n { font-weight: 600; }
.att-cal .hd { text-align: center; font-size: .7rem; text-transform: uppercase; color: var(--tblr-secondary); }
@media (max-width: 575.98px) {
  .page-header .btn { padding: .35rem .6rem; }
  .hr-search { flex: 1 1 100%; min-width: 0; }
  .kpi .kpi-value { font-size: 1.35rem; }
}
@media print { .hr-sidebar, .hr-topbar, .footer { display: none !important; } .page-wrapper { margin: 0 !important; } }

/* ================= Typography — one family (Geist) for the whole system =================
   Scale (rem @16px): display 1.75 · page title 1.5 · section/card title 1.0625 · sub-header .9375 · body .875 · meta .8125 · micro .75
   Hierarchy comes from weight + size + tracking, not from case: no all-caps labels. */
body, .btn, .form-control, .form-select, .dropdown-menu, .modal, .toast, .tooltip, .popover, input, select, textarea, button {
  font-family: var(--hr-font);
}
body { font-size: .875rem; line-height: 1.55; font-weight: 400; font-feature-settings: "ss01", "cv11"; letter-spacing: -.003em; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--hr-font); font-weight: 600; letter-spacing: -.018em; line-height: 1.25; }
h1, .h1 { font-size: 1.75rem; } h2, .h2 { font-size: 1.375rem; } h3, .h3 { font-size: 1.0625rem; } h4, .h4 { font-size: .9375rem; }
.page-title { font-size: 1.5rem; font-weight: 650; letter-spacing: -.022em; line-height: 1.2; }
.page-pretitle { text-transform: none; letter-spacing: 0; font-size: .8125rem; font-weight: 500; color: var(--tblr-secondary); margin-bottom: .2rem; }
.page-header .text-secondary { font-size: .9rem; max-width: 72ch; }
.card-title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.012em; }
.card-subtitle, .text-secondary, .form-hint { font-weight: 400; }
.modal-title { font-size: 1.125rem; font-weight: 600; letter-spacing: -.015em; }
.form-label { font-weight: 550; font-size: .8125rem; margin-bottom: .35rem; }
.hr-form-section { text-transform: none; letter-spacing: -.005em; font-size: .9375rem; font-weight: 600; color: var(--tblr-body-color); }
.hr-nav-section { text-transform: none; letter-spacing: 0; font-size: .75rem; font-weight: 600; color: #7d8bb0; }
.table thead th, .card-table thead th, .datagrid-title { text-transform: none; letter-spacing: 0; font-size: .78rem; font-weight: 600; color: var(--tblr-secondary); }
.kpi .kpi-label { text-transform: none; letter-spacing: 0; font-size: .8125rem; font-weight: 500; }
.kpi .kpi-value { font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pipeline-col h4, .att-cal .hd { text-transform: none; letter-spacing: 0; font-weight: 600; }
.btn { font-weight: 550; letter-spacing: -.005em; }
.badge { font-weight: 550; letter-spacing: 0; text-transform: none; }
.nav-link, .dropdown-item { font-weight: 450; }
.hr-sidebar .nav-link-title { font-weight: 500; letter-spacing: -.005em; }
.hr-brand { font-weight: 500; letter-spacing: -.02em; } .hr-brand strong { font-weight: 700; }
code, kbd, pre, samp, .font-monospace { font-family: var(--tblr-font-monospace); }
.table td, .datagrid-content { font-variant-numeric: tabular-nums; }
