/* =====================================================
   HR Management System — Premium Classic Edition
   Palette: Black · White · Gold (#F5C400)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  /* ── Brand / accent (Black + White + Gold) ── */
  --gold:        #F5C400;   /* primary accent */
  --gold-dark:   #C9A100;   /* primary hover/active */
  --gold-light:  rgba(245,196,0,.14);   /* primary tint bg */
  --gold-muted:  rgba(245,196,0,.14);

  --primary:        #F5C400;
  --primary-dark:   #C9A100;
  --primary-light:  rgba(245,196,0,.14);
  --primary-muted:  rgba(245,196,0,.14);

  --success:       #16A34A;
  --success-dark:  #15803D;
  --success-light: rgba(22,163,74,.12);

  --danger:        #DC2626;
  --danger-dark:   #B91C1C;
  --danger-light:  rgba(220,38,38,.12);

  --warning:       #EA8C00;
  --warning-dark:  #B36A00;
  --warning-light: rgba(234,140,0,.12);

  --purple:        #7C3AED;
  --purple-dark:   #5B21B6;
  --purple-light:  rgba(124,58,237,.12);

  /* ── Core neutrals ── */
  --black:       #000000;   /* primary text */
  --dark:        #000000;   /* dark UI surfaces (tooltips, dark buttons) */
  --dark2:       #1A1A1A;   /* dark surface hover */
  --dark3:       #262626;
  --white:       #ffffff;

  --bg:          #ffffff;

  --gray-50:     #FAFAFA;
  --gray-100:    #F2F2F2;
  --gray-200:    #E6E6E6;
  --gray-300:    #CCCCCC;
  --gray-400:    #999999;
  --gray-500:    #737373;
  --gray-600:    #595959;
  --gray-700:    #3D3D3D;
  --gray-800:    #262626;

  /* ── Borders ── */
  --border:      #E6E6E6;
  --border-dark: #CCCCCC;

  /* ── Layout ── */
  --sidebar-w:   264px;
  --topbar-h:    64px;
  --radius:      18px;
  --radius-lg:   20px;
  --radius-sm:   12px;
  --radius-xs:   8px;
  --transition:  .18s cubic-bezier(.4,0,.2,1);

  /* ── Shadows (soft, layered) ── */
  --shadow-xs:    0 1px 2px rgba(0,0,0,.04);
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 14px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:    0 12px 28px -8px rgba(0,0,0,.14), 0 4px 10px rgba(0,0,0,.05);
  --shadow-hover: 0 18px 34px -14px rgba(0,0,0,.22), 0 6px 12px rgba(0,0,0,.06);
  --shadow-focus: 0 0 0 4px rgba(245,196,0,.25);

  --font: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: #ffffff;
  color: var(--black);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; }

/* Accessible focus rings — WCAG AA */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-link:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ── SCROLLBAR (beautiful, minimal) ─────────────────── */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 99px;
  border: 2px solid var(--bg);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); background-clip: padding-box; }
* { scrollbar-width: thin; scrollbar-color: var(--gray-300) transparent; }

