/* ═══════════════════════════════════════
   AXALAR HR MODULE - Obsidian Gold Theme
   ═══════════════════════════════════════ */

:root {
  --bg-base:    #04080f;
  --bg-surface: #080f1d;
  --bg-card:    #0c1628;
  --bg-elevated:#111f38;
  --bg-hover:   #16294a;

  --gold:       #c9a84c;
  --gold-2:     #e0c870;
  --gold-bg:    rgba(47,160,132,.10);
  --gold-border:rgba(47,160,132,.22);

  --blue:       #3a6ad4;
  --blue-2:     #5080f0;
  --blue-bg:    rgba(58,106,212,.12);

  --green:      #0ea96a;
  --green-bg:   rgba(14,169,106,.12);
  --green-line: rgba(14,169,106,.3);

  --red:        #e04444;
  --red-bg:     rgba(224,68,68,.12);
  --red-line:   rgba(224,68,68,.3);

  --amber:      #e08c20;
  --amber-bg:   rgba(224,140,32,.12);
  --amber-line: rgba(224,140,32,.3);

  --purple-bg:  rgba(130,80,220,.12);

  --border:     rgba(255,255,255,.07);
  --border-2:   rgba(255,255,255,.12);

  --text:       #eaf0ff;
  --text-2:     #8090b8;
  --text-3:     #4a5878;

  --sidebar-w:  260px;
  --topbar-h:   64px;
  --drawer-w:   min(1180px, 96vw);
  --page-gutter: clamp(24px, 3vw, 48px);

  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-xl:  24px;
  --r-2xl: 32px;

  --shadow-sm: 0 2px 12px rgba(0,0,0,.4);
  --shadow-md: 0 8px 32px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 64px rgba(0,0,0,.7);

  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html[data-theme="light"] {
  --bg-base:    #f4f7fb;
  --bg-surface: #ffffff;
  --bg-card:    #ffffff;
  --bg-elevated:#edf3fb;
  --bg-hover:   #e3ebf6;

  --gold:       #b28618;
  --gold-2:     #cc9d23;
  --gold-bg:    rgba(178,134,24,.10);
  --gold-border:rgba(178,134,24,.22);

  --blue:       #2f65d9;
  --blue-2:     #4d82f2;
  --blue-bg:    rgba(47,101,217,.10);

  --green:      #0a9460;
  --green-bg:   rgba(10,148,96,.10);
  --green-line: rgba(10,148,96,.22);

  --red:        #d73f3f;
  --red-bg:     rgba(215,63,63,.10);
  --red-line:   rgba(215,63,63,.20);

  --amber:      #c97c18;
  --amber-bg:   rgba(201,124,24,.10);
  --amber-line: rgba(201,124,24,.20);

  --purple-bg:  rgba(130,80,220,.08);

  --border:     rgba(15,23,42,.08);
  --border-2:   rgba(15,23,42,.14);

  --text:       #0f172a;
  --text-2:     #42526b;
  --text-3:     #70809b;

  --shadow-sm: 0 2px 12px rgba(15,23,42,.08);
  --shadow-md: 0 10px 28px rgba(15,23,42,.10);
  --shadow-lg: 0 24px 54px rgba(15,23,42,.14);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.18); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(15,23,42,.14); }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(15,23,42,.22); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── Auth Gate ── */
.auth-gate {
  position: fixed; inset: 0;
  background: var(--bg-base);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity .3s ease;
}
.auth-inner { text-align: center; }
.auth-ring {
  width: 48px; height: 48px;
  border: 2px solid rgba(47,160,132,.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
.auth-text { color: var(--text-2); font-size: 13px; font-weight: 500; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── App Shell ── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh; min-height: 100dvh;
}
.hidden { display: none !important; }

/* ═══ SIDEBAR ═══ */
.hr-sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #050c1c 0%, #040810 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}
html[data-theme="light"] .hr-sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fd 100%);
}

/* Sidebar decorative glow */
.hr-sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 200px;
  background: radial-gradient(ellipse at 50% 0%, rgba(47,160,132,.06) 0%, transparent 70%);
  pointer-events: none;
}
html[data-theme="light"] .hr-sidebar::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(178,134,24,.08) 0%, transparent 70%);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brand-back {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: var(--text-2);
  transition: .15s;
  flex-shrink: 0;
}
html[data-theme="light"] .brand-back { background: rgba(15,23,42,.05); }
.brand-back:hover { background: rgba(255,255,255,.12); color: var(--text); }
html[data-theme="light"] .brand-back:hover { background: rgba(15,23,42,.1); }
.brand-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), #8a6b20);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
  color: #04080f;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(47,160,132,.3);
  letter-spacing: .05em;
}
.brand-title { font-size: 13px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.brand-sub { font-size: 10px; color: var(--text-3); font-weight: 500; margin-top: 1px; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.su-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800;
  flex-shrink: 0;
  position: relative;
}
.su-name { font-size: 12px; font-weight: 700; line-height: 1.3; }
.su-role { font-size: 10px; color: var(--text-3); text-transform: capitalize; }
.su-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  margin-left: auto;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 8px;
}
.nav-section-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 12px 8px 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s ease;
  text-align: left;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: var(--text); }
html[data-theme="light"] .nav-item:hover { background: rgba(15,23,42,.05); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(47,160,132,.14), rgba(47,160,132,.06));
  color: var(--gold-2);
  border: 1px solid var(--gold-border);
}
.nav-item.active svg { stroke: var(--gold); }
.nav-item svg { flex-shrink: 0; opacity: .7; }
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 800;
  background: rgba(255,255,255,.1);
  color: var(--text-2);
}
.nav-badge.warn   { background: var(--amber-bg);  color: var(--amber); }
.nav-badge.danger { background: var(--red-bg);     color: var(--red); }
.nav-badge.gold   { background: var(--gold-bg);    color: var(--gold); }

.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.logout-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
}
.logout-btn:hover { background: rgba(224,68,68,.1); color: var(--red); }

