:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bs-body-font-family: var(--font-sans);
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;

  --hr-bg: #f1f5f9;          /* page background */
  --hr-surface: #ffffff;
  --hr-border: #e6eaf1;
  --hr-text: #1e293b;
  --hr-muted: #64748b;
  --hr-accent: #2563eb;
  --hr-accent-2: #4f46e5;
  --hr-ring: rgba(37, 99, 235, 0.15);
  --hr-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px -12px rgba(16,24,40,.18);
  --hr-radius: 16px;
}

html { font-size: 14px; position: relative; min-height: 100%; }
@media (min-width: 768px) { html { font-size: 15.5px; } }

body {
  font-family: var(--font-sans);
  background: var(--hr-bg);
  color: var(--hr-text);
  min-height: 100vh;
}

h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6 {
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.icon { width: 1em; height: 1em; vertical-align: -0.125em; }
.icon-display-4 { width: 3.25rem; height: 3.25rem; }

/* ---------- Navbar ---------- */
.hr-navbar {
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(10px);
  position: sticky; top: 0; z-index: 1030;
}
.hr-brand-badge {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--hr-accent), var(--hr-accent-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; box-shadow: 0 6px 14px -6px rgba(37,99,235,.7);
}
.hr-nav-link {
  color: #475569; font-weight: 600; border-radius: 10px;
  padding: .45rem .85rem !important; display: flex; align-items: center; gap: .45rem;
  transition: background .15s, color .15s;
}
.hr-nav-link:hover { background: #eef2ff; color: var(--hr-accent); }
.hr-nav-link.active { background: #eef2ff; color: var(--hr-accent); }

/* ---------- Page header ---------- */
.page-head { margin: .5rem 0 1.5rem; }
.page-head h1 { margin: 0; font-size: 1.6rem; }
.page-head p { margin: .25rem 0 0; color: var(--hr-muted); }

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--hr-border);
  border-radius: var(--hr-radius);
  box-shadow: var(--hr-shadow);
  background: var(--hr-surface);
}
.card.shadow-lg { box-shadow: 0 2px 4px rgba(16,24,40,.05), 0 24px 48px -24px rgba(16,24,40,.28) !important; }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: 10px; padding: .55rem 1.05rem; transition: all .15s; }
.btn-lg { border-radius: 12px; }
.btn-primary { background: var(--hr-accent); border-color: var(--hr-accent); }
.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; transform: translateY(-1px); }
.btn-outline-secondary { border-color: var(--hr-border); color: #475569; }
.btn-outline-secondary:hover { background: #f1f5f9; color: #0f172a; border-color: #cbd5e1; }

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-radius: 10px; padding: .625rem .875rem;
  border-color: var(--hr-border); color: var(--hr-text); background-color: #fff;
}
.form-control:focus, .form-select:focus {
  border-color: var(--hr-accent); box-shadow: 0 0 0 4px var(--hr-ring);
}
.form-label { font-weight: 600; color: #334155; margin-bottom: .45rem; }
.form-text { color: var(--hr-muted); }

/* ---------- Searchable employee combobox ---------- */
.emp-combo { position: relative; }
.emp-dropdown {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 1050;
  background: #fff; border: 1px solid var(--hr-border); border-radius: 12px;
  max-height: 320px; overflow-y: auto; padding: .35rem;
  box-shadow: 0 12px 32px -12px rgba(16,24,40,.35); display: none;
}
.emp-dropdown.show { display: block; }
.emp-option {
  display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left;
  background: transparent; border: 0; border-radius: 9px; padding: .5rem .65rem; cursor: pointer;
}
.emp-option:hover, .emp-option.active { background: #eff6ff; }
.emp-option .eo-name { font-weight: 600; color: #0f172a; }
.emp-option .eo-sub { font-size: .78rem; color: var(--hr-muted); }
.emp-empty { padding: .75rem .65rem; color: var(--hr-muted); font-size: .85rem; }
.emp-search-wrap { position: relative; }
.emp-search-wrap .emp-search-icon {
  position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none;
}
.emp-search-wrap input { padding-left: 2.3rem; }
.emp-clear {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  border: 0; background: #f1f5f9; color: #64748b; width: 24px; height: 24px; border-radius: 50%;
  display: none; align-items: center; justify-content: center; cursor: pointer; line-height: 1;
}
.emp-clear.show { display: flex; }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; }
.table th {
  font-weight: 700; text-transform: uppercase; font-size: .72rem; letter-spacing: .05em;
  color: var(--hr-muted); background: #f8fafc; border-bottom: 1px solid var(--hr-border);
  padding: .7rem .75rem;
}
.table td { vertical-align: middle; color: #334155; padding: .7rem .75rem; }
.table-hover tbody tr:hover { background: #f8fafc; }

/* ---------- Badges ---------- */
.badge { font-weight: 600; padding: .38em .6em; border-radius: 7px; }

/* ---------- Doc cards ---------- */
.doc-card { transition: transform .12s ease, box-shadow .12s ease, border-color .12s; cursor: pointer; }
.doc-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -16px rgba(16,24,40,.3) !important; border-color: #c7d2fe; }
.doc-ico { width: 44px; height: 44px; border-radius: 12px; background: #eef2ff; color: var(--hr-accent); display:flex; align-items:center; justify-content:center; flex-shrink:0; }

/* ---------- Misc ---------- */
.text-muted { color: var(--hr-muted) !important; }
.shadow-sm { box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 12px -8px rgba(16,24,40,.2) !important; }

.file-upload-wrapper {
  position: relative; border: 2px dashed #cbd5e1; border-radius: 14px; padding: 2rem;
  text-align: center; transition: all .2s; background: #f8fafc; cursor: pointer;
}
.file-upload-wrapper:hover { border-color: var(--hr-accent); background: #eff6ff; }
.file-upload-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* ---------- Sticky footer layout (no overlap with content) ---------- */
.hr-body { display: flex; flex-direction: column; min-height: 100vh; }
.hr-main { flex: 1 0 auto; }
.hr-footer { flex-shrink: 0; margin-top: 2.5rem; padding: 1.1rem 0; color: var(--hr-muted); border-top: 1px solid var(--hr-border); }

/* buttons should never show a text underline/strike */
.btn, .btn:hover, .btn:focus { text-decoration: none !important; }

/* ---------- Home dashboard ---------- */
.hr-hero { padding: 2.5rem 1rem 1.5rem; }
.hr-choice { transition: transform .14s ease, box-shadow .14s ease, border-color .14s; }
.hr-choice:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgba(16,24,40,.32) !important; border-color: #c7d2fe; }
.hr-choice-ico { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