/* ─────────────────────────────────────────────────────
   LOGIN
───────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  background: var(--white);
  overflow: hidden;
}

.login-wrap-centered {
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(245,196,0,.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(146,159,19,.08) 0%, transparent 50%),
    var(--bg);
}

.login-wrap-centered .login-right {
  width: 100%;
  min-height: auto;
  background: transparent;
}

.login-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  background:
    radial-gradient(circle at 15% 15%, rgba(245,196,0,.22) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(245,196,0,.10) 0%, transparent 50%),
    linear-gradient(160deg, #000000 0%, #1A1A1A 55%, #000000 100%);
  border-right: 1px solid rgba(255,255,255,.06);
  position: relative;
}

.login-left::before {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(245,196,0,.18) 0%, transparent 65%);
  pointer-events: none;
}

.login-left::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(245,196,0,.13) 0%, transparent 65%);
  pointer-events: none;
}

.login-brand {
  text-align: center;
  position: relative; z-index: 1;
}

.login-brand img {
  max-width: 200px;
  filter: brightness(0) invert(1);
  margin-bottom: 36px;
  opacity: .92;
}

.login-brand h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -.6px;
}

.login-brand p { color: rgba(255,255,255,.55); font-size: 14.5px; font-weight: 500; }

.login-features {
  margin-top: 52px;
  list-style: none;
  width: 100%;
  max-width: 320px;
}

.login-features li {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,.75);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: 13.5px;
  font-weight: 500;
  transition: color var(--transition), padding-left var(--transition);
}

.login-features li:hover { color: var(--white); padding-left: 4px; }

.login-features li i {
  color: var(--black);
  background: var(--gold);
  width: 30px; height: 30px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(245,196,0,.35);
}

.login-right {
  width: 480px;
  min-height: 100vh;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-card {
  width: 100%;
  max-width: 370px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 34px;
}

.login-card h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 5px;
  letter-spacing: -.4px;
}

.login-card .subtitle { color: var(--gray-500); margin-bottom: 30px; font-size: 13.5px; font-weight: 500; }

.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
  letter-spacing: .2px;
}

.form-control, .form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  font-family: inherit;
  background: var(--gray-50);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  appearance: none;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: var(--shadow-focus);
}

.form-control::placeholder { color: var(--gray-400); font-weight: 400; }

.input-icon { position: relative; }
.input-icon > i {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400); font-size: 15px;
  pointer-events: none;
}
.input-icon .form-control { padding-left: 42px; }
.input-icon .form-control.has-toggle { padding-right: 42px; }
.input-icon .toggle-pw {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--gray-400);
  background: none; border: none; outline: none; font-size: 15px;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: var(--radius-xs);
  transition: color .15s, background .15s;
}
.input-icon .toggle-pw:hover { color: var(--black); background: var(--gray-100); }

.btn-login {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: var(--black);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  font-family: inherit;
  letter-spacing: .1px;
  margin-top: 6px;
  box-shadow: 0 8px 20px -6px rgba(245,196,0,.55);
}

.btn-login:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 12px 24px -6px rgba(245,196,0,.55); }
.btn-login:active { transform: translateY(0); }
.btn-login.loading { opacity: .65; cursor: not-allowed; transform: none; }

.login-error {
  background: var(--danger-light);
  color: var(--danger-dark);
  border: 1px solid #F5B5B5;
  border-radius: var(--radius-xs);
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
  display: none;
}
.login-error.show { display: flex; align-items: center; gap: 8px; }

/* ─────────────────────────────────────────────────────
   APP LAYOUT
───────────────────────────────────────────────────── */
#app { display: flex; min-height: 100vh; }

/* ── SIDEBAR ───────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  /* No filter/backdrop-filter/transform here — those establish a containing
     block for fixed-position descendants (like .sidebar-toggle-btn), which
     would break its "escape the sidebar's overflow clipping" trick below. */
  background: #fafafa;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), width var(--transition);
  box-shadow: var(--shadow-xs);
}

/* ── COLLAPSE TOGGLE ─────────────────────────────────── */
button.sidebar-toggle-btn {
  /* position:fixed (not absolute) so it escapes .sidebar's overflow-y:auto,
     which otherwise clips anything poking past the sidebar's right edge */
  position: fixed;
  top: 38px;
  left: calc(var(--sidebar-w) - 13px);
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--gray-500);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  cursor: pointer;
  z-index: 210;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), left var(--transition);
}
.sidebar-toggle-btn:hover { background: var(--primary); color: var(--black); border-color: var(--primary); transform: scale(1.08); }
.sidebar-toggle-btn i { transition: transform var(--transition); }

.sidebar.collapsed { width: 78px; }
.sidebar.collapsed .sidebar-toggle-btn i { transform: rotate(180deg); }

.sidebar.collapsed .sidebar-logo { justify-content: center; padding: 18px 0; }
.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .sidebar-help-card {
  display: none;
}

.sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
  font-size: 0;
}
.sidebar.collapsed .nav-link i { font-size: 17px; }

.sidebar.collapsed .btn-logout {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
  font-size: 0;
}
.sidebar.collapsed .btn-logout i { font-size: 15px; }

.sidebar.collapsed .sidebar-nav,
.sidebar.collapsed .sidebar-footer {
  padding-left: 12px;
  padding-right: 12px;
}

@media (max-width: 992px) {
  .sidebar-toggle-btn { display: none; }
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: transparent; border: none; border-radius: 99px; }
.sidebar:hover::-webkit-scrollbar-thumb { background: var(--gray-200); }
.sidebar { scrollbar-width: none; }
.sidebar:hover { scrollbar-width: thin; scrollbar-color: var(--gray-200) transparent; }