/* ═══ MAIN ═══ */
.hr-main {
  margin-left: var(--sidebar-w);
  width: calc(100vw - var(--sidebar-w));
  min-height: 100vh; min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse at 80% 0%, rgba(47,160,132,.04) 0%, transparent 50%),
    radial-gradient(ellipse at 0% 100%, rgba(58,106,212,.04) 0%, transparent 50%);
}
html[data-theme="light"] .hr-main {
  background-image:
    radial-gradient(ellipse at 80% 0%, rgba(178,134,24,.08) 0%, transparent 50%),
    radial-gradient(ellipse at 0% 100%, rgba(47,101,217,.06) 0%, transparent 50%);
}

/* ── Topbar ── */
.hr-topbar {
  height: var(--topbar-h);
  padding: 0 var(--page-gutter);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(4,8,15,.8);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}
html[data-theme="light"] .hr-topbar {
  background: rgba(255,255,255,.86);
}
.topbar-left { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.topbar-breadcrumb {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  white-space: nowrap;
}
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 12px;
  height: 36px;
  width: 240px;
  transition: .15s;
}
html[data-theme="light"] .search-box { background: rgba(15,23,42,.03); }
.search-box:focus-within {
  border-color: var(--gold-border);
  background: rgba(47,160,132,.05);
}
.search-box svg { color: var(--text-3); flex-shrink: 0; }
.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.search-box input::placeholder { color: var(--text-3); }

/* ── Buttons ── */
.btn-gold {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 16px;
  height: 36px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--gold), #a07828);
  color: #04080f;
  font-size: 12px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(47,160,132,.25);
}
.btn-gold:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-gold:active { transform: translateY(0); }

.btn-gold-sm {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--gold), #a07828);
  color: #04080f;
  font-size: 12px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
}
.btn-gold-sm:hover { filter: brightness(1.1); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 14px;
  height: 36px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
  font-family: inherit;
}
html[data-theme="light"] .btn-outline { background: rgba(15,23,42,.03); }
.btn-outline:hover { background: rgba(255,255,255,.1); color: var(--text); }
html[data-theme="light"] .btn-outline:hover { background: rgba(15,23,42,.06); }

.btn-ghost {
  padding: 0 14px;
  height: 36px;
  border-radius: var(--r-sm);
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s;
  font-family: inherit;
}
.btn-ghost:hover { background: rgba(255,255,255,.05); }
html[data-theme="light"] .btn-ghost:hover { background: rgba(15,23,42,.05); }

.btn-danger {
  padding: 0 14px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--red-bg);
  border: 1px solid var(--red-line);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s;
  font-family: inherit;
}
.btn-danger:hover { background: rgba(224,68,68,.2); }

.btn-danger-sm {
  padding: 0 12px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--red-bg);
  border: 1px solid var(--red-line);
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s;
  font-family: inherit;
}
.btn-danger-sm:hover { background: rgba(224,68,68,.2); }

/* ── Views ── */
.view {
  flex: 1;
  padding: 32px var(--page-gutter) 44px;
  animation: fadeUp .3s ease both;
}
.view.hidden { display: none; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Status Badges ── */
.status-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.status-badge.active      { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-line); }
.status-badge.probation   { background: var(--blue-bg);  color: var(--blue-2); border: 1px solid rgba(80,128,240,.3); }
.status-badge.on-leave    { background: var(--amber-bg); color: var(--amber);  border: 1px solid var(--amber-line); }
.status-badge.terminated  { background: var(--red-bg);   color: var(--red);    border: 1px solid var(--red-line); }

/* ═══ DASHBOARD ═══ */
.dash-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.dash-eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.dash-greeting {
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--text);
  font-family: var(--font-display);
  line-height: .98;
}
.dash-date { font-size: 12px; color: var(--text-3); margin-top: 4px; font-weight: 500; }
.dash-hero-alert {
  display: flex; flex-direction: column; gap: 8px;
  max-width: 360px;
}
.dash-alert-item {
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-alert-item.critical { background: var(--red-bg); border: 1px solid var(--red-line); color: #f8a0a0; }
.dash-alert-item.warning  { background: var(--amber-bg); border: 1px solid var(--amber-line); color: #f0c070; }

.hr-cockpit {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr);
  gap: 16px;
  margin: 0 0 22px;
}
.hr-cockpit-main,
.hr-cockpit-side {
  border: 1px solid var(--border);
  border-radius: 26px;
  background:
    radial-gradient(circle at 10% 0%, rgba(47,160,132,.18), transparent 32%),
    radial-gradient(circle at 94% 20%, rgba(201,168,76,.13), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  box-shadow: var(--shadow-md);
}
html[data-theme="light"] .hr-cockpit-main,
html[data-theme="light"] .hr-cockpit-side {
  background:
    radial-gradient(circle at 10% 0%, rgba(47,160,132,.10), transparent 32%),
    radial-gradient(circle at 94% 20%, rgba(178,134,24,.12), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(247,250,252,.92));
}
.hr-cockpit-main {
  position: relative;
  z-index: 2;
  padding: clamp(18px, 2.2vw, 28px);
  overflow: visible;
}
.hr-cockpit-copy { max-width: 760px; }
.hr-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(47,160,132,.16);
  border: 1px solid rgba(47,160,132,.28);
  color: var(--gold-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hr-cockpit h2 {
  margin: 14px 0 8px;
  max-width: 760px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 44px);
  line-height: 1.02;
  letter-spacing: -.055em;
  color: var(--text);
}
.hr-cockpit p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}
.hr-command-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
  padding: 14px 16px;
  min-height: 58px;
  border: 1px solid rgba(47,160,132,.24);
  border-radius: 18px;
  background: rgba(4,8,15,.46);
  color: var(--gold-2);
}
html[data-theme="light"] .hr-command-search { background: rgba(255,255,255,.86); }
.hr-command-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}
.hr-command-search input::placeholder { color: var(--text-3); font-weight: 600; }
.hr-command-search:focus-within {
  border-color: rgba(47,160,132,.68);
  box-shadow: 0 0 0 3px rgba(47,160,132,.12);
}
.hr-cmd-results {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  z-index: 40;
  max-height: min(52vh, 440px);
  max-height: min(52dvh, 440px);
  padding: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(47,160,132,.28);
  border-radius: 16px;
  background: rgba(9,17,27,.98);
  box-shadow: 0 22px 55px rgba(0,0,0,.42);
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
html[data-theme="light"] .hr-cmd-results {
  border-color: rgba(26,94,80,.2);
  background: rgba(255,255,255,.99);
  box-shadow: 0 22px 50px rgba(39,61,75,.2);
}
.hr-cmd-item,
.hr-cmd-all {
  width: 100%;
  border: 0;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: start;
}
.hr-cmd-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 12px;
  background: transparent;
}
.hr-cmd-item:hover,
.hr-cmd-item:focus-visible,
.hr-cmd-item.active {
  outline: 0;
  background: rgba(47,160,132,.14);
}
html[data-theme="light"] .hr-cmd-item:hover,
html[data-theme="light"] .hr-cmd-item:focus-visible,
html[data-theme="light"] .hr-cmd-item.active {
  background: rgba(47,160,132,.1);
}
.hr-cmd-av {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
}
.hr-cmd-metacol {
  display: block;
  min-width: 0;
}
.hr-cmd-name,
.hr-cmd-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hr-cmd-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}
.hr-cmd-sub {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
}
.hr-cmd-all {
  display: block;
  margin-top: 5px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  background: transparent;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 800;
}
.hr-cmd-all:hover,
.hr-cmd-all:focus-visible {
  outline: 0;
  background: rgba(201,168,76,.1);
}
.hr-cmd-empty {
  padding: 14px 12px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}
