/* ==========================================================================
   CONSISTENCY - one font, one type scale and one button system on every page,
   including older pages that carry their own <style> or inline styles.
   Loaded last (after hr-future.css). Uses !important on purpose: it must win
   over page-level CSS. Only shape / type / colour - never what a page shows.

   Opt out for a special control: add class "hr-free" to it (or a parent).
   ========================================================================== */

/* ── 1. One font family ───────────────────────────────────────────────── */
.hr-app, .hr-app :where(body, div, span, p, a, li, td, th, label, input, select, textarea, button, h1, h2, h3, h4, h5, h6, small, strong, b, em, dt, dd, legend, option, caption, summary) {
  font-family: var(--hr-font) !important;
}
.hr-app :is(code, pre, kbd, samp, .hr-mono, .mono, [class*="mono"]) { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace !important; }
.hr-app :is(i, .fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands, [class^="fa-"], [class*=" fa-"]) { font-family: "Font Awesome 6 Free" !important; }
.hr-app :is(.fa-brands, .fab) { font-family: "Font Awesome 6 Brands" !important; }
.hr-app { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss01"; }

/* ── 2. Type scale (content area) ─────────────────────────────────────── */
.hr-content { font-size: 14px; line-height: 1.5; color: var(--hr-text); }
.hr-content :is(h1):not(.hr-page-title):not(.hr-free *) { font-size: 22px !important; font-weight: 800 !important; letter-spacing: -.02em; line-height: 1.25 !important; }
.hr-content :is(h2):not(.hr-free *) { font-size: 18px !important; font-weight: 700 !important; letter-spacing: -.01em; line-height: 1.3 !important; }
.hr-content :is(h3, .hr-card__title):not(.hr-free *) { font-size: 15.5px !important; font-weight: 700 !important; line-height: 1.35 !important; }
.hr-content :is(h4, h5, h6):not(.hr-free *) { font-size: 14px !important; font-weight: 700 !important; line-height: 1.4 !important; }
.hr-content :is(p, li, dd):not(.hr-free *) { line-height: 1.55; }

/* tables: same density everywhere */
.hr-content table:not(.hr-free):not([class*="hrb"]) th { font-size: 10.5px !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: .06em !important; color: #4b5378 !important; white-space: nowrap; }
.hr-content table:not(.hr-free):not([class*="hrb"]) td { font-size: 12.5px !important; line-height: 1.4 !important; }
.hr-content table:not(.hr-free):not([class*="hrb"]) th, .hr-content table:not(.hr-free):not([class*="hrb"]) td { padding: 8px 10px !important; vertical-align: middle; }
.hr-content table:not(.hr-free):not([class*="hrb"]) :is(td, th) small { font-size: 12px !important; }

/* forms */
.hr-content :is(label, .form-label, .hr-label):not(.hr-free *):not(.hr-check):not(.form-check-label) { font-size: 12.5px !important; font-weight: 600 !important; color: var(--hr-text-2); }
.hr-content :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]), select, textarea):not(.hr-free):not(.hr-free *) {
  font-size: 13.5px !important; border-radius: var(--hr-radius-sm) !important;
}
.hr-content :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([type=submit]):not([type=button]):not([type=reset]), select:not([multiple])):not(.hr-free):not(.hr-free *) {
  min-height: var(--hr-control-h) !important;
}