.sidebar-logo {
  position: relative;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.sidebar-logo-text {
  color: var(--black);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16.5px;
  letter-spacing: -.2px;
}

.sidebar-logo img,
.sidebar-logo-img {
  max-width: 130px;
  height: 40px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-profile-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 4px 14px 10px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  width: calc(100% - 28px);
}
.sidebar-profile-inline:hover { background: var(--gray-100); }

.user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(245,196,0,.3);
  position: relative;
}

.user-info { flex: 1; min-width: 0; }

.user-info .user-name {
  color: var(--black);
  font-weight: 700; font-size: 13.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 130px;
}

.user-info .user-role {
  font-size: 11.5px;
  color: var(--gray-500);
  font-weight: 500;
  margin-top: 1px;
}

.user-info .user-online {
  font-size: 11px;
  color: var(--success-dark);
  font-weight: 600;
  margin-top: 2px;
  display: flex; align-items: center; gap: 5px;
}
.user-info .user-online .status-dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; }

.sidebar-profile-inline .bi-chevron-down { color: var(--gray-400); font-size: 11px; flex-shrink: 0; }

.sidebar-nav { padding: 8px 12px; flex: 1; }

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1.1px;
  padding: 14px 10px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  margin-bottom: 2px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
}

.nav-link i { width: 16px; text-align: center; font-size: 15px; flex-shrink: 0; }

.nav-link:hover {
  background: var(--gray-100);
  color: var(--black);
  transform: translateX(1px);
}

.nav-link.active {
  background: var(--gold-light);
  color: var(--gold-dark);
  font-weight: 600;
  border-radius: 10px;
}

.nav-link.active i { color: var(--gold-dark); }

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--border);
}

.sidebar-help-card {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 13px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.sidebar-help-card:hover { background: var(--gray-100); }
.sidebar-help-card i { font-size: 16px; color: var(--gold-dark); flex-shrink: 0; }
.sidebar-help-card .t { font-size: 12.5px; font-weight: 700; color: var(--black); }
.sidebar-help-card .s { font-size: 11px; color: var(--gray-500); margin-top: 1px; }

.btn-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--gray-600);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-logout:hover {
  background: var(--danger-light);
  border-color: #F5B5B5;
  color: var(--danger-dark);
}

/* ── MAIN CONTENT ──────────────────────────────────── */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}

.main-wrap.sidebar-collapsed { margin-left: 78px; }
@media (max-width: 992px) {
  .main-wrap.sidebar-collapsed { margin-left: 0; }
}

/* ── TOPBAR ────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 26px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  flex: 1;
  letter-spacing: -.3px;
}

.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.topbar-time {
  font-size: 12.5px;
  color: var(--gray-600);
  background: var(--gray-50);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.topbar-notif {
  position: relative;
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-600); font-size: 16px;
  transition: all var(--transition);
}

.topbar-notif:hover { background: var(--gray-50); border-color: var(--border-dark); color: var(--gold-dark); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.notif-badge {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--white);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: var(--black);
  font-size: 21px;
}

.topbar-search {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 16px;
  height: 40px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.topbar-search:focus-within { border-color: var(--primary); box-shadow: var(--shadow-focus); background: var(--white); }
.topbar-search i { color: var(--gray-400); font-size: 14px; flex-shrink: 0; }
.topbar-search input {
  border: none; outline: none; background: transparent;
  font-size: 13.5px; font-family: inherit; color: var(--black);
  width: 100%;
}
.topbar-search input::placeholder { color: var(--gray-400); }

.topbar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition);
}
.topbar-user:hover { background: var(--gray-50); }
.topbar-user img,
.topbar-user-initials {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.topbar-user-initials {
  background: var(--gold);
  color: var(--black); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  text-transform: uppercase;
}
.topbar-user-info { display: none; }
.topbar-user-info .n { font-size: 13px; font-weight: 700; color: var(--black); line-height: 1.2; }
.topbar-user-info .r { font-size: 11px; color: var(--gray-500); margin-top: 1px; }
.topbar-user > i { color: var(--gray-400); font-size: 11px; }

@media (min-width: 640px) {
  .topbar-user-info { display: block; }
}

/* ── PAGE CONTENT ──────────────────────────────────── */
.page-content { padding: 28px; flex: 1; }