@media (max-width: 640px) {
  .hr-cmd-results {
    inset-inline: -8px;
    max-height: min(48vh, 360px);
    max-height: min(48dvh, 360px);
  }
}
.hr-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.hr-action-card {
  display: flex;
  min-height: 118px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
html[data-theme="light"] .hr-action-card { background: rgba(255,255,255,.9); }
.hr-action-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47,160,132,.45);
  background: rgba(47,160,132,.12);
}
.hr-action-card.primary {
  background: linear-gradient(135deg, #2fa084, #c9a84c);
  color: #04100d;
  border-color: transparent;
}
.hr-action-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 900;
}
.hr-action-card.primary .hr-action-icon { background: rgba(4,8,15,.15); }
.hr-action-card strong { display: block; font-size: 14px; font-weight: 900; }
.hr-action-card small { display: block; color: var(--text-3); font-size: 11px; font-weight: 700; line-height: 1.35; }
.hr-action-card.primary small { color: rgba(4,16,13,.78); }
.hr-cockpit-side {
  padding: 18px;
}
.hr-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}
.hr-side-head small {
  padding: 4px 8px;
  border-radius: 99px;
  background: rgba(47,160,132,.12);
  color: var(--gold-2);
  border: 1px solid rgba(47,160,132,.22);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hr-priority-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hr-priority-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(4,8,15,.34);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: .18s ease;
}
html[data-theme="light"] .hr-priority-item { background: rgba(255,255,255,.78); }
.hr-priority-item:hover { transform: translateX(2px); border-color: var(--gold-border); }
.hr-priority-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: var(--gold-bg);
  color: var(--gold-2);
  font-weight: 900;
  font-family: var(--font-mono);
}
.hr-priority-title { color: var(--text); font-weight: 900; font-size: 12px; }
.hr-priority-sub { color: var(--text-3); font-weight: 700; font-size: 10.5px; margin-top: 2px; }
.hr-priority-count {
  min-width: 32px;
  text-align: center;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 900;
}
@media (max-width: 1180px) {
  .hr-cockpit { grid-template-columns: 1fr; }
  .hr-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { --page-gutter: 16px; }
  .view { padding-top: 20px; padding-bottom: 28px; }
  .hr-action-grid { grid-template-columns: 1fr; }
  .hr-priority-item { grid-template-columns: 30px 1fr auto; }
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
@media (max-width: 1200px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: .2s ease;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
}
.kpi-card.gold::before   { background: linear-gradient(90deg, var(--gold), transparent); }
.kpi-card.green::before  { background: linear-gradient(90deg, var(--green), transparent); }
.kpi-card.blue::before   { background: linear-gradient(90deg, var(--blue-2), transparent); }
.kpi-card.red::before    { background: linear-gradient(90deg, var(--red), transparent); }
.kpi-card.amber::before  { background: linear-gradient(90deg, var(--amber), transparent); }
.kpi-card.purple::before { background: linear-gradient(90deg, #a060e0, transparent); }

.kpi-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.kpi-icon { font-size: 20px; margin-bottom: 12px; }
.kpi-num {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.06em;
  font-family: var(--font-mono);
  color: var(--text);
}
.kpi-label { font-size: 10px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .12em; margin-top: 6px; }

/* Dashboard panels */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.panel-link {
  font-size: 11px;
  color: var(--gold);
  cursor: pointer;
  transition: .15s;
}
.panel-link:hover { color: var(--gold-2); }

.dash-list { display: flex; flex-direction: column; gap: 8px; }
.dash-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
  font-size: 12px;
  transition: .15s;
}

.hr-gap-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 10% 0%, rgba(201,168,76,.20), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}
.hr-gap-hero h2 {
  margin: 4px 0 6px;
  font-size: 24px;
  color: var(--text);
}
.hr-gap-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
}
.hr-gap-eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hr-gap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.hr-migration-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.hr-migration-tile {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-card);
}
.hr-migration-tile strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  font-family: var(--font-mono);
}
.hr-migration-tile span {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hr-gap-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
}
.hr-gap-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 15px;
}
.hr-gap-card p,
.hr-gap-card .meta {
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.45;
}
.hr-gap-card .count {
  margin-top: 12px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
}
.hr-gap-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hr-gap-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-elevated);
  color: var(--text-2);
  font-size: 12px;
}
.hr-gap-row strong {
  color: var(--text);
  display: block;
  margin-bottom: 3px;
}
@media (max-width: 760px) {
  .hr-gap-hero { flex-direction: column; align-items: flex-start; }
}
.dash-list-item:hover { background: var(--bg-hover); }
.dli-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800;
  flex-shrink: 0;
  color: #fff;
}
.dli-name { font-weight: 700; color: var(--text); flex: 1; }
.dli-sub  { font-size: 10px; color: var(--text-3); }
.dli-badge { font-size: 10px; font-weight: 700; }
.dli-badge.danger { color: var(--red); }
.dli-badge.warn   { color: var(--amber); }
.dli-badge.gold   { color: var(--gold); }