/* ── 3. One button system ─────────────────────────────────────────────── */
/* Everything that acts as a button in the content area… */
.hr-content :is(button, .btn, input[type=submit], input[type=button], input[type=reset], a.button, a.btn, [class$="-btn"], [class*="-btn "], [class^="btn-"]:not(.btn-close), [class*=" btn-"]:not(.btn-close)):where(:not(.hr-free):not(.hr-free *):not([class*="__"]):not([class*="hrb"] *):not([class*="hr-hero"] *):not(.hr-palette *):not(.hr-icon-btn):not([class*="tab-btn"]):not([class*="tab-button"]):not(.btn-close):not(.close):not([class^="hrb-"]):not([class*=" hrb-"]):not([class^="ac-"]):not([class*=" ac-"]):not(.page-link):not(.dropdown-item):not(.accordion-button):not([role=tab]):not(.nav-link):not(.list-group-item)) {
  display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 7px !important;
  height: var(--hr-control-h) !important; min-height: var(--hr-control-h) !important; padding: 0 16px !important;
  border-radius: var(--hr-radius-sm) !important; border-width: 1px !important; border-style: solid !important;
  font-family: var(--hr-font) !important; font-size: 13.5px !important; font-weight: 600 !important; line-height: 1 !important;
  letter-spacing: .005em !important; text-transform: none !important; white-space: nowrap; text-decoration: none !important;
  cursor: pointer; vertical-align: middle; box-sizing: border-box;
}
/* small buttons: anything marked small, or inside table rows */
.hr-content :is(.btn-sm, .hr-btn--sm, .btn-xs, [class*="btn-small"], [class*="small-btn"], table button, table .btn, table a[class*="btn"], table input[type=submit]):where(:not(.hr-free):not(.hr-free *):not([class*="__"]):not([class*="hrb"] *):not([class*="hr-hero"] *):not(.hr-palette *):not(.hr-icon-btn):not([class*="tab-btn"]):not([class^="hrb-"]):not([class*=" hrb-"]):not(.btn-close)) {
  height: var(--hr-control-h-sm) !important; min-height: var(--hr-control-h-sm) !important; padding: 0 11px !important; font-size: 12.5px !important; gap: 5px !important;
}
.hr-content .btn-lg:not(.hr-free) { height: 44px !important; padding: 0 22px !important; font-size: 14.5px !important; }
/* icon-only buttons are square */
.hr-content :is(.btn-icon, .icon-btn, [class*="btn-icon"], .hr-btn--icon):not(.hr-free) { width: var(--hr-control-h) !important; padding: 0 !important; }
.hr-content table :is(.btn-icon, .icon-btn, [class*="btn-icon"]):not(.hr-free) { width: var(--hr-control-h-sm) !important; }
.hr-content :is(button, .btn, a[class*="btn"]) i { font-size: .95em; }