.page { display: none; }
.page.active { display: block; animation: fadeUp .25s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -.4px;
}

.page-header p { font-size: 13px; color: var(--gray-500); margin-top: 3px; font-weight: 500; }

/* ── CARDS ─────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--gray-50);
}

.card-header h5 {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 800;
  color: var(--black);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -.2px;
}

.card-body { padding: 22px; }

/* ── STAT CARDS ────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, var(--border-dark));
  opacity: .85;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 90px; height: 90px;
  background: radial-gradient(circle at top right, rgba(255,255,255,.10) 0%, transparent 70%);
  pointer-events: none;
}

.stat-card:hover {
  border-color: var(--border-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.stat-top { display: flex; align-items: center; justify-content: space-between; }

.stat-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.stat-card:hover .stat-icon { transform: scale(1.08); }

/* KPI cards — plain flat cards, no glass, no colored backgrounds.
   Every icon carries the same accent so the row reads as one system. */
.stat-card.gold, .stat-card.blue, .stat-card.green,
.stat-card.red, .stat-card.purple, .stat-card.black, .stat-card.orange {
  background: var(--white);
}

.stat-icon,
.stat-icon.gold, .stat-icon.black, .stat-icon.green,
.stat-icon.red, .stat-icon.blue, .stat-icon.purple, .stat-icon.orange {
  background: #000000;
  color: #F5C400;
}

/* Dashboard KPI row (admin + employee) — first two tiles get the accent
   treatment, every other tile stays a plain white card. */
#dashStats.stat-grid .stat-card:nth-child(1),
#dashStats.stat-grid .stat-card:nth-child(1)::before {
  background: #000000;
}
#dashStats.stat-grid .stat-card:nth-child(1) .stat-val,
#dashStats.stat-grid .stat-card:nth-child(1) .stat-label,
#dashStats.stat-grid .stat-card:nth-child(1) .stat-sub {
  color: #ffffff;
}
#dashStats.stat-grid .stat-card:nth-child(1) .stat-icon {
  background: #F5C400;
  color: #000000;
}

#dashStats.stat-grid .stat-card:nth-child(2),
#dashStats.stat-grid .stat-card:nth-child(2)::before {
  background: #F5C400;
}
#dashStats.stat-grid .stat-card:nth-child(2) .stat-val,
#dashStats.stat-grid .stat-card:nth-child(2) .stat-label,
#dashStats.stat-grid .stat-card:nth-child(2) .stat-sub {
  color: #000000;
}
#dashStats.stat-grid .stat-card:nth-child(2) .stat-icon {
  background: #000000;
  color: #F5C400;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  color: var(--black);
  line-height: 1;
  letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 11.5px;
  color: var(--gray-500);
  font-weight: 600;
  letter-spacing: .2px;
  text-transform: uppercase;
}

.stat-sub {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  margin-top: -8px;
}

.stat-spark {
  width: 100%;
  height: 22px;
  display: block;
  margin-top: -4px;
}

.stat-spark path { stroke: #000000; }

#dashStats.stat-grid .stat-card:nth-child(1) .stat-spark path { stroke: rgba(255,255,255,.6); }

/* ── PUNCH CARD ────────────────────────────────────── */
.punch-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--black);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.punch-date {
  font-size: 15px;
  color: var(--black);
  font-weight: 800;
  letter-spacing: -.1px;
}

.punch-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.punch-status-badge.checked-in  { background: var(--success-light); color: var(--success-dark); border-color: #A9EDC9; }
.punch-status-badge.checked-out { background: var(--gold-light); color: var(--gold-dark); border-color: #F0D680; }
.punch-status-badge.not-checked  { background: var(--danger-light); color: var(--danger-dark); border-color: #F5B5B5; }

.punch-times { display: flex; gap: 24px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--gray-100); }

.punch-time-box { flex: 1; }

.punch-time-box label {
  font-size: 10.5px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .9px;
  font-weight: 700;
  display: block;
  margin-bottom: 5px;
}

.punch-time-box .time { font-family: var(--font-display); font-size: 21px; font-weight: 800; color: var(--black); font-variant-numeric: tabular-nums; }
.punch-time-box .time.gold { color: var(--gold); }

.punch-hours {
  font-size: 12.5px;
  color: var(--gray-700);
  font-weight: 500;
  margin-bottom: 18px;
  padding: 10px 13px;
  background: var(--gold-light);
  border: 1px solid #F0D680;
  border-radius: var(--radius-xs);
  display: flex; align-items: center; gap: 8px;
}
.punch-hours i { color: var(--gold); font-size: 12px; }

.punch-hours span { color: var(--gold-dark); font-weight: 700; }

.punch-btns { display: flex; gap: 10px; }

.btn-checkin, .btn-checkout {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  gap: 7px;
  transition: all var(--transition);
}

.btn-checkin { background: var(--primary); color: var(--black); border-color: var(--primary); box-shadow: 0 6px 16px -4px rgba(245,196,0,.4); }
.btn-checkin:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); }
.btn-checkin:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-checkout { background: var(--white); color: var(--gold-dark); border-color: var(--primary); }
.btn-checkout:hover:not(:disabled) { background: var(--gold-light); transform: translateY(-1px); }
.btn-checkout:disabled { opacity: .4; cursor: not-allowed; transform: none; color: var(--gray-400); border-color: var(--border); }