/* ═══ EMPLOYEES ═══ */
.emp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.emp-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* search box injected by ensureEmpSearchBox() — grows to fill the bar */
.emp-search-wrap { flex: 1 1 240px; min-width: 200px; display: flex; }
.emp-search-wrap input, #empSearchBox {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  outline: none;
  transition: .15s;
}
.emp-search-wrap input:focus { border-color: var(--gold-border); box-shadow: 0 0 0 3px var(--gold-bg); }
.emp-search-wrap input::placeholder { color: var(--text-3); }

.filter-select {
  height: 36px;
  padding: 0 30px 0 12px;
  background-color: var(--bg-card);
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: .15s;
}
.filter-select:hover { border-color: var(--gold-border); }
.filter-select:focus { border-color: var(--gold-border); color: var(--text); }

.view-toggle { display: flex; gap: 4px; }
.vt-btn {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  display: grid; place-items: center;
  transition: .15s;
}
.vt-btn.active { background: var(--gold-bg); border-color: var(--gold-border); color: var(--gold); }
.vt-btn:hover:not(.active) { background: rgba(255,255,255,.08); }

.emp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.emp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 18px;
  cursor: pointer;
  transition: .2s ease;
  position: relative;
  overflow: hidden;
}
.emp-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 0;
  background: linear-gradient(180deg, transparent, rgba(47,160,132,.04));
  transition: height .25s ease;
}
.emp-card:hover {
  border-color: var(--gold-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.emp-card:hover::after { height: 60px; }

.ec-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ec-status-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; min-width: 0; }
.ec-avatar {
  width: 50px; height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800;
  color: #fff;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}
.ec-avatar span,
.elr-avatar span { position: relative; z-index: 1; }
.ec-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

.presence-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 128px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.presence-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--text-3);
  flex: 0 0 auto;
}
.presence-chip.online {
  background: var(--green-bg);
  border-color: var(--green-line);
  color: var(--green);
}
.presence-chip.online .presence-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(14,169,106,.14), 0 0 10px rgba(14,169,106,.45);
}
.presence-chip.offline .presence-dot { opacity: .65; }
.elr-title + .presence-chip { margin-top: 5px; }

.ec-name { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 3px; line-height: 1.3; }
.ec-title { font-size: 11px; color: var(--text-3); font-weight: 500; }
.ec-company { font-size: 10px; color: var(--text-3); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 6px; }
.ec-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.ec-dot.amber { background: var(--amber); }
.ec-dot.red { background: var(--red); }

/* Employee list view */
.emp-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.emp-list-row {
  display: grid;
  grid-template-columns: 44px minmax(180px, 2fr) minmax(140px, 1.5fr) minmax(110px, 1fr) 112px 96px;
  min-width: 900px;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: .12s;
}
.emp-list-row:last-child { border-bottom: none; }
.emp-list-row:hover { background: var(--bg-elevated); }
#empList { overflow-x: auto; }
.emp-list-row > * { min-width: 0; }
.emp-list-head { cursor: default; font-size: 11px; font-weight: 700; color: var(--text-3); }
.elr-name, .elr-title, .elr-dept { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.elr-avatar { position: relative; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--blue), var(--blue-2)); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; flex-shrink: 0; overflow: hidden; }
.elr-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}
.elr-name { font-size: 13px; font-weight: 700; color: var(--text); }
.elr-title { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.elr-company { font-size: 12px; color: var(--text-2); }
.elr-dept { font-size: 11px; color: var(--text-3); }
.elr-join { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }

/* ── Empty state ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px;
  text-align: center;
  gap: 12px;
}
.empty-icon { font-size: 48px; opacity: .4; }
.empty-title { font-size: 18px; font-weight: 800; color: var(--text-2); }
.empty-sub { font-size: 13px; color: var(--text-3); }

/* ═══ TEAMS ═══ */
.section-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 20px;
}
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: .2s ease;
}
.team-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.tc-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.tc-name { font-size: 15px; font-weight: 800; color: var(--text); }
.tc-dept { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.tc-company { font-size: 10px; color: var(--gold); font-weight: 700; margin-top: 4px; }
.tc-members { display: flex; gap: -4px; margin-top: 14px; }
.tc-member-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  border: 2px solid var(--bg-card);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800;
  color: #fff;
  margin-left: -6px;
}
.tc-member-avatar:first-child { margin-left: 0; }
.tc-count { font-size: 11px; color: var(--text-3); margin-top: 8px; }
.tc-actions { display: flex; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ═══ KANBAN / ONBOARDING ═══ */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 20px;
}
.kanban-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
  min-width: 200px;
}
.kanban-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-2);
  margin-bottom: 12px;
}
.kcol-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.kcol-count {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 99px;
  font-size: 9px;
  background: rgba(255,255,255,.08);
}
.kanban-cards { display: flex; flex-direction: column; gap: 8px; }
.kanban-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
  cursor: pointer;
  transition: .15s;
}
.kanban-card:hover { border-color: var(--gold-border); }
.kc-name { font-size: 13px; font-weight: 700; color: var(--text); }
.kc-title { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.kc-date { font-size: 10px; color: var(--text-3); margin-top: 8px; font-family: var(--font-mono); }
.kc-progress { height: 3px; background: rgba(255,255,255,.08); border-radius: 99px; margin-top: 10px; }
.kc-progress-fill { height: 100%; border-radius: 99px; background: var(--gold); transition: width .3s; }
.kc-actions { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.kc-action-btn {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* ═══ RESIDENCY TABLE ═══ */
.residency-filters { margin-bottom: 18px; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text-2);
  transition: .15s;
  font-family: inherit;
}
.chip:hover { background: rgba(255,255,255,.08); }
.chip.active { background: rgba(255,255,255,.1); border-color: var(--border-2); color: var(--text); }
.chip.danger { color: var(--red); border-color: var(--red-line); }
.chip.danger.active { background: var(--red-bg); }
.chip.amber  { color: var(--amber); border-color: var(--amber-line); }
.chip.amber.active { background: var(--amber-bg); }
.chip.green  { color: var(--green); border-color: var(--green-line); }
.chip.green.active { background: var(--green-bg); }
.chip.red { color: var(--red); border-color: var(--red-line); }
.chip.red.active { background: var(--red-bg); }

.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.hr-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.hr-table thead tr { background: var(--bg-elevated); }
.hr-table th {
  padding: 12px 16px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--text-3);
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}
.hr-table td {
  padding: 13px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-2);
  vertical-align: middle;
}
.hr-table tbody tr { transition: background .12s; }
.hr-table tbody tr:hover { background: var(--bg-elevated); }
.hr-table tbody tr:last-child td { border-bottom: none; }
.mono { font-family: var(--font-mono); font-size: 11px; }