/* neutral (default) look for unclassed / secondary / outline / cancel / back / reset buttons */
.hr-content :is(button:not([class]), .btn-secondary, .btn-light, .btn-default, .btn-outline, [class*="btn-outline"], .btn-back, .btn-reset, .btn-cancel, input[type=reset], input[type=button]):where(:not(.hr-free):not(.hr-free *):not([class*="__"]):not([class*="hrb"] *):not([class*="hr-hero"] *):not(.hr-palette *):not([class*="tab-btn"]):not([role=tab])) {
  background: linear-gradient(180deg, #fff, #f6f7fd) !important; color: var(--hr-text) !important; border-color: var(--hr-border-strong) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 1px 2px rgba(13, 19, 48, .06) !important;
}
.hr-content :is(button:not([class]), .btn-secondary, .btn-light, .btn-default, .btn-outline, [class*="btn-outline"], .btn-back, .btn-reset, .btn-cancel, input[type=reset], input[type=button]):hover:where(:not(.hr-free)) { color: var(--hr-primary) !important; border-color: #a5b4fc !important; }

/* primary: main actions (save / submit / add / create / apply / search) */
.hr-content :is(.btn-primary, .hr-btn--primary, input[type=submit]:not([class*="danger"]):not([class*="secondary"]), .add-btn, [class*="add-btn"], .btn-save, .btn-submit,
               .btn-apply, .btn-search, .btn-create, [class*="-btn-primary"], [class*="primary-btn"], .btn-action, .btn-task):where(:not(.hr-free):not(.hr-free *)) {
  background: var(--hr-gradient) !important; background-size: 160% 100% !important; color: #fff !important; border-color: transparent !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 22px rgba(79, 70, 229, .32) !important;
}
.hr-content :is(.btn-outline-primary):not(.hr-free) { color: var(--hr-primary) !important; border-color: #a5b4fc !important; background: #fff !important; box-shadow: none !important; }

/* success: approve / verify / confirm */
.hr-content :is(.btn-success, .hr-btn--success, .btn-approve, .btn-verify, [class*="-btn-success"], [class*="approve-btn"]):not(.hr-free) {
  background: linear-gradient(135deg, #059669, #10b981 60%, #22d3ee) !important; color: #fff !important; border-color: transparent !important;
  box-shadow: 0 8px 20px rgba(5, 150, 105, .28) !important;
}
.hr-content .btn-outline-success:not(.hr-free) { color: #047857 !important; border-color: #6ee7b7 !important; background: #fff !important; box-shadow: none !important; }

/* danger: delete / remove / reject */
.hr-content :is(.btn-danger, .hr-btn--danger, .btn-delete, .btn-reject, [class*="-btn-danger"], [class*="delete-btn"], [class*="btn-icon-del"], [class*="reject-btn"]):not(.hr-free) {
  background: linear-gradient(135deg, #e11d48, #f43f5e 60%, #fb923c) !important; color: #fff !important; border-color: transparent !important;
  box-shadow: 0 8px 20px rgba(225, 29, 72, .25) !important;
}
.hr-content .btn-outline-danger:not(.hr-free) { color: #be123c !important; border-color: #fda4af !important; background: #fff !important; box-shadow: none !important; }

/* warning / info / edit */
.hr-content :is(.btn-warning, [class*="btn-icon-edit"], .btn-edit):not(.hr-free) { background: linear-gradient(135deg, #f59e0b, #f97316) !important; color: #fff !important; border-color: transparent !important; box-shadow: 0 8px 18px rgba(245, 158, 11, .25) !important; }
.hr-content :is(.btn-info, .btn-view, .view-details-btn):not(.hr-free) { background: linear-gradient(135deg, #0284c7, #06b6d4) !important; color: #fff !important; border-color: transparent !important; box-shadow: 0 8px 18px rgba(2, 132, 199, .25) !important; }
.hr-content .btn-outline-info:not(.hr-free) { color: #0369a1 !important; border-color: #7dd3fc !important; background: #fff !important; box-shadow: none !important; }

/* shared behaviour */
.hr-content :is(button, .btn, a[class*="btn"], input[type=submit], input[type=button]):not(.hr-free):not([class*="tab-btn"]):not([class^="hrb-"]):not([class*=" hrb-"]):not([class*="__"]):not([class*="hrb"] *):not([class*="hr-hero"] *):not(.hr-palette *) {
  transition: transform .18s var(--hr-ease, ease), box-shadow .18s, filter .18s, background-position .4s !important;
}
.hr-content :is(button, .btn, a[class*="btn"], input[type=submit], input[type=button]):not(.hr-free):not(:disabled):not([class*="tab-btn"]):not([class^="hrb-"]):not([class*=" hrb-"]):not([class*="__"]):not([class*="hrb"] *):not([class*="hr-hero"] *):not(.hr-palette *):hover { transform: translateY(-1px); filter: saturate(1.08); background-position: 100% 0 !important; }
.hr-content :is(button, .btn, a[class*="btn"], input[type=submit], input[type=button]):not(.hr-free):active { transform: translateY(0) scale(.98); }
.hr-content :is(button, .btn, input[type=submit], input[type=button]):disabled { opacity: .55 !important; cursor: not-allowed !important; transform: none !important; box-shadow: none !important; }

/* ── 4. Tabs: one underline style ─────────────────────────────────────── */
.hr-content :is([class*="tab-btn"], [class*="tab-button"]):not(.hr-free) {
  height: auto !important; min-height: 0 !important; padding: 10px 16px !important; border: 0 !important; border-bottom: 2px solid transparent !important;
  border-radius: 10px 10px 0 0 !important; background: transparent !important; box-shadow: none !important;
  font-size: 13.5px !important; font-weight: 600 !important; color: var(--hr-text-2) !important; text-transform: none !important; letter-spacing: 0 !important;
  transition: color .15s, background .15s, border-color .15s !important;
}
.hr-content :is([class*="tab-btn"], [class*="tab-button"]):not(.hr-free):hover { color: var(--hr-primary) !important; background: var(--hr-gradient-soft) !important; }
.hr-content :is([class*="tab-btn"], [class*="tab-button"]):is(.active, .is-active, .is-on, [aria-selected="true"]):not(.hr-free) {
  color: var(--hr-primary) !important; border-bottom-color: var(--hr-primary) !important; background: linear-gradient(180deg, transparent, rgba(99, 102, 241, .08)) !important;
}

/* ── 5. Badges & pills: one size ──────────────────────────────────────── */
.hr-content :is(.badge, .hr-badge, .status-badge, [class*="badge-"]):not(.hr-free) {
  font-size: 11.5px !important; font-weight: 600 !important; letter-spacing: .01em !important; text-transform: none !important;
  border-radius: 999px !important; padding: 3px 9px !important; line-height: 1.3 !important;
}

@media (max-width: 640px) {
  .hr-content :is(button, .btn, a[class*="btn"], input[type=submit]):not(.hr-free):not([class*="tab-btn"]):not([class^="hrb-"]) { padding: 0 13px !important; }
}

/* ── 6. Neutralise the old global stylesheet (static/styles.css, still linked by ~140 pages) ──
   Its body / main / h1 / .card / .table rules were written for the retired shell and fight the
   layout: Poppins + letter-spacing + text shadow on everything, centred uppercase h1, gold .card
   at 80% width with centred text, ".card span { font-size: 2em }" (giant button labels),
   cyan table headers and peach table wrappers. Page-specific classes are left alone. */
body.hr-app:not(.hr-login) { letter-spacing: normal !important; text-shadow: none !important; display: block !important; height: auto !important;
  max-height: none !important; min-height: 100vh; color: var(--hr-text); }
main.hr-content { display: block !important; height: auto !important; align-items: initial !important; justify-content: initial !important; }
.hr-content #content { width: auto !important; min-height: 0 !important; font-size: 14px; }
.hr-content .wrapper { height: auto !important; }
.hr-content :is(h1, #content h1):not(.hr-page-title):not(.hr-free *) {
  text-transform: none !important; text-align: inherit !important; text-shadow: none !important; letter-spacing: -.02em !important;
  background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--hr-text) !important; position: static !important; margin: 0 0 12px !important;
}
.hr-content .card:not(.hr-free) {
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .86)) !important; color: var(--hr-text) !important;
  text-align: start !important; font-size: inherit !important; width: auto !important; margin-left: 0 !important;
  border: 1px solid rgba(207, 214, 234, .75) !important; border-radius: var(--hr-radius) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, var(--hr-shadow) !important;
}
.hr-content .card span { font-size: inherit; font-weight: inherit; }   /* undo styles.css ".card span { font-size: 2em }" */
.hr-content .card h3:not(.hr-free *) { margin: 0 0 6px; }
.hr-content .table-wrapper:not(.hr-free) { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
.hr-content .table:not(.hr-free) { border: 1px solid var(--hr-border) !important; border-radius: 12px; border-collapse: separate !important; border-spacing: 0; overflow: hidden; }
.hr-content .table:not(.hr-free) thead th { background: linear-gradient(180deg, #f8f9ff, #f1f3fd) !important; border-radius: 0 !important; border-bottom: 1px solid var(--hr-border) !important; }
.hr-content .table:not(.hr-free) tbody td { color: var(--hr-text) !important; background: transparent !important; }
.hr-content textarea.small-textarea { text-transform: none !important; }
.hr-content table:not(.hr-free):not([class*="hrb"]) td { text-align: start; }
.hr-content table:not(.hr-free):not([class*="hrb"]) td.hr-num, .hr-content table:not(.hr-free) td[style*="text-align:center"], .hr-content table:not(.hr-free) td[style*="text-align: center"] { text-align: center; }

/* ── 7. Shared pieces of the bilingual (English / Arabic) pages ───────── */
.hr-lang-bar .language-toggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: #fff; border: 1px solid var(--hr-border); box-shadow: var(--hr-shadow); }
.hr-lang-bar .language-toggle a { padding: 4px 12px; border-radius: 999px; font: 600 12px var(--hr-font); color: var(--hr-text-2) !important; text-decoration: none !important; background: transparent !important; }
.hr-lang-bar .language-toggle a:hover { color: var(--hr-primary) !important; background: var(--hr-primary-soft) !important; }
.hr-lang-bar .language-toggle a.active { color: #fff !important; background: var(--hr-gradient) !important; box-shadow: 0 4px 12px rgba(79, 70, 229, .3); }
.hr-lang-bar .language-toggle span, .hr-lang-bar .language-toggle .separator { display: none; }
/* the old "TALENT ACQUISITION SYSTEM" style header -> a small section label */
.hr-content > header:has(.header-title), .hr-content header:has(> .header-title) {
  all: unset; display: flex !important; align-items: center; gap: 8px; margin: 0 0 10px !important; height: auto !important;
}
.hr-content header .header-title { all: unset; display: block; }
.hr-content header .header-title h1 {
  all: unset; display: inline-flex !important; align-items: center; gap: 8px; font: 700 11.5px var(--hr-font) !important; letter-spacing: .16em !important;
  text-transform: uppercase !important; color: var(--hr-primary) !important; -webkit-text-fill-color: currentColor !important;
}
.hr-content header .header-title h1::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--hr-gradient); }
.hr-content header:has(.header-title)::before, .hr-content header:has(.header-title):hover::before { display: none !important; }
/* page heroes inside old templates ("dashboard-header") */
.hr-content .dashboard-header:not(.hr-free) { background: linear-gradient(135deg, rgba(79, 70, 229, .07), rgba(6, 182, 212, .06)) !important; border: 1px solid rgba(165, 180, 252, .45) !important;
  border-radius: var(--hr-radius) !important; box-shadow: none !important; }
.hr-content .dashboard-header h1 i { color: var(--hr-primary); margin-right: 4px; }
.hr-content .dashboard-header p { color: var(--hr-text-2) !important; margin: 4px 0 0 !important; }

.hr-fx-filterhead span, .hr-fx-tbar span { font-size: inherit; }
.hr-fx-filterlabel { font-size: 13px !important; }

/* ── 8. One header per page ───────────────────────────────────────────
   Pages that carry their own title card (old "dashboard-header" / "TALENT ACQUISITION SYSTEM" header)
   do not also get the menu guide banner, and the old section header is dropped. */
.hr-content:has(.dashboard-header) .hr-guide, .hr-content:has(header .header-title) .hr-guide, .hr-content:has([data-page-hero]) .hr-guide { display: none !important; }
.hr-content header:has(> .header-title) { display: none !important; }

/* ── 9. Scrolling: keep the page scrollbar and a sidebar that stays in place ──
   styles.css gives <body> overflow-x:hidden, which (with the layout) turned body into its own scroll box,
   so the sticky sidebar scrolled away and left white space. clip cuts sideways overflow without that. */
body.hr-app { overflow-x: clip !important; overflow-y: visible !important; }
html:has(> body.hr-app) { overflow-y: auto; }
.hr-app .hr-sidebar { position: sticky !important; top: 0 !important; height: 100vh !important; align-self: flex-start; }
.hr-app .hr-sidebar__nav { overflow-y: auto !important; }
/* sidebar scrollbar clearly visible on the dark menu (it was 20% white, almost invisible) - 2026-10-20 */
.hr-app .hr-sidebar__nav { scrollbar-width: thin !important; scrollbar-color: rgba(165, 180, 252, .75) rgba(255, 255, 255, .07) !important; scrollbar-gutter: stable; }
.hr-app .hr-sidebar__nav:hover { scrollbar-color: #a5b4fc rgba(255, 255, 255, .1) !important; }
.hr-app .hr-sidebar__nav::-webkit-scrollbar { width: 9px; }
.hr-app .hr-sidebar__nav::-webkit-scrollbar-track { background: rgba(255, 255, 255, .07); border-radius: 8px; }
.hr-app .hr-sidebar__nav::-webkit-scrollbar-thumb { background: rgba(165, 180, 252, .75); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.hr-app .hr-sidebar__nav::-webkit-scrollbar-thumb:hover { background: #a5b4fc; background-clip: padding-box; }

/* language switch now sits in the top bar */
.hr-topbar .hr-lang-bar { margin: 0 4px 0 0 !important; padding: 0 !important; position: static !important; display: flex; align-items: center; }

/* ── Talent Acquisition pages (body.hr-ta, set in _layout.html for /recruitment/) ── */
/* smaller table text, and buttons keep their natural size (old styles.css gives .btn flex:1, which stretches them) */
.hr-ta .hr-content table:not(.hr-free):not([class*="hrb"]) td { font-size: 12px !important; }
.hr-ta .hr-content table:not(.hr-free):not([class*="hrb"]) th { font-size: 10px !important; }
.hr-ta .hr-content table:not(.hr-free):not([class*="hrb"]) :is(td, th) small { font-size: 11px !important; }
.hr-ta .hr-content .btn { flex: 0 0 auto; }