.geo-status {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  display: flex; align-items: center; gap: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  border: 1px solid transparent;
}
.geo-status i { font-size: 14px; flex-shrink: 0; }

.geo-status.loading { background: var(--gray-50); border-color: var(--border); color: var(--gray-500); }
.geo-status.loading i { animation: pulse 1.2s ease-in-out infinite; }
.geo-status.ok  { background: var(--success-light); border-color: #A9EDC9; color: var(--success-dark); }
.geo-status.far { background: var(--warning-light); border-color: rgba(234,140,0,.35); color: var(--warning-dark); }

@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.35} }

/* ── TABLES ────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

table thead th {
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  text-align: left;
}

table tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--black);
  vertical-align: middle;
}

table tbody tr { transition: background var(--transition); }
table tbody tr:hover { background: var(--gray-50); }
table tbody tr:last-child td { border-bottom: none; }

/* Zebra striping (opt-in, does not alter markup) */
table.zebra tbody tr:nth-child(even) { background: var(--gray-50); }
table.zebra tbody tr:nth-child(even):hover { background: var(--gray-100); }

.emp-avatar-sm {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--gold-dark);
  font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid #CCCCCC;
}

/* ── BADGES (pill-shaped) ─────────────────────────────── */
.badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  letter-spacing: .1px;
  border: 1px solid transparent;
}