/* Expiry status pills */
.expiry-pill {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
}
.expiry-pill.expired  { background: var(--red-bg);   color: var(--red);   border: 1px solid var(--red-line);   }
.expiry-pill.critical { background: var(--red-bg);   color: #ff8080;      border: 1px solid var(--red-line);   }
.expiry-pill.warning  { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-line); }
.expiry-pill.ok       { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-line); }

/* ═══ DOCUMENTS ═══ */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  transition: .2s;
}
.doc-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.doc-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--blue-bg);
  display: grid; place-items: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.doc-name { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.4; }
.doc-type { font-size: 10px; color: var(--text-3); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.doc-emp  { font-size: 11px; color: var(--text-3); margin-top: 8px; }
.doc-expiry { font-size: 10px; color: var(--amber); margin-top: 4px; font-weight: 600; }
.doc-expiry.ok { color: var(--green); }
.doc-actions { display: flex; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.doc-action-btn {
  flex: 1;
  height: 28px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  transition: .12s;
}
.doc-action-btn:hover { background: rgba(255,255,255,.1); }

/* ═══ LEAVE ═══ */
.leave-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.ls-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  text-align: center;
}
.ls-num { font-size: 24px; font-weight: 800; font-family: var(--font-mono); }
.ls-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin-top: 4px; }
.drawer-leave-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.drawer-leave-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
}
.drawer-leave-card strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 8px;
}
.drawer-leave-card .remaining {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
}
.drawer-leave-card .meta,
.drawer-leave-note {
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.6;
}
.drawer-leave-note {
  margin-top: 10px;
}
.drawer-leave-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.drawer-leave-row:last-child {
  border-bottom: 0;
}

/* ═══ QUESTIONNAIRES ═══ */
.quest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.quest-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: .2s;
}
.quest-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.qc-title { font-size: 15px; font-weight: 800; color: var(--text); }
.qc-desc { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }
.qc-meta { display: flex; gap: 12px; margin-top: 14px; font-size: 11px; color: var(--text-3); }
.qc-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ═══ BIRTHDAYS ═══ */
.bday-month-select { margin-bottom: 20px; }
.bday-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.bday-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  transition: .2s;
  position: relative;
  overflow: hidden;
}
.bday-card.today { border-color: var(--gold-border); }
.bday-card.today::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.bday-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.bc-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-mono);
  margin-bottom: 10px;
}
.bc-avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  overflow: hidden;
}
.bc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bc-name { font-size: 14px; font-weight: 800; color: var(--text); }
.bc-title { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.bc-age { font-size: 11px; color: var(--gold); margin-top: 6px; font-weight: 600; }
.bc-wish-btn {
  width: 100%;
  height: 32px;
  margin-top: 12px;
  border-radius: var(--r-sm);
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: .15s;
}
.bc-wish-btn:hover { background: rgba(47,160,132,.2); }

/* ═══ EMPLOYEE DRAWER ═══ */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  opacity: 0;
  transition: opacity .25s ease;
}
.drawer-backdrop.open { display: flex; opacity: 1; }

.employee-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: var(--drawer-w);
  max-width: 100%;
  background:
    radial-gradient(circle at 10% 0%, rgba(47,160,132,.10), transparent 26%),
    linear-gradient(180deg, var(--bg-surface), var(--bg-base));
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 201;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: -20px 0 60px rgba(0,0,0,.6);
}
.drawer-backdrop.open .employee-drawer { transform: translateX(0); }

.drawer-header {
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(180deg, rgba(47,160,132,.08) 0%, transparent 100%);
  flex-shrink: 0;
}
.drawer-hero { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.drawer-avatar {
  width: 58px; height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  display: grid; place-items: center;
  font-size: 22px; font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(58,106,212,.3);
}
.drawer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.drawer-eyebrow {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.drawer-name { font-size: clamp(24px, 3vw, 38px); font-weight: 900; letter-spacing: -.05em; line-height: 1; color: var(--text); }
.drawer-title { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.drawer-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.drawer-header-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.drawer-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: none;
  color: var(--text-2);
  cursor: pointer;
  display: grid; place-items: center;
  transition: .15s;
}
.drawer-close:hover { background: rgba(255,255,255,.12); color: var(--text); }

.employee-360-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0 28px 18px;
  border-bottom: 1px solid var(--border);
}
.employee-360-tile {
  min-height: 86px;
  padding: 13px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.045);
}
html[data-theme="light"] .employee-360-tile { background: rgba(255,255,255,.86); }
.employee-360-tile strong {
  display: block;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1;
}
.employee-360-tile span {
  display: block;
  margin-top: 7px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.employee-360-tile.good { border-color: var(--green-line); background: var(--green-bg); }
.employee-360-tile.warn { border-color: var(--amber-line); background: var(--amber-bg); }
.employee-360-tile.danger { border-color: var(--red-line); background: var(--red-bg); }

.employee-quick-actions {
  display: flex;
  gap: 10px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.employee-quick-action {
  height: 34px;
  padding: 0 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  transition: .16s ease;
}
.employee-quick-action:hover {
  transform: translateY(-1px);
  border-color: var(--gold-border);
  color: var(--gold-2);
}

.drawer-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  overflow-x: auto;
  flex-shrink: 0;
}
.dtab {
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: .15s;
}
.dtab:hover { color: var(--text-2); }
.dtab.active { color: var(--gold); border-bottom-color: var(--gold); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}
.dtab-panel { display: none; }
.dtab-panel.active { display: block; animation: fadeUp .2s ease both; }

.employee-profile-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 14px;
  margin-bottom: 18px;
}
.employee-profile-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 0% 0%, rgba(201,168,76,.12), transparent 34%),
    var(--bg-card);
}
.employee-profile-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}
.employee-profile-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.55;
}
.employee-profile-list {
  display: grid;
  gap: 8px;
}
.employee-profile-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
}
.employee-profile-row:last-child { border-bottom: 0; }
.employee-profile-row strong { color: var(--text); }
@media (max-width: 900px) {
  .employee-360-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 18px; }
  .employee-quick-actions { padding-inline: 18px; }
  .drawer-body { padding-inline: 18px; }
  .employee-profile-summary { grid-template-columns: 1fr; }
}