.badge-present  { background: var(--success-light); color: var(--success-dark); border-color: #A9EDC9; }
.badge-absent   { background: var(--danger-light); color: var(--danger-dark); border-color: #F5B5B5; }
.badge-late     { background: var(--warning-light); color: var(--warning-dark); border-color: rgba(234,140,0,.35); }
.badge-holiday  { background: var(--primary-light); color: var(--primary-dark); border-color: #F0D680; }
.badge-on-leave { background: var(--purple-light); color: var(--purple); border-color: #D9C2F5; }
.badge-gold     { background: var(--primary-light); color: var(--primary-dark); border-color: #F0D680; }
.badge-black    { background: var(--dark); color: var(--white); border-color: var(--dark2); }
.badge-active   { background: var(--success-light); color: var(--success-dark); border-color: #A9EDC9; }
.badge-inactive { background: var(--gray-100); color: var(--gray-500); border-color: var(--border); }
.badge-pending  { background: var(--warning-light); color: var(--warning-dark); border-color: rgba(234,140,0,.35); }
.badge-approved { background: var(--primary-light); color: var(--primary-dark); border-color: #F0D680; }
.badge-rejected { background: var(--gray-100); color: var(--gray-600); border-color: var(--border); }
.badge-draft    { background: var(--gray-100); color: var(--gray-600); border-color: var(--border); }
.badge-paid     { background: var(--success-light); color: var(--success-dark); border-color: #A9EDC9; }
.badge-admin    { background: var(--purple-light); color: var(--purple); border-color: #D9C2F5; }
.badge-hr       { background: var(--primary-light); color: var(--primary-dark); border-color: #F0D680; }
.badge-employee { background: var(--gray-100); color: var(--gray-600); border-color: var(--border); }
.badge-green    { background: var(--success-light); color: var(--success-dark); border-color: #A9EDC9; }
.badge-red      { background: var(--danger-light); color: var(--danger-dark); border-color: #F5B5B5; }
.badge-blue     { background: var(--primary-light); color: var(--primary-dark); border-color: #F0D680; }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: .1px;
}

.btn:active { transform: translateY(1px); }

.btn-sm  { padding: 7px 14px; font-size: 12.5px; }
.btn-xs  { padding: 4px 10px; font-size: 12px; border-radius: var(--radius-xs); }

.btn-primary { background: var(--black); color: var(--white); border-color: var(--black); box-shadow: 0 4px 12px -3px rgba(0,0,0,.35); }
.btn-primary:hover { background: var(--dark2); border-color: var(--dark2); transform: translateY(-1px); box-shadow: 0 8px 18px -4px rgba(0,0,0,.4); }

.btn-dark {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}
.btn-dark:hover { background: var(--dark2); border-color: var(--dark2); transform: translateY(-1px); }

.btn-outline { background: var(--white); color: var(--black); border-color: var(--border-dark); }
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-400); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.leave-type-btn.active { background: var(--black); color: var(--white); border-color: var(--black); }
.leave-type-btn.active:hover { background: var(--gray-800); border-color: var(--gray-800); }

.btn-ghost { background: transparent; color: var(--gray-600); border-color: transparent; }
.btn-ghost:hover { background: var(--gray-100); color: var(--black); }

.btn-danger { background: var(--danger); color: var(--white); border-color: var(--danger); box-shadow: 0 4px 12px -3px rgba(220,38,38,.4); }
.btn-danger:hover { background: var(--danger-dark); border-color: var(--danger-dark); transform: translateY(-1px); }

.btn-success { background: var(--success); color: var(--white); border-color: var(--success); box-shadow: 0 4px 12px -3px rgba(22,163,74,.4); }
.btn-success:hover { background: var(--success-dark); border-color: var(--success-dark); transform: translateY(-1px); }

.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--gray-500);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  transition: all var(--transition);
}

.btn-icon:hover { background: var(--black); color: var(--white); border-color: var(--black); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-icon.danger:hover { background: var(--danger); border-color: var(--danger); color: var(--white); }
.btn-icon.success:hover { background: var(--success); border-color: var(--success); color: var(--white); }

/* ── MANAGE ASSETS BUTTON ──────────────────────────────── */
.btn-manage-assets {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--black);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn-manage-assets:hover { background: var(--gray-800); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-manage-assets:active { transform: translateY(0); }
.btn-manage-assets .ama-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.btn-manage-assets .ama-count {
  background: var(--primary);
  color: #fff;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── MODALS ─────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(5px);
}

.modal-overlay.show { display: flex; animation: fadeIn .18s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp .24s cubic-bezier(.16,1,.3,1);
  box-shadow: var(--shadow-lg);
}

.modal-box.modal-lg { max-width: 760px; }
.modal-box.modal-xl { max-width: 960px; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 21px 26px 17px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3, .modal-header h4 {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -.2px;
}

.modal-close {
  width: 32px; height: 32px;
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500); font-size: 17px;
  transition: all var(--transition);
}

.modal-close:hover { background: var(--danger-light); border-color: #F5B5B5; color: var(--danger-dark); transform: rotate(90deg); }

.modal-body { padding: 24px 26px; }
.modal-footer { padding: 17px 26px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* ── FORM GRID ──────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-group { margin-bottom: 0; }

textarea.form-control { resize: vertical; min-height: 90px; }

/* ── FILTERS ─────────────────────────────────────────── */
.filters {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-select {
  padding: 8px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  background: var(--white);
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.filter-select:focus { border-color: var(--primary); box-shadow: var(--shadow-focus); }
.filter-select:hover { border-color: var(--border-dark); }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0 13px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box:focus-within { border-color: var(--primary); box-shadow: var(--shadow-focus); }
.search-box i { color: var(--gray-400); font-size: 14px; }

.search-box input {
  border: none;
  outline: none;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 500;
  width: 190px;
  font-family: inherit;
  background: transparent;
  color: var(--black);
}

/* ── TOAST ──────────────────────────────────────────── */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  pointer-events: all;
  animation: slideToast .28s cubic-bezier(.16,1,.3,1);
  border-left: 3px solid transparent;
  box-shadow: var(--shadow-lg);
  background: var(--white);
}

@keyframes slideToast {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast.toast-success { background: var(--success-light); color: var(--success-dark); border-color: #A9EDC9; border-left-color: var(--success); }
.toast.toast-error   { background: var(--danger-light); color: var(--danger-dark); border-color: #F5B5B5; border-left-color: var(--danger); }
.toast.toast-info    { background: var(--primary-light); color: var(--primary-dark); border-color: #F0D680; border-left-color: var(--primary); }
.toast.toast-warn    { background: var(--warning-light); color: var(--warning-dark); border-color: rgba(234,140,0,.35); border-left-color: var(--warning); }
.toast.toast-hide    { animation: slideToastOut .25s ease forwards; }

@keyframes slideToastOut { to { opacity: 0; transform: translateX(30px); } }

/* ── EMPTY STATE ─────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}

.empty-state i {
  font-size: 42px;
  color: var(--gray-300);
  margin-bottom: 16px;
  display: block;
  background: var(--gray-50);
  width: 84px; height: 84px;
  line-height: 84px;
  border-radius: 50%;
  margin-left: auto; margin-right: auto;
}

.empty-state h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 5px;
}

.empty-state p { font-size: 13px; color: var(--gray-400); font-weight: 500; }

/* ── LOADING ─────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}

.spinner-sm { width: 15px; height: 15px; border-width: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }

.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

/* Skeleton loader utility (additive — safe to use anywhere) */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 37%, var(--gray-100) 63%);
  background-size: 400% 100%;
  animation: skeletonPulse 1.4s ease infinite;
  border-radius: var(--radius-xs);
}
@keyframes skeletonPulse { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ── STATUS DOTS ─────────────────────────────────────── */
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

.dot-present { background: var(--success); }
.dot-absent  { background: var(--danger); }
.dot-late    { background: var(--warning); }
.dot-holiday { background: var(--primary); }
.dot-leave   { background: var(--purple); }

/* ── CALENDAR STRIP ─────────────────────────────────── */
.cal-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }

.cal-day {
  flex-shrink: 0;
  width: 44px;
  text-align: center;
  padding: 8px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: default;
  background: var(--white);
  transition: transform var(--transition), box-shadow var(--transition);
}

.cal-day:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.cal-day .day-name { font-size: 10px; color: var(--gray-500); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.cal-day .day-num  { font-size: 14px; font-weight: 700; color: var(--black); margin: 3px 0; }
.cal-day .day-dot  { height: 5px; width: 5px; border-radius: 50%; margin: 0 auto; }

.cal-day.present { background: var(--success-light); border-color: #A9EDC9; }
.cal-day.present .day-num { color: var(--success-dark); }
.cal-day.absent  { background: var(--danger-light); border-color: #F5B5B5; }
.cal-day.absent  .day-num { color: var(--danger-dark); }
.cal-day.late    { background: var(--warning-light); border-color: rgba(234,140,0,.35); }
.cal-day.late    .day-num { color: var(--warning-dark); }
.cal-day.today   { border-color: var(--primary); background: var(--primary-light); }
.cal-day.today   .day-num { color: var(--primary-dark); font-weight: 800; }
.cal-day.weekend { background: var(--gray-50); }
.cal-day.weekend .day-num { color: var(--gray-400); }

/* ── PROGRESS BAR ───────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--primary);
  transition: width .5s ease;
}

.progress-fill.green { background: var(--success); }
.progress-fill.red   { background: var(--danger); }
.progress-fill.blue  { background: var(--primary); }

/* ── PROFILE BANNER ─────────────────────────────────── */
.profile-banner {
    background: var(--black);
    border-radius: var(--radius) var(--radius) 0 0;
    height: 112px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    position: relative;
}

.profile-avatar-lg {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  font-weight: 800; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  position: absolute;
  bottom: -40px; left: 24px;
  border: 3px solid var(--white);
  text-transform: uppercase;
  box-shadow: var(--shadow-md);
}

/* ── LIVE INDICATOR ─────────────────────────────────── */
.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 50%;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: .6; transform: scale(.85); }
}

/* ── SIDEBAR MOBILE OVERLAY ─────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 199;
  backdrop-filter: blur(3px);
}

.sidebar-overlay.show { display: block; }

/* ── TOOLTIPS ───────────────────────────────────────── */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: rgba(255,255,255,.92);
  padding: 6px 11px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255,255,255,.1);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  z-index: 500;
  box-shadow: var(--shadow-md);
}

/* Topbar sits at the very top of the viewport — show tooltips below instead of above so they don't get clipped */
.topbar [data-tip]:hover::after {
  bottom: auto;
  top: calc(100% + 7px);
}

/* Sidebar nav-link tooltips use a JS-rendered floating tip (see .sb-float-tip) since
   the sidebar's overflow-y:auto clips any ::after tooltip that tries to escape its bounds. */
.sidebar .nav-link:hover::after,
.sidebar .btn-logout:hover::after {
  display: none;
}

.sb-float-tip {
  position: fixed;
  transform: translateY(-50%);
  background: var(--dark);
  color: rgba(255,255,255,.92);
  padding: 6px 11px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255,255,255,.1);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  box-shadow: var(--shadow-md);
}

/* ── CHART ──────────────────────────────────────────── */
.chart-container { position: relative; height: 220px; }

/* ── MINI LIST ROW (birthdays / anniversaries) ──────── */
.mini-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}
.mini-list-row:last-child { border-bottom: none; }
.mini-list-row:hover { background: var(--gray-50); }

.mini-list-info { flex: 1; min-width: 0; }
.mini-list-name {
  font-weight: 700; font-size: 13.5px; color: var(--black);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-list-sub {
  font-size: 11.5px; color: var(--gray-500); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mini-list-date {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 20px;
}
.mini-list-date.pink    { color: var(--black); background: rgba(0,0,0,.06); }
.mini-list-date.gold    { color: var(--gold-dark); background: var(--gold-light); }
.mini-list-date.warning { color: var(--warning-dark); background: var(--warning-light); }
.mini-list-date.purple  { color: var(--purple); background: var(--purple-light); }

/* ── DEPARTMENT ATTENDANCE ROWS ──────────────────────── */
.dept-row { padding: 12px 20px; border-bottom: 1px solid var(--gray-100); }
.dept-row:last-child { border-bottom: none; }
.dept-row-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.dept-name { font-size: 13px; font-weight: 700; color: var(--black); }
.dept-frac { font-size: 12px; font-weight: 700; color: var(--gray-500); font-variant-numeric: tabular-nums; }

/* ── CARD HEADER ICON BADGE (premium) ─────────────────── */
.card-header-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  background: #f5c40000;
  color: var(--black);
}

/* ── LEAVE TREND (horizontal bars) ──────────────────── */
.trend-rows { display: flex; flex-direction: column; gap: 6px; }

.trend-row {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  transition: background var(--transition);
}
.trend-row:hover { background: var(--gray-50); }

.trend-row.is-recent {
  background: rgb(245 196 0);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2);
}
.trend-row.is-recent:hover { background: rgba(0,0,0,.2); }

.trend-month {
  width: 32px; flex-shrink: 0;
  font-size: 12px; font-weight: 700; color: var(--gray-600);
}
.trend-row.is-recent .trend-month { color: #000000; font-weight: 800; }

.trend-bar-track {
  flex: 1; height: 9px;
  background: var(--gray-100);
  border-radius: 99px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.05);
}

.trend-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .7s cubic-bezier(.16,1,.3,1);
}
.trend-bar-fill.past   { background: linear-gradient(90deg, #F5C400, #F5C400); opacity: .8; }
.trend-bar-fill.recent {
    background: #000000;
    box-shadow: 0 0 10px rgba(0, 0, 0, .4);
}

.trend-val {
  width: 28px; flex-shrink: 0;
  text-align: right;
  font-size: 12.5px; font-weight: 800; color: var(--black);
  font-variant-numeric: tabular-nums;
}
.trend-row.is-recent .trend-val { color: #000000; }

.trend-legend {
  display: flex; gap: 18px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(245,196,0,.14);
  font-size: 11.5px; font-weight: 600; color: var(--gray-500);
}

.trend-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.trend-dot.past   { background: #F5C400; }
.trend-dot.recent { background: #000000; }

/* ── FLATICON ───────────────────────────────────────── */
.fi { font-size: 1.1em; vertical-align: middle; }

/* ── PRINT ──────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .page-header .btn, .filters { display: none !important; }
  .main-wrap { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-wrap { margin-left: 0; }
  .hamburger { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .login-right { width: 100%; }
}

@media (max-width: 640px) {
  .page-content { padding: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .punch-times { gap: 12px; }
  .punch-time-box .time { font-size: 18px; }
  .filters { gap: 7px; }
  .login-card { padding: 30px 22px; box-shadow: none; border: none; }
}