/* Form elements inside drawer */
.form-section { margin-bottom: 24px; }
.fs-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--text-3);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.fg { display: flex; flex-direction: column; gap: 6px; }
.fg.full { grid-column: 1 / -1; }
.fg label { font-size: 10px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; }

.hr-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  transition: .15s;
}
.hr-input:focus { border-color: var(--gold-border); background: rgba(47,160,132,.05); }
.hr-input::placeholder { color: var(--text-3); }
select.hr-input {
  cursor: pointer;
  background: var(--bg-elevated, #111f38);
  color: var(--text, #eaf0ff);
}
select.hr-input option {
  background: var(--bg-card, #0c1628);
  color: var(--text, #eaf0ff);
}
textarea.hr-input { height: auto; padding: 10px 12px; resize: vertical; }

/* Overview tab */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.ov-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.ov-card.full { grid-column: 1 / -1; }
.ov-label { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); margin-bottom: 5px; }
.ov-val { font-size: 13px; font-weight: 700; color: var(--text); }

.ov-residency-strip { display: flex; flex-direction: column; gap: 8px; }
.ors-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  font-size: 12px;
}
.ors-item.critical { background: var(--red-bg); border-color: var(--red-line); }
.ors-item.warning  { background: var(--amber-bg); border-color: var(--amber-line); }
.ors-item.ok       { background: var(--green-bg); border-color: var(--green-line); }
.ors-label { font-weight: 700; color: var(--text); }
.ors-days  { font-size: 11px; font-weight: 700; }
.ors-days.critical { color: var(--red); }
.ors-days.warning  { color: var(--amber); }
.ors-days.ok       { color: var(--green); }

/* Document upload zone */
.doc-upload-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--r-lg);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: .2s;
  margin-bottom: 14px;
}
.doc-upload-zone:hover { border-color: var(--gold-border); background: var(--gold-bg); }
.duz-text { font-size: 13px; font-weight: 700; color: var(--text-2); margin-top: 8px; }
.duz-sub  { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.duz-icon { color: var(--text-3); }

.doc-type-row { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.doc-upload-status { min-height: 18px; margin: -4px 0 14px; font-size: 11px; color: var(--text-2); }
.doc-upload-status.error { color: var(--red); }
.doc-upload-status.success { color: var(--green); }

.emp-docs-list { display: flex; flex-direction: column; gap: 8px; }
.emp-doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: .12s;
}
.emp-doc-item:hover { border-color: var(--border-2); }
.edi-icon { font-size: 20px; flex-shrink: 0; }
.edi-name { flex: 1; font-size: 12px; font-weight: 700; color: var(--text); }
.edi-type { font-size: 10px; color: var(--text-3); text-transform: uppercase; font-weight: 700; }
.edi-path { font-size: 10px; color: var(--gold); margin-top: 4px; }
.edi-expiry { font-size: 10px; font-weight: 600; }
.edi-actions { display: flex; gap: 6px; }
.edi-btn {
  width: 26px; height: 26px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,.06);
  color: var(--text-3);
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 12px;
  transition: .12s;
}
.edi-btn:hover { background: rgba(255,255,255,.12); color: var(--text); }
.edi-btn.danger:hover { background: var(--red-bg); color: var(--red); }

/* Permissions */
.permissions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.perm-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  transition: .12s;
}
.perm-check:hover { border-color: var(--border-2); color: var(--text); }
.perm-check input[type="checkbox"] { accent-color: var(--gold); width: 14px; height: 14px; }

/* Notes */
.notes-history { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.note-item {
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--text-2);
}
.note-meta { font-size: 10px; color: var(--text-3); margin-top: 4px; }

.drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  background: var(--bg-surface);
}
.df-right { display: flex; gap: 8px; }

/* ═══ MODALS ═══ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 300;
}
.modal-backdrop.open { display: flex; }
.hr-modal {
  width: min(560px, 100%);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lg);
  animation: modalIn .22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.hm-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, transparent 100%);
}
.hm-title { font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.modal-close {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: none;
  color: var(--text-2);
  cursor: pointer;
  font-size: 14px;
  transition: .15s;
}
.modal-close:hover { background: rgba(255,255,255,.12); }
.hm-body { padding: 20px 22px; max-height: 65vh; overflow-y: auto; }
.hm-foot {
  padding: 0 22px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.doc-viewer-modal {
  width: min(1100px, 96vw);
  height: min(92vh, 960px);
  display: flex;
  flex-direction: column;
}
.doc-viewer-meta {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
  font-weight: 600;
}
.doc-viewer-body {
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.doc-viewer-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)),
    radial-gradient(circle at top right, rgba(47,160,132,.08), transparent 36%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-viewer-frame,
.doc-viewer-image {
  width: 100%;
  height: 100%;
  border: none;
  background: #0b1220;
}
.doc-viewer-image {
  object-fit: contain;
}
.doc-viewer-empty {
  max-width: 540px;
  padding: 28px;
  text-align: center;
  color: var(--text-2);
}
.doc-viewer-empty strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 8px;
}
.doc-viewer-empty span {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 8px;
}
.doc-viewer-foot {
  justify-content: space-between;
  align-items: center;
}
.doc-viewer-link {
  text-decoration: none;
}

/* Questionnaire questions */
.quest-question {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 10px;
}
.qq-row { display: flex; gap: 8px; align-items: center; }
.qq-del { width: 28px; height: 28px; border-radius: 6px; background: var(--red-bg); border: 1px solid var(--red-line); color: var(--red); font-size: 14px; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; font-family: inherit; }

/* ═══ TOAST ═══ */
.toast-area {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn .25s ease both;
  pointer-events: auto;
  max-width: 340px;
}
.toast.success { border-color: var(--green-line); background: var(--green-bg); }
.toast.error   { border-color: var(--red-line);   background: var(--red-bg); }
.toast.gold    { border-color: var(--gold-border); background: var(--gold-bg); }
@keyframes toastIn  { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }
@keyframes toastOut { from { opacity:1; transform: translateX(0); }    to { opacity:0; transform: translateX(20px); } }

/* Attendance configuration */
#attendanceLocationsView .dash-panel,
#attendancePoliciesView .dash-panel,
#attendanceAssignmentsView .dash-panel { margin-bottom: 18px; }
#attendanceLocationsView .hm-foot,
#attendancePoliciesView .hm-foot,
#attendanceAssignmentsView .hm-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
#attendanceLocationsView .hr-input[type="checkbox"],
#attendancePoliciesView .hr-input[type="checkbox"],
#attendanceAssignmentsView .hr-input[type="checkbox"] { margin-right: 8px; }

/* ═══ ONBOARDING DASHBOARD ═══ */
.onb-kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.onb-kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; position: relative; overflow: hidden; }
.onb-kpi::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.onb-kpi.blue::before { background: linear-gradient(90deg, #3a6ad4, transparent); }
.onb-kpi.amber::before { background: linear-gradient(90deg, #e08c20, transparent); }
.onb-kpi.gold::before { background: linear-gradient(90deg, var(--gold), transparent); }
.onb-kpi.red::before { background: linear-gradient(90deg, #e04444, transparent); }
.onb-kpi.green::before { background: linear-gradient(90deg, #0ea96a, transparent); }
.onb-kpi-num { font-size: 28px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.onb-kpi-label { font-size: 10px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; margin-top: 4px; }
@media (max-width: 900px) { .onb-kpi-row { grid-template-columns: repeat(3, 1fr); } }
.pip-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.pip-dot.done { background: #0ea96a; }
.pip-dot.active { background: #e08c20; }
.pip-dot.rejected { background: #e04444; }
.pip-dot.pending { background: rgba(255,255,255,.1); }
.table-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.onb-review-drawer { position: fixed; top: 0; right: -560px; bottom: 0; width: 540px; background: var(--bg-card); border-left: 1px solid var(--border); z-index: 200; transition: right .3s ease; overflow-y: auto; padding: 24px; }
.onb-review-drawer.open { right: 0; }
.onb-review-close { position: absolute; top: 14px; right: 14px; background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 20px; }
.onb-doc-review { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; margin-bottom: 10px; }
.onb-doc-review img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.onb-reject-input { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg-surface); color: var(--text); font-size: 12px; margin-top: 6px; }
.payroll-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.payroll-total { font-size: 20px; font-weight: 800; font-family: 'JetBrains Mono', monospace; color: var(--gold); padding: 12px 0; border-top: 1px solid var(--border); margin-top: 10px; }

/* Guided onboarding steps */
.go-step-bar { flex: 1; height: 4px; border-radius: 99px; background: var(--border); transition: .3s; }
.go-step-bar.active { background: linear-gradient(90deg, var(--gold), var(--gold-2, #e0c870)); }
.go-step-bar.done { background: var(--green, #0ea96a); }

/* Hide floating chat/theme/language docks while the employee drawer is open
   so they don't overlap the drawer's Save button. */
body.axl-drawer-open .axl-chat-fab,
body.axl-drawer-open .axl-theme-dock,
body.axl-drawer-open .axl-lang-dock { display: none !important; }

/* Daily attendance report: compact controls and theme-safe summary. */
.attendance-daily-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.attendance-daily-actions .emp-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  overflow: visible;
}
.attendance-daily-bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.attendance-daily-actions .hr-input { width: auto; min-width: 168px; }
.attendance-presence-status {
  margin: 0 0 8px;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--green) 35%, var(--border));
  border-radius: 7px;
  background: color-mix(in srgb, var(--green) 8%, var(--bg-card));
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.45;
}
#attDailyReportMeta {
  min-height: 18px;
  margin: 0 2px 7px !important;
  color: var(--text-2) !important;
  font-size: 11px !important;
  line-height: 1.45;
}
.attendance-daily-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.attendance-daily-kpis .kpi-card {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-md);
}
.attendance-daily-kpis .kpi-card:hover { transform: none; box-shadow: var(--shadow-sm); }
.attendance-daily-kpis .kpi-num {
  order: 2;
  flex: 0 0 auto;
  font-size: clamp(21px, 2vw, 27px);
  letter-spacing: -.045em;
}
.attendance-daily-kpis .kpi-label {
  order: 1;
  margin-top: 0;
  font-size: 9.5px;
  line-height: 1.3;
}
.attendance-daily-table {
  overflow: auto;
  max-height: calc(100vh - 300px);
  min-height: 260px;
  border-color: var(--border-2);
}
.attendance-daily-table .hr-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--border-2);
}
.attendance-daily-table .hr-table tbody tr.attendance-on-time { background: var(--green-bg); }
.attendance-daily-table .hr-table tbody tr.attendance-late { background: var(--red-bg); }
.attendance-daily-table .hr-table tbody tr.attendance-on-time:hover {
  background: color-mix(in srgb, var(--green) 17%, var(--bg-card));
}
.attendance-daily-table .hr-table tbody tr.attendance-late:hover {
  background: color-mix(in srgb, var(--red) 17%, var(--bg-card));
}
.attendance-daily-table .hr-table tbody tr.attendance-on-time td:first-child { box-shadow: inset 3px 0 var(--green); }
.attendance-daily-table .hr-table tbody tr.attendance-late td:first-child { box-shadow: inset 3px 0 var(--red); }
@media (max-width: 800px) {
  .attendance-daily-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attendance-daily-actions { grid-template-columns: 1fr; align-items: stretch; }
  .attendance-daily-bulk-actions { justify-content: flex-start; }
  .attendance-daily-table { max-height: none; }
}
@media (max-width: 520px) {
  .attendance-daily-actions,
  .attendance-daily-actions .emp-filters,
  .attendance-daily-bulk-actions { width: 100%; }
  .attendance-daily-actions .hr-input { flex: 1 1 100%; width: 100%; }
  .attendance-daily-actions .btn-gold,
  .attendance-daily-actions .btn-outline { flex: 1 1 auto; }
  .attendance-daily-actions { padding: 8px; }
  .attendance-daily-kpis .kpi-card { min-height: 56px; padding: 9px 11px; }
  .attendance-daily-kpis .kpi-num { font-size: 20px; }
}

/* ═══ EMPLOYEES · EDITABLE TABLE (DG Employees spreadsheet view) ═══ */
.emp-xtable-wrap{margin-top:4px}
.xt-scroll{overflow-x:auto;border:1px solid var(--border);border-radius:var(--r-md);background:var(--bg-card)}
.emp-xtable{border-collapse:separate;border-spacing:0;width:100%;min-width:1550px;font-size:12px}
.emp-xtable thead th{position:sticky;top:0;z-index:3;background:var(--bg-elevated);color:var(--text-3);text-align:left;font-weight:700;font-size:10px;letter-spacing:.05em;text-transform:uppercase;padding:9px 8px;border-bottom:1px solid var(--border);white-space:nowrap}
.emp-xtable th.xt-num,.emp-xtable td.xt-num{width:34px;text-align:center;color:var(--text-3)}
.emp-xtable td{padding:2px 4px;border-bottom:1px solid var(--border);vertical-align:middle}
.emp-xtable tr.xt-row:hover td{background:color-mix(in srgb,var(--gold) 6%,transparent)}
.xt-group td{background:var(--bg-elevated);padding:7px 10px;border-bottom:1px solid var(--border);position:sticky;left:0}
.xt-gname{font-weight:800;color:var(--gold);letter-spacing:.03em;text-transform:uppercase;font-size:11px}
.xt-count{margin-left:8px;color:var(--text-3);font-size:10px;font-weight:600}
.xt-in,.xt-sel{width:100%;min-width:96px;box-sizing:border-box;background:transparent;border:1px solid transparent;border-radius:var(--r-sm);color:var(--text);font:inherit;padding:5px 6px;transition:border-color .12s,background .12s}
.xt-in:hover,.xt-sel:hover{border-color:var(--border)}
.xt-in:focus,.xt-sel:focus{outline:none;border-color:var(--gold);background:var(--bg-card)}
.xt-date{min-width:120px}
.xt-emp .xt-in{font-weight:600;min-width:150px}
.xt-sel{min-width:120px;cursor:pointer;-webkit-appearance:none;appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--text-3) 50%),linear-gradient(135deg,var(--text-3) 50%,transparent 50%);background-position:calc(100% - 12px) 55%,calc(100% - 7px) 55%;background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:22px}
.xt-in.xt-saved,.xt-sel.xt-saved{background:var(--green-bg)!important;border-color:var(--green)!important}
.xt-in.xt-saving,.xt-sel.xt-saving{opacity:.6}
.xt-row.xt-mismatch td:first-child{box-shadow:inset 3px 0 0 var(--red)}
.xt-row.xt-confirm td:first-child{box-shadow:inset 3px 0 0 var(--amber)}
.xt-row.xt-noemp td:first-child{box-shadow:inset 3px 0 0 var(--text-3)}
.xt-shared{text-align:center}
.xt-dot{color:var(--gold);font-size:13px}
.xt-docpill{display:inline-block;padding:2px 8px;border-radius:999px;font-size:10px;font-weight:700}
.xt-docpill.ok{background:var(--green-bg);color:var(--green)}
.xt-docpill.no{background:var(--red-bg);color:var(--red)}
.xt-pill{display:inline-block;background:var(--gold-bg);color:var(--gold);border:1px solid var(--gold-border);border-radius:999px;padding:1px 7px;font-size:10px;font-weight:600;margin:1px 2px 1px 0;white-space:nowrap}
.xt-muted{color:var(--text-3)}
.xt-alsotd{min-width:150px}
.xt-also-d{position:relative}
.xt-also-d>summary{list-style:none;cursor:pointer;min-height:26px;display:flex;flex-wrap:wrap;gap:2px;align-items:center;padding:3px 4px;border:1px solid transparent;border-radius:var(--r-sm)}
.xt-also-d>summary:hover{border-color:var(--border)}
.xt-also-d>summary::-webkit-details-marker{display:none}
.xt-also-pop{position:absolute;z-index:20;top:100%;left:0;min-width:210px;max-height:240px;overflow:auto;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--r-md);box-shadow:var(--shadow-md);padding:6px;margin-top:2px}
.xt-copt{display:flex;align-items:center;gap:7px;padding:5px 6px;border-radius:var(--r-sm);font-size:12px;color:var(--text);cursor:pointer}
.xt-copt:hover{background:var(--bg-elevated)}
.xt-copt em{color:var(--text-3);font-style:normal}
.xt-also-ro{display:flex;flex-wrap:wrap;gap:2px}
.emp-xtable.xt-readonly .xt-in,.emp-xtable.xt-readonly .xt-sel{pointer-events:none;background-image:none;padding-right:6px}

.xt-proposed{font-size:10px;color:var(--text-3);font-style:italic;padding:1px 6px;margin-top:1px}
