:root {
  --primary: #6c5ce7;
  --primary-dark: #4834a6;
  --primary-light: #efecfd;
  --secondary: #8574e8;
  --accent: #a29bfe;
  --bg: #f0f4f8;
  --sidebar-bg: #6c5ce7;
  --topbar-bg: #ffffff;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --sidebar-width: 240px;
  --sidebar-collapsed: 72px;
  --topbar-height: 66px;
  --radius: 12px;
  --radius-lg: 16px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --sidebar-bg: linear-gradient(180deg, #1a2350 0%, #0f1629 50%, #151c35 100%);
  --topbar-bg: #1a1f3a;
  --card-bg: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border: #334155;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --primary-light: rgba(108, 92, 231, 0.18);
  --primary: #a29bfe;
  --primary-dark: #8574e8;
  --secondary: #b0a4f5;
  --accent: #c3baf7;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.w-100 {
  width: 100%;
}
html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: "Nunito Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition:
    background var(--transition),
    color var(--transition);
}

/* TOPBAR */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 22px;
  box-shadow: var(--shadow-sm);
  transition:
    background var(--transition),
    border-color var(--transition);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  width: var(--sidebar-width);   /* fixed: the logo looks identical whether the sidebar is collapsed or expanded */
  flex-shrink: 0;
}
.topbar-left .logo { flex-shrink: 0; }

.hamburger {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: none;
  background: var(--primary-light);
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all var(--transition);
  flex-shrink: 0;
}

.hamburger:hover {
  background: var(--primary);
  color: #fff;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.35);
}

.logo-text {
  font-family: "Sora", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.logo-text span {
  color: var(--primary);
}

/* Brand logo image (assets/imgs/hr-logo.png) */
.logo-img { height: 38px; width: auto; max-width: none; display: block; flex-shrink: 0; }
@media (max-width: 600px) { .logo-img { height: 30px; } }
.login-brand .login-logo-card {
  background: #fff; border-radius: 20px; padding: 18px 24px;
  box-shadow: 0 18px 40px -14px rgba(10, 8, 60, 0.55);
  display: inline-flex; align-items: center; justify-content: center;
}
.login-brand .login-logo-card img { width: clamp(190px, 20vw, 270px); height: auto; display: block; }
.login-right-logo .brand-img { height: 46px; width: auto; display: inline-block; }

.topbar-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: 4px;
  padding: 9px 18px;
  width: 380px;
  max-width: 100%;
  transition: all var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--text-light);
}

.search-box i {
  color: var(--text-light);
  font-size: 13px;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  max-height: 420px;
  overflow-y: auto;
  z-index: 500;
  padding: 6px;
}
.gsr-section-lbl {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 10px 4px;
}
.gsr-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.gsr-item:hover, .gsr-item.active {
  background: var(--bg);
}
.gsr-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.gsr-item .u-av {
  width: 30px;
  height: 30px;
  font-size: 11px;
}
.gsr-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.gsr-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.gsr-empty {
  padding: 20px 10px;
  text-align: center;
  color: var(--text-light);
  font-size: 12.5px;
}

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

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  position: relative;
  transition: all var(--transition);
}

.icon-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.notif-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--topbar-bg);
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 5px 12px 5px 5px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: all var(--transition);
  position: relative;
  margin-left: 4px;
}

.profile-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.08);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.profile-info {
  line-height: 1.3;
}

.profile-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.profile-role {
  font-size: 11px;
  color: var(--text-muted);
}

.profile-chevron {
  color: var(--text-light);
  font-size: 11px;
  margin-left: 2px;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 400;
  overflow: hidden;
}

.profile-btn.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.dropdown-header .dname {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.dropdown-header .demail {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 1px;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
  border-bottom: 1px solid var(--border);
}

.dropdown-menu a:last-child {
  border-bottom: none;
  color: #ef4444;
}

.dropdown-menu a:hover {
  background: var(--bg);
  color: var(--primary);
}

.dropdown-menu a:last-child:hover {
  background: #fef2f2;
  color: #ef4444;
}

.dropdown-menu a i {
  width: 15px;
}

/* ── Generic page-header "Action" dropdown (e.g. Users page) ──────── */
.action-menu-wrap {
  position: relative;
  display: inline-block;
}

.action-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 400;
  overflow: hidden;
}

.action-menu-wrap.open .action-menu-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.action-menu-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
  border-bottom: 1px solid var(--border);
}

.action-menu-list a:last-child {
  border-bottom: none;
}

.action-menu-list a:hover {
  background: var(--bg);
  color: var(--primary);
}

.action-menu-list a i {
  width: 15px;
  text-align: center;
}

/* NOTIFICATION PANEL */
.notif-wrap {
  position: relative;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  overflow: hidden;
}

.notif-wrap.open .notif-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notif-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-header .ntitle {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.notif-header .nmark {
  font-size: 11.5px;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
}

.notif-item {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.notif-item:hover {
  background: var(--bg);
}

.notif-item:last-child {
  border-bottom: none;
}

.ndot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 5px;
}

.ndot.read {
  background: var(--border);
}

.ntext {
  font-size: 12.5px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
}

.ntime {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

.sidebar {
  position: fixed;
  left: 0;
  top: var(--topbar-height);
  bottom: 0;
  z-index: 150;
  width: var(--sidebar-width);
  background: var(--card-bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  transition:
    width var(--transition),
    background var(--transition),
    border-color var(--transition);
  display: flex;
  flex-direction: column;
  padding-bottom: 5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar.collapsed::-webkit-scrollbar {
  display: none;
}

/* When collapsed, allow flyout to overflow sidebar bounds */
.sidebar.collapsed .nav-item {
  overflow: visible;
}

.sidebar-nav {
  padding: 14px 0;
  flex: 1;
}

.nav-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--text-light);
  padding: 10px 20px 5px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--transition);
}

.sidebar.collapsed .nav-label {
  opacity: 0;
  pointer-events: none;
  display: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 16px;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  border-radius: 4px;
  margin: 2px 8px;
  transition: all 0.2s ease;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  position: relative;
  border: none;
  background: transparent;
  width: calc(100% - 16px);
  font-family: inherit;
}

.nav-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 6px 16px -4px rgba(108, 92, 231, 0.5);
}

.nav-link.active .nav-indicator {
  display: none;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.nav-text {
  flex: 1;
  transition: opacity var(--transition);
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.sidebar.collapsed .nav-text {
  opacity: 0;
  pointer-events: none;
  display: none;
}

.nav-chevron {
  font-size: 10px;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.nav-item.open > .nav-link .nav-chevron {
  transform: rotate(90deg);
}

.sidebar.collapsed .nav-chevron {
  opacity: 0;
  display: none;
}

.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.nav-item.open > .submenu {
  max-height: 200px;
}

.sidebar.collapsed .submenu {
  max-height: 0 !important;
}

.sub-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 48px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  margin: 1px 8px;
  transition: all 0.18s;
}

.sub-link::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-light);
  flex-shrink: 0;
  transition: background 0.2s;
}

.sub-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.sub-link:hover::before,
.sub-link.active::before {
  background: var(--primary);
}

.sub-link.active {
  font-weight: 700;
}

/* Tooltip for collapsed sidebar */
.nav-item .tip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #1e293b;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 999;
}

/* Only show simple tooltip when nav item has NO submenu */
.sidebar.collapsed .nav-item:not(.has-sub):hover .tip {
  opacity: 1;
}

/* Flyout panel for items with submenu when collapsed */
.collapsed-flyout {
  position: fixed;
  left: calc(var(--sidebar-collapsed) + 8px);
  background: #4834a6;
  border-radius: 10px;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  z-index: 9999;
  padding: 6px 0;
}

.collapsed-flyout .flyout-title {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 14px 4px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.collapsed-flyout .flyout-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s;
  white-space: nowrap;
}

.collapsed-flyout .flyout-link::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  transition: background 0.2s;
}

.collapsed-flyout .flyout-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.collapsed-flyout .flyout-link:hover::before {
  background: #fff;
}

/* Also flyout for nav items with NO submenu (shows just the name) */
.collapsed-flyout.simple {
  padding: 8px 14px;
}

.collapsed-flyout.simple .flyout-title {
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: #fff;
}

.sidebar.collapsed .nav-item:hover .collapsed-flyout,
.sidebar.collapsed .nav-item .collapsed-flyout:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.collapsed-flyout::before {
  content: "";
  position: absolute;
  top: 0;
  left: -12px;
  width: 12px;
  height: 100%;
}

.sidebar.collapsed .nav-item:has(.collapsed-flyout:hover) .collapsed-flyout {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sidebar:not(.collapsed) .collapsed-flyout {
  display: none;
}

/* No sidebar animation while a page is loading (class is removed by header.php after first paint) */
html.sb-no-anim .sidebar,
html.sb-no-anim .sidebar *,
html.sb-no-anim .main-wrapper {
  transition: none !important;
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 11px;
  overflow: hidden;
  position: fixed;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--card-bg);
}

.sf-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.sf-text {
  transition: opacity var(--transition);
  min-width: 0;
}

.sidebar.collapsed .sf-text {
  opacity: 0;
}

.sf-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sf-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* Dark mode sidebar styles */
[data-theme="dark"] .sidebar {
  border-right-color: var(--border);
}

[data-theme="dark"] .collapsed-flyout {
  background: #16233f;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .nav-link:hover {
  background: rgba(162, 155, 254, 0.14);
  color: #c9c2fb;
}

[data-theme="dark"] .nav-link.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
}

[data-theme="dark"] .sub-link:hover {
  background: rgba(162, 155, 254, 0.1);
  color: #c9c2fb;
}

.main-wrapper {
  margin-left: var(--sidebar-width);
  transition: margin-left var(--transition);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar.collapsed ~ .main-wrapper {
  margin-left: var(--sidebar-collapsed);
}

.main-content {
  margin-top: var(--topbar-height);
  padding: 16px 16px 48px;
  flex: 1;
}

/* WELCOME */
.welcome-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.welcome-text h1 {
  font-family: "Sora", sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
}

.welcome-text p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.welcome-actions {
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(108, 92, 231, 0.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(108, 92, 231, 0.55);
}

.btn-outline {
  background: var(--bg);
  color: var(--text-muted);
  border: 1.5px solid transparent;
}

.btn-outline:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: 6px;
  padding: 18px;
  box-shadow: var(--shadow);
  border: none;
  position: relative;
  overflow: hidden;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}

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

.stat-card::after {
  content: none;
}

.sc1::after {
  background: #6c5ce7;
}

.sc2::after {
  background: #10b981;
}

.sc3::after {
  background: #ef4444;
}

.sc4::after {
  background: #f59e0b;
}

.sc5::after {
  background: #8b5cf6;
}

.sc6::after {
  background: #f59e0b;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
  order: 1;
}

.sc1 .stat-icon {
  background: rgba(108, 92, 231, 0.12);
  color: #6c5ce7;
}

.sc2 .stat-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.sc3 .stat-icon {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.sc4 .stat-icon {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.sc5 .stat-icon {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.sc6 .stat-icon {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.stat-count {
  font-family: "Sora", sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 10px;
  order: 3;
}

.stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
  order: 2;
}

.stat-trend {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  order: 4;
}

.stat-trend::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.trend-up {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.trend-down {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* BOTTOM GRID */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 15px;
  align-items: start;
}

/* CARD */
.card {
  background: var(--card-bg);
  border-radius: 6px;
  border: none;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition:
    background var(--transition),
    box-shadow var(--transition);
}

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

.card-title {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* TABS */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 5px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.tab {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
  border: none;
  background: transparent;
  font-family: inherit;
}

.tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.28);
}

/* TABLE CONTROLS */
.table-controls {
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.srch {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: 4px;
  padding: 9px 16px;
  flex: 1;
  min-width: 160px;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}

.srch:focus-within {
  border-color: var(--primary);
  background: var(--card-bg);
}

.srch input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  width: 100%;
}

.srch input::placeholder {
  color: var(--text-light);
}

.fsel {
  padding: 9px 36px 9px 14px;
  border: 1.5px solid transparent;
  border-radius: 4px;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  outline: none;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}

.fsel:focus {
  border-color: var(--primary);
  background-color: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

/* DATA TABLE */
.tbl-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.data-table th {
  padding: 13px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.2px;
  color: var(--text-muted);
  background: var(--bg);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: var(--primary-light);
}

.emp-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}

.emp-name {
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.emp-id {
  font-size: 11px;
  color: var(--text-light);
}

.s-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.s-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.sp {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.sa {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.sl {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

/* PAGINATION */
.pagination {
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.pinfo {
  font-size: 12.5px;
  color: var(--text-muted);
}

.pbtns {
  display: flex;
  gap: 5px;
}

.pb {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.pb.on {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pb:hover:not(.on) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* CHART CARD */
.chart-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.csec {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.csec:last-child {
  border-bottom: none;
}

.clabel {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.clabel span:last-child {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
}

.cwrap {
  position: relative;
  height: 160px;
}
.cwrap.cwrap-bar {
  height: 130px;
}

.donut-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.donut-overlay .dval {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.donut-overlay .dlbl {
  font-size: 11px;
  color: var(--text-light);
}

.legend {
  display: flex;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.ldot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* FOOTER */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg);
  color: var(--text-muted);
  text-align: right;
  padding: 10px 25px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ANIMATIONS */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card {
  animation: fadeInUp 0.5s ease both;
}

.stat-card:nth-child(1) {
  animation-delay: 0.04s;
}

.stat-card:nth-child(2) {
  animation-delay: 0.08s;
}

.stat-card:nth-child(3) {
  animation-delay: 0.12s;
}

.stat-card:nth-child(4) {
  animation-delay: 0.16s;
}

.stat-card:nth-child(5) {
  animation-delay: 0.2s;
}

.bottom-grid > * {
  animation: fadeInUp 0.5s ease both;
}

.bottom-grid > *:nth-child(2) {
  animation-delay: 0.12s;
}

/* OVERLAY (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 140;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

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

/* Page Header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 14px;
}

.page-header-left .page-title {
  font-family: "Sora", sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-header-left .page-title i {
  width: 38px;
  height: 38px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.page-header-left .page-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 0;
  margin-left: 48px;
}

.page-header-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Stat Strip */
.user-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.user-stat-strip.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.user-stat-strip.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.ustat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.22s,
    box-shadow 0.22s;
}

.ustat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.ustat-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.ustat-icon.blue {
  background: rgba(108, 92, 231, 0.12);
  color: #6c5ce7;
}

.ustat-icon.green {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.ustat-icon.orange {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.ustat-icon.purple {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.ustat-val {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.ustat-lbl {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
}

/* Users Card */
.users-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

/* Table area clips its own corners to match the card — kept separate from
   .users-card itself so dropdowns opened from the toolbar above (date
   picker, filters) are free to overflow the card instead of being clipped. */
.users-tbl-wrap {
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}

/* Bulk Action Bar */
.bulk-bar {
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  display: none;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 700;
}

.bulk-bar.visible {
  display: flex;
}

.bulk-bar .bulk-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.bulk-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.bulk-btn {
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.18s;
}

.bulk-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.bulk-btn.danger {
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.bulk-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Toolbar */
.users-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.users-toolbar .srch {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 14px;
  min-width: 200px;
  flex: 1;
  transition: border-color 0.2s;
}

.users-toolbar .srch:focus-within {
  border-color: var(--primary);
}

.users-toolbar .srch input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  width: 100%;
}

.users-toolbar .srch input::placeholder {
  color: var(--text-light);
}

.users-toolbar .srch i {
  color: var(--text-light);
  font-size: 12px;
  flex-shrink: 0;
}

.users-toolbar .fsel {
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.users-toolbar .fsel:focus {
  border-color: var(--primary);
}

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

.view-toggle {
  display: flex;
  gap: 3px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 3px;
}

.vbtn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}

.vbtn.active {
  background: var(--card-bg);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Users Table */

.users-tbl-wrap.hidden {
  display: none;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.users-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-light);
  background: var(--bg);
  white-space: nowrap;
}

.users-table th.sortable {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.users-table th.sortable:hover {
  color: var(--primary);
}

.users-table th .sort-icon {
  margin-left: 4px;
  opacity: 0.4;
  font-size: 9px;
}

.users-table th.sorted .sort-icon {
  opacity: 1;
  color: var(--primary);
}

.users-table td {
  padding: 13px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  color: var(--text-muted);
  white-space: nowrap;
}

.users-table tr:last-child td {
  border-bottom: none;
}

.users-table tbody tr:hover td {
  background: var(--primary-light);
}

/* User Cell */
.user-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}

.u-av,
.user-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  position: relative;
}

.u-av .online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--card-bg);
}

.u-name {
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}

.u-email {
  font-size: 11.5px;
  color: var(--text-light);
}

/* Role Badge */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.role-badge i {
  font-size: 10px;
}

.rb-admin {
  background: rgba(108, 92, 231, 0.12);
  color: #6c5ce7;
}

.rb-hr {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.rb-manager {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.rb-emp {
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.pill-active {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.pill-inactive {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.pill-pending {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

/* Action Buttons */
.action-btns {
  display: flex;
  gap: 6px;
  opacity: 1;
  transition: opacity 0.15s;
}

.users-table tbody tr:hover .action-btns {
  opacity: 1;
}

.act-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}

.act-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.act-btn.del:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

/* Checkbox */
.chk {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Grid View */
.users-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  padding: 20px;
}

.users-grid.active {
  display: grid;
}

.user-grid-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.22s;
  cursor: pointer;
}

.user-grid-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.ugc-av {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 12px;
  position: relative;
}

.ugc-av .online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--bg);
}

.ugc-name {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}

.ugc-desig {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ugc-dept {
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 2px;
}

.ugc-badges {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.ugc-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Empty State */
.empty-state {
  padding: 60px 20px;
  text-align: center;
}

.empty-state i {
  font-size: 40px;
  color: var(--border);
  margin-bottom: 14px;
  display: block;
}

.empty-state .es-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.empty-state .es-sub {
  font-size: 13px;
  color: var(--text-light);
}

/* ══════════════════════════════════════════════════════════════
   CREATIVE TIME PICKER — an analog "watch" face replacing every
   native <input type="time"> in the app. See assets/js/script.js
   for the logic; this just styles the popover + clock face.
   ══════════════════════════════════════════════════════════════ */
.ctp-input { cursor: pointer; background-image: none !important; }
.ctp-input::placeholder { color: var(--text-light, #94a3b8); }

.ctp-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  z-index: 10000; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
  padding: 20px;
}
.ctp-backdrop.open { opacity: 1; visibility: visible; }

.ctp-card {
  background: var(--card-bg, #fff); border-radius: 22px; width: 300px; max-width: 100%;
  box-shadow: 0 30px 70px -20px rgba(15,23,42,0.4); overflow: hidden;
  transform: scale(.92) translateY(10px); transition: transform .22s cubic-bezier(.2,.9,.25,1.2);
  font-family: inherit;
}
.ctp-backdrop.open .ctp-card { transform: scale(1) translateY(0); }

.ctp-header {
  background: linear-gradient(135deg, var(--primary, #6c5ce7), #4834a6);
  color: #fff; padding: 20px 24px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-family: "Outfit", sans-serif;
}
.ctp-header-part { font-size: 34px; font-weight: 800; cursor: pointer; opacity: 0.55; padding: 2px 4px; border-radius: 8px; transition: opacity .15s; }
.ctp-header-part.active { opacity: 1; }
.ctp-header-sep { font-size: 34px; font-weight: 800; opacity: 0.7; }
.ctp-header-ampm { display: flex; flex-direction: column; margin-left: 10px; gap: 2px; }
.ctp-ampm-btn { background: rgba(255,255,255,0.15); border: none; color: rgba(255,255,255,0.7); font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px; cursor: pointer; font-family: "Outfit", sans-serif; }
.ctp-ampm-btn.active { background: #fff; color: var(--primary, #6c5ce7); }

.ctp-face-wrap { padding: 26px 20px 8px; display: flex; align-items: center; justify-content: center; }
.ctp-face {
  position: relative; width: 220px; height: 220px; border-radius: 50%;
  background: var(--bg, #f4f6fb); flex-shrink: 0;
}
.ctp-face-center { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--primary, #6c5ce7); top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 3; }
.ctp-face-hand {
  position: absolute; width: 2px; background: var(--primary, #6c5ce7); bottom: 50%; left: 50%;
  transform-origin: bottom center; z-index: 2; border-radius: 2px; transition: transform .18s cubic-bezier(.3,.8,.4,1), height .18s;
}
.ctp-face-num {
  position: absolute; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--text, #101a33); cursor: pointer; z-index: 2;
  transition: background .15s, color .15s, transform .1s; user-select: none; -webkit-user-select: none;
}
.ctp-face-num:active { transform: scale(0.92); }
.ctp-face-num.selected { background: var(--primary, #6c5ce7); color: #fff; }

/* exact-minute watch: drag/tap on the face + hour/minute adjust buttons */
.ctp-card { max-height: 96vh; overflow-y: auto; }
.ctp-face { touch-action: none; cursor: pointer; }
.ctp-face.dragging .ctp-face-hand { transition: none; }
.ctp-face-num { pointer-events: none; cursor: default; }
.ctp-face-hand::after {
  content: ''; position: absolute; top: -4px; left: 50%; width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: var(--primary, #6c5ce7); box-shadow: 0 0 0 3px rgba(108, 92, 231, .22);
}
.ctp-tick { position: absolute; left: 50%; top: 2px; width: 2px; height: 5px; margin-left: -1px; background: #cdd2e4; border-radius: 1px; transform-origin: 50% 108px; pointer-events: none; }
.ctp-tick.big { height: 8px; background: #9aa3c0; }
.ctp-hint { text-align: center; font-size: 11px; color: var(--text-muted, #7a8299); padding: 2px 16px 0; }
.ctp-adjust { display: flex; gap: 10px; padding: 12px 16px 0; }
.ctp-adj-grp { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ctp-adj-lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted, #7a8299); }
.ctp-adj-ctl { display: flex; align-items: center; justify-content: space-between; width: 100%; background: var(--bg, #f4f6fb); border-radius: 12px; padding: 4px; }
.ctp-adj-btn { width: 36px; height: 36px; border: none; border-radius: 9px; background: var(--card-bg, #fff); color: var(--primary, #6c5ce7); font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(15, 23, 42, .1); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.ctp-adj-btn:active { transform: scale(.92); }
.ctp-adj-val { font-family: "Outfit", sans-serif; font-weight: 800; font-size: 18px; color: var(--text, #101a33); min-width: 30px; text-align: center; }
.ctp-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 20px; }
.ctp-btn { border: none; background: transparent; font-family: "Outfit", sans-serif; font-weight: 700; font-size: 13.5px;
  color: var(--text-muted, #7a8299); padding: 9px 16px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.ctp-btn:hover { background: var(--bg, #f4f6fb); }
.ctp-btn.ctp-ok { color: var(--primary, #6c5ce7); }

@media (max-width: 480px) {
  .ctp-backdrop { align-items: flex-end; padding: 0; }
  .ctp-card { width: 100%; border-radius: 24px 24px 0 0; transform: translateY(100%); }
  .ctp-backdrop.open .ctp-card { transform: translateY(0); }
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--card-bg);
  border: none;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  width: 540px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}

/* ── Every modal opens as a right-side sliding drawer, full viewport
   height (flush against the top, right, and bottom edges), with only
   the inner-left corners rounded. Scoped to >600px so the existing
   mobile bottom-sheet layout further down is untouched on phones. */
@media (min-width: 601px) {
  .modal-backdrop {
    justify-content: flex-end;
    align-items: stretch;
  }
  .modal {
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    border-radius: 10px 0 0 10px;
    display: flex;
    flex-direction: column;
    transform: translateX(120%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .modal-backdrop.open .modal {
    transform: translateX(0);
  }
  .modal-header {
    border-radius: 10px 0 0 0 !important;
    flex-shrink: 0;
  }
  .modal-body {
    flex: 1;
    overflow-y: auto;
  }
  .modal-footer,
  .modal-tab-footer {
    flex-shrink: 0;
    border-radius: 0 0 0 10px;
  }
}

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

.modal-title {
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}

.modal-close:hover {
  color: #fff;
  background: var(--primary);
}

.modal-body {
  padding: 22px 26px;
}

.modal-footer {
  padding: 16px 26px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Form */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.1px;
}

.form-label .req {
  color: #ef4444;
  margin-left: 2px;
}

.form-input,
.form-select {
  padding: 10px 16px;
  border: 1.5px solid transparent;
  border-radius: 4px;
  background: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background-color 0.2s;
  cursor: pointer;
  width: 100%;
}
.form-input {
  background-image: none;
}
.form-input:focus,
.form-select:focus {
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

/* Required field error highlight */
.form-input.field-error,
.form-select.field-error {
  border-color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.04) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
  animation: shake 0.35s ease;
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-5px);
  }
  40% {
    transform: translateX(5px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-hint {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

/* Avatar Upload */
.avatar-upload {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.avatar-upload:hover {
  border-color: var(--primary);
}

/* ── Aadhar front/back upload slots ── */
.aadhar-upload-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: var(--bg);
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  margin-bottom: 8px;
  position: relative;
}
.aadhar-upload-slot:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.aadhar-upload-slot.slot-done {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}
.aadhar-upload-slot.slot-done .aus-icon {
  color: #10b981;
}
.aus-icon {
  font-size: 22px;
  color: var(--primary);
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}
.aus-text {
  flex: 1;
  min-width: 0;
}
.aus-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.aus-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aus-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.avatar-upload-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

/* Default avatar (no photo uploaded yet): neutral person icon instead of initials */
.avatar-upload-img.is-default,
.avatar-upload-img:has(> i.fa-user) {
  background: var(--bg, #f1f5f9);
  color: var(--text-light, #94a3b8);
  border: 2px dashed var(--border, #d1d5db);
  font-size: 22px;
}

.avatar-upload-text .aup-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.avatar-upload-text .aup-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Permissions */
.perm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.perm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  transition: all 0.18s;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.perm-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.perm-item input {
  accent-color: var(--primary);
}
.grid-custom {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
/* Responsive */
@media (max-width: 1100px) {
  .user-stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .perm-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-right {
    margin-left: 0;
  }

  .user-stat-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .page-header {
    flex-direction: column;
  }
}

/* RESPONSIVE */
@media (max-width: 1320px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1280px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-box {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .hamburger { display: none !important; }

  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0 !important;
  }

  .topbar-center {
    display: none;
  }

  .main-content {
    padding: 18px 14px 84px;
  }
  .grid-custom {
    grid-template-columns: 1fr;
  }

  /* ── Mobile bottom nav (replaces the hamburger/sidebar-toggle) ── */
  .mobile-bottom-nav {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    z-index: 130;
  }
  .mbn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 2px; border-radius: 6px; cursor: pointer; border: none; background: none;
    color: var(--text-muted); font-size: 10.5px; font-family: inherit;
  }
  .mbn-item i { font-size: 17px; }
  .mbn-item.active { color: var(--primary); }
}
@media (min-width: 769px) {
  .mobile-bottom-nav { display: none !important; }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .profile-info {
    display: none;
  }

  .welcome-actions .btn-outline {
    display: none;
  }

  .topbar-right > a.btn[href="mobile_checkin.php"] {
    padding: 8px 10px !important;
  }
  .topbar-right > a.btn[href="mobile_checkin.php"] span,
  .topbar-right > a.btn[href="mobile_checkin.php"] {
    font-size: 0;
  }
  .topbar-right > a.btn[href="mobile_checkin.php"] i {
    font-size: 15px;
  }
}

/* ============================================================
   SIDEBAR LOGO AREA
   ============================================================ */
.sidebar-logo-area {
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  overflow: hidden;
}

.sb-logo-full {
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity var(--transition),
    transform var(--transition);
}

.sb-logo-full img {
  width: 140px;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.sb-logo-mini {
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
}

.sb-logo-mini img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
}

/* When collapsed: hide full, show mini */
.sidebar.collapsed .sb-logo-full {
  display: none;
}
.sidebar.collapsed .sb-logo-mini {
  display: flex;
}

/* ============================================================
   NAV MINI LABEL (shown below icon when collapsed)
   ============================================================ */
.nav-mini-label {
  display: none;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.3px;
  margin-top: 2px;
  padding: 0 4px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: var(--sidebar-collapsed);
}

.sidebar.collapsed .nav-mini-label {
  display: block;
}
.sidebar.collapsed .nav-link {
  margin-bottom: 4px;
  margin-top: 10px;
  flex-direction: column;
  gap: 2px;
  padding: 8px 4px;
  justify-content: center;
}
.sidebar.collapsed .nav-icon {
  width: 24px;
  height: 24px;
  font-size: 17px;
}

/* ============================================================
   ACTIVE STATE — auto-set via JS
   (Sidebar background is light, so active states use the primary
   brand color instead of white-on-white overlays.)
   ============================================================ */
.sub-link.active {
  background: var(--primary-light);
  color: var(--primary) !important;
}
.sub-link.active::before {
  background: var(--primary) !important;
}

/* nav-item active — for parent when child page is active */
.nav-item.parent-active > .nav-link:not(.active) {
  background: var(--primary-light);
  color: var(--primary);
}

/* ============================================================
   EMPLOYEE ADD MODAL — TABBED (4 sections)
   ============================================================ */
.emp-modal-tabs {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 0 0 20px;
  padding: 5px;
  overflow-x: auto;
  gap: 4px;
  scrollbar-width: none;
}
.emp-modal-tabs::-webkit-scrollbar {
  display: none;
}

.emp-tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.2s;
}

.emp-tab-btn i {
  font-size: 13px;
}

.emp-tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.28);
}

.emp-tab-btn .tab-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  transition: all 0.2s;
}

.emp-tab-btn.active .tab-num {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.emp-tab-btn.done .tab-num {
  background: #10b981;
  color: #fff;
}

.emp-tab-panel {
  display: none;
}
.emp-tab-panel.active {
  display: block;
}

.section-divider {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 16px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* Modal wider for employee/expense/appraisal forms */
.modal.modal-lg {
  width: 680px;
}

/* Add/Edit Employee modal — 25% wider than the standard modal-lg (680px),
   since its form has noticeably more fields than the others sharing modal-lg. */
#empModal .modal.modal-lg {
  width: 850px;
}

/* Tab nav footer */
.modal-tab-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* User View Details Panel */
.user-details-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.udp-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.udp-av {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.udp-info .udp-name {
  font-family: "Sora", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.udp-info .udp-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

.udp-badges {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.udp-tabs {
  display: flex;
  gap: 3px;
  background: var(--bg);
  padding: 3px;
  border-radius: 4px;
  border: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.udp-tabs::-webkit-scrollbar {
  display: none;
}

.udp-tab {
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  border: none;
  background: transparent;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.2s;
}

.udp-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.28);
}

.udp-section {
  display: none;
}
.udp-section.active {
  display: block;
}

.udp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.udp-field {
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 9px;
  border: 1px solid var(--border);
}

.udp-field-lbl {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 4px;
}

.udp-field-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.udp-field-val.empty {
  color: var(--text-light);
  font-weight: 400;
  font-style: italic;
}

/* Modal view wider */
.modal.modal-view {
  width: 620px;
}

/* ============================================================
   ATTENDANCE, LEAVE & PAYROLL — SHARED NEW STYLES
   ============================================================ */

/* Red ustat icon */
.ustat-icon.red {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* Calendar Grid */
.att-calendar-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cal-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}
.cal-nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.cal-month-title {
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  min-width: 160px;
  text-align: center;
}

.cal-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.cal-leg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.cal-leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-grid-wrap {
  padding: 16px 20px 20px;
}
.cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 8px;
}
.cal-day-name {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 6px 0;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: default;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg);
  border: 1.5px solid transparent;
  transition: all 0.18s;
  position: relative;
  min-height: 44px;
}
.cal-cell:hover {
  border-color: var(--primary);
}
.cal-cell.empty {
  background: transparent;
  cursor: default;
}
.cal-cell.today {
  border-color: var(--primary);
  color: var(--primary);
}
.cal-cell.present {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.cal-cell.absent {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.cal-cell.leave {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}
.cal-cell.holiday {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}
.cal-cell.weekend {
  background: transparent;
  color: var(--text-light);
  opacity: 0.5;
}
.cal-cell.future {
  background: transparent;
  color: var(--text-light);
  opacity: 0.4;
}
.cal-cell-date {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.cal-cell-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-top: 3px;
}

/* Attendance Row Punch details */
.punch-time {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.punch-sub {
  font-size: 11px;
  color: var(--text-light);
}
.hours-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(108, 92, 231, 0.1);
  color: var(--primary);
}
.hours-badge.late {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}
.hours-badge.short {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Attendance summary mini cards */
.att-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

/* ---- LEAVE PAGE ---- */
.leave-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  margin-bottom: 60px;
}

/* Leave balance cards */
.leave-balance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.lb-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.lb-card::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  opacity: 0.08;
}
.lb-card.sick::after {
  background: #ef4444;
}
.lb-card.casual::after {
  background: #f59e0b;
}
.lb-card.annual::after {
  background: #6c5ce7;
}
.lb-card.comp::after {
  background: #10b981;
}
.lb-card.mat::after {
  background: #8b5cf6;
}
.lb-card.pat::after {
  background: #a29bfe;
}

.lb-type {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}
.lb-type.sick {
  color: #ef4444;
}
.lb-type.casual {
  color: #f59e0b;
}
.lb-type.annual {
  color: #6c5ce7;
}
.lb-type.comp {
  color: #10b981;
}
.lb-type.mat {
  color: #8b5cf6;
}
.lb-type.pat {
  color: #a29bfe;
}

.lb-nums {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.lb-used {
  font-family: "Sora", sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.lb-of {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 3px;
}
.lb-total {
  font-family: "Sora", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1;
}
.lb-bar {
  margin-top: 10px;
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.lb-fill.sick {
  background: #ef4444;
}
.lb-fill.casual {
  background: #f59e0b;
}
.lb-fill.annual {
  background: #6c5ce7;
}
.lb-fill.comp {
  background: #10b981;
}
.lb-fill.mat {
  background: #8b5cf6;
}
.lb-fill.pat {
  background: #a29bfe;
}
.lb-rem {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 600;
}

/* Leave request sidebar panel */
.leave-req-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.leave-req-panel .panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.leave-req-panel .panel-title {
  font-family: "Sora", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.leave-req-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: background 0.15s;
  cursor: pointer;
}
.leave-req-item:hover {
  background: var(--bg);
}
.leave-req-item:last-child {
  border-bottom: none;
}
.lri-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.lri-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.lri-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.lri-days {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}
.lri-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.lri-btn {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.18s;
}
.lri-btn.approve {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.lri-btn.approve:hover {
  background: #10b981;
  color: #fff;
}
.lri-btn.reject {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}
.lri-btn.reject:hover {
  background: #ef4444;
  color: #fff;
}

/* Leave type badge */
.leave-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.lt-sick {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.lt-casual {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}
.lt-annual {
  background: rgba(108, 92, 231, 0.1);
  color: #6c5ce7;
}
.lt-comp {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}
.lt-mat {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}
.lt-pat {
  background: rgba(162, 155, 254, 0.1);
  color: #a29bfe;
}

/* Leave status badge */
.ls-approved {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}
.ls-pending {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}
.ls-rejected {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* ---- PAYROLL PAGE ---- */

.payslip-preview {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 100%;
}
.payslip-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 16px;
}
.payslip-logo {
  font-family: "Sora", sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}
.payslip-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.payslip-emp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.payslip-field {
  font-size: 12px;
}
.payslip-field-lbl {
  color: var(--text-light);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
}
.payslip-field-val {
  color: var(--text);
  font-weight: 700;
  margin-top: 2px;
}
.payslip-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
  font-size: 12.5px;
}
.payslip-table th {
  background: var(--bg);
  padding: 7px 10px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.7px;
}
.payslip-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.payslip-table td:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--text);
}
.payslip-table tr:last-child td {
  border-bottom: none;
}
.payslip-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--primary);
  border-radius: 9px;
  margin-bottom: 10px;
}
.payslip-total-lbl {
  font-size: 13px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85);
}
.payslip-total-amt {
  font-family: "Sora", sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}
.payslip-foot {
  font-size: 10.5px;
  color: var(--text-light);
  text-align: center;
  font-weight: 600;
}

/* Payroll run bar */
.prb-actions {
  display: flex;
  gap: 10px;
}
.btn-white {
  background: #fff;
  color: var(--primary);
  border: none;
}
.btn-white:hover {
  background: #f0f4f8;
  transform: translateY(-2px);
}
.btn-white-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}
.btn-white-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Salary component breakdown bar */
.sal-breakdown {
  margin-top: 4px;
}
.sal-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 4px;
}
.sal-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--primary);
}

/* CTC chip */
.ctc-chip {
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* ============================================================
   HOLIDAYS PAGE
   ============================================================ */
.holiday-year-bar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.35);
  flex-wrap: wrap;
  gap: 14px;
}
.holiday-year-bar .prb-title {
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.holiday-year-bar .prb-sub {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
}
.holiday-year-bar .prb-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.holiday-year-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.holiday-year-nav button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}
.holiday-year-nav button:hover {
  background: rgba(255, 255, 255, 0.35);
}
.holiday-year-nav span {
  font-family: "Sora", sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  min-width: 50px;
  text-align: center;
}

.holiday-grid-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}
@media (max-width: 900px) {
  .holiday-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* Calendar Grid */
.holiday-calendar-card {
  background: var(--card-bg);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.hc-month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}
@media (max-width: 700px) {
  .hc-month-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.hc-month {
  background: var(--card-bg);
  padding: 14px;
}
.hc-month-title {
  font-family: "Sora", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.hc-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.hc-day-hdr {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-light);
  text-align: center;
  padding: 2px 0;
  text-transform: uppercase;
}
.hc-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.hc-day {
  font-size: 10.5px;
  text-align: center;
  padding: 4px 2px;
  border-radius: 5px;
  cursor: default;
  color: var(--text-muted);
  line-height: 1;
}
.hc-day.today {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}
.hc-day.holiday {
  background: #fee2e2;
  color: #dc2626;
  font-weight: 700;
  border-radius: 5px;
}
.hc-day.sunday {
  color: #ef4444;
}
.hc-day.empty {
  opacity: 0;
  pointer-events: none;
}

/* Holiday List Panel */
.holiday-list-card {
  background: var(--card-bg);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.holiday-list-header {
  padding: 18px 20px 0;
  border-bottom: 1px solid var(--border);
}
.holiday-list-header .card-title {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.holiday-list-header .card-sub {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
  padding-bottom: 14px;
}
.holiday-list-body {
  padding: 14px;
  flex: 1;
  overflow-y: auto;
  max-height: 600px;
}
.holiday-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.15s;
  cursor: default;
  margin-bottom: 4px;
}
.holiday-item:hover {
  background: var(--bg);
}
.holiday-item.past {
  opacity: 0.55;
}
.hi-date {
  min-width: 44px;
  text-align: center;
  background: var(--primary-light);
  border-radius: 8px;
  padding: 6px 4px;
}
.hi-date-day {
  font-family: "Sora", sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.hi-date-mon {
  font-size: 9px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hi-info {
  flex: 1;
}
.hi-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.hi-type {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}
.hi-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  white-space: nowrap;
}
.hi-badge.national {
  background: #fee2e2;
  color: #dc2626;
}
.hi-badge.regional {
  background: #fef3c7;
  color: #d97706;
}
.hi-badge.optional {
  background: #e0f2fe;
  color: #0284c7;
}
.hi-badge.restricted {
  background: #f3e8ff;
  color: #7c3aed;
}
.hi-badge.upcoming {
  background: var(--primary-light);
  color: var(--primary);
}

/* Holiday add modal specifics reuse existing modal classes */
.holiday-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.holiday-type-btn {
  border: 1.5px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  background: var(--card-bg);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.holiday-type-btn:hover,
.holiday-type-btn.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.holiday-type-btn .htb-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.holiday-type-btn .htb-desc {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ============================================================
   DOCUMENTS PAGE
   ============================================================ */
.doc-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 700px) {
  .doc-stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

.doc-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
}
@media (max-width: 800px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }
}

/* Folder sidebar */
.doc-folders-card {
  background: var(--card-bg);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  padding: 16px;
  height: fit-content;
}
.doc-folders-title {
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.doc-folder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 2px;
}
.doc-folder-item:hover {
  background: var(--bg);
}
.doc-folder-item.active {
  background: var(--primary-light);
}
.doc-folder-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.doc-folder-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.doc-folder-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  background: var(--bg);
  padding: 2px 7px;
  border-radius: 99px;
}
.doc-folder-item.active .doc-folder-name {
  color: var(--primary);
}
.doc-folder-item.active .doc-folder-count {
  background: var(--primary);
  color: #fff;
}

/* Document area */
.doc-area-card {
  background: var(--card-bg);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}
.doc-area-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.doc-area-title {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.doc-area-sub {
  font-size: 12px;
  color: var(--text-light);
}

/* Document cards grid */
.doc-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 16px 20px;
}
.doc-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
}
.doc-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-card-meta {
  font-size: 11px;
  color: var(--text-light);
}
.doc-card-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  margin-top: 6px;
}
.doc-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.doc-card:hover .doc-card-actions {
  opacity: 1;
}
.doc-card-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.15s;
}
.doc-card-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* Doc table view */
.doc-table-wrap {
  padding: 0 20px 16px;
}

/* Doc type colors */
.dtype-pdf {
  background: #fee2e2;
  color: #dc2626;
}
.dtype-doc {
  background: #dbeafe;
  color: #1d4ed8;
}
.dtype-xls {
  background: #dcfce7;
  color: #16a34a;
}
.dtype-img {
  background: #fef3c7;
  color: #d97706;
}
.dtype-ppt {
  background: #fce7f3;
  color: #be185d;
}
.dtype-zip {
  background: #f3e8ff;
  color: #7c3aed;
}
.dtype-other {
  background: var(--bg);
  color: var(--text-muted);
}

/* Upload drop zone */
.doc-dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}
.doc-dropzone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.doc-dropzone-icon {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 10px;
}
.doc-dropzone-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.doc-dropzone-sub {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ============================================================
   REPORTS PAGE
   ============================================================ */

/* Report Sub-Nav Tabs */
.report-subnav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.report-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.report-tab-btn i {
  font-size: 14px;
}
.report-tab-btn:hover {
  background: var(--bg);
  color: var(--text);
}
.report-tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(108, 92, 231, 0.3);
}

/* Report Filter Bar */
.report-filter-bar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.report-filter-bar label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.report-filter-bar .fsel {
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.report-filter-bar .fsel:focus {
  outline: none;
  border-color: var(--primary);
}
.report-filter-bar input[type="date"] {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
}
.report-filter-bar input[type="date"]:focus {
  outline: none;
  border-color: var(--primary);
}
.rfb-sep {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
}

/* Report KPI Row */
.report-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .report-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 550px) {
  .report-kpi-row {
    grid-template-columns: 1fr;
  }
}

.rk-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.rk-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.rk-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rk-value {
  font-family: "Sora", sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.rk-sub {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.rk-trend {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}
.rk-trend.up {
  background: #dcfce7;
  color: #16a34a;
}
.rk-trend.down {
  background: #fee2e2;
  color: #dc2626;
}
.rk-trend.neutral {
  background: var(--bg);
  color: var(--text-muted);
}
.rk-bar-wrap {
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.rk-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 1s ease;
}

/* Report Chart Grid */
.report-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .report-chart-grid {
    grid-template-columns: 1fr;
  }
}
.report-chart-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 1000px) {
  .report-chart-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 650px) {
  .report-chart-grid-3 {
    grid-template-columns: 1fr;
  }
}

.report-chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.rcc-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.rcc-title {
  font-family: "Sora", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.rcc-sub {
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 2px;
}
.rcc-body {
  padding: 16px 20px;
}
.rcc-chart-wrap {
  position: relative;
}

/* Report Data Table */
.report-table-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}
.rtc-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.rtc-title {
  font-family: "Sora", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.rtc-actions {
  display: flex;
  gap: 8px;
}

/* Progress ring */
.rk-ring-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.rk-ring {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}
.rk-ring svg {
  transform: rotate(-90deg);
}
.rk-ring-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
}

/* Heatmap */
.att-heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.hm-cell {
  aspect-ratio: 1;
  border-radius: 3px;
}
.hm-label {
  font-size: 9px;
  color: var(--text-light);
  text-align: center;
}

/* Legend row */
.chart-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.cl-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}
.cl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cl-rect {
  width: 14px;
  height: 8px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Report tab panels */
.report-panel {
  display: none;
}
.report-panel.active {
  display: block;
}

/* Summary insight box */
.insight-box {
  background: var(--primary-light);
  border: 1px solid rgba(108, 92, 231, 0.2);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}
.insight-box i {
  color: var(--primary);
  margin-top: 2px;
  font-size: 15px;
  flex-shrink: 0;
}
.insight-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}
.insight-text strong {
  color: var(--text);
}

/* Inline percent badge */
.pct-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}

/* ============================================================
   SETTINGS PAGE
   ============================================================ */

.settings-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 800px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
}

/* Settings sidebar nav */
.settings-nav-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
}
.settings-nav-section {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.settings-nav-section:last-child {
  border-bottom: none;
}
.settings-nav-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  padding: 6px 18px 4px;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-left: 3px solid transparent;
}
.settings-nav-item i {
  width: 16px;
  text-align: center;
  font-size: 13px;
}
.settings-nav-item:hover {
  background: var(--bg);
  color: var(--text);
}
.settings-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
}
.settings-nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  padding: 2px 6px;
  border-radius: 99px;
}

/* Settings content card */
.settings-content-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.settings-panel {
  display: none;
}
.settings-panel.active {
  display: block;
}
.settings-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.settings-panel-title {
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.settings-panel-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.settings-panel-body {
  padding: 24px;
}

/* Settings Section */
.settings-section {
  margin-bottom: 28px;
}
.settings-section-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-light);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-section-title i {
  color: var(--primary);
  font-size: 13px;
}

/* Settings Row */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}
.settings-row:last-child {
  border-bottom: none;
}
.settings-row-left {
  flex: 1;
  min-width: 180px;
}
.settings-row-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.settings-row-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.25s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.25s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Settings Input */
.settings-input {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  min-width: 180px;
  transition: border-color 0.2s;
}
.settings-input:focus {
  outline: none;
  border-color: var(--primary);
}
.settings-select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  min-width: 160px;
}
.settings-select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Color Picker row */
.color-swatch-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  position: relative;
}
.color-swatch.selected {
  border-color: var(--text);
  transform: scale(1.15);
}
.color-swatch.selected::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

/* Avatar upload row */
.settings-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.settings-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.settings-avatar-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Permission table */
.perm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.perm-table th {
  background: var(--bg);
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
}
.perm-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: middle;
}
.perm-table tr:last-child td {
  border-bottom: none;
}
.perm-table td:first-child {
  font-weight: 700;
  color: var(--text);
}
.perm-check {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Notification pref cards */
.notif-pref-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.notif-pref-card {
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color 0.18s;
}
.notif-pref-card:hover {
  border-color: var(--primary);
}
.notif-pref-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.notif-pref-info {
  flex: 1;
}
.notif-pref-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.notif-pref-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Integration card */
.integration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) {
  .integration-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 550px) {
  .integration-grid {
    grid-template-columns: 1fr;
  }
}
.integration-card {
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
  transition: all 0.18s;
  cursor: pointer;
}
.integration-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.1);
}
.integration-card.connected {
  border-color: #10b981;
}
.integration-icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.integration-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.integration-status {
  font-size: 11px;
  font-weight: 600;
}
.integration-status.connected {
  color: #10b981;
}
.integration-status.disconnected {
  color: var(--text-light);
}

/* Backup/Audit rows */
.backup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 10px;
  flex-wrap: wrap;
}
.backup-row:last-child {
  border-bottom: none;
}
.backup-info {
  flex: 1;
}
.backup-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.backup-meta {
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 2px;
}
.backup-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
}
.backup-badge.success {
  background: #dcfce7;
  color: #16a34a;
}
.backup-badge.warning {
  background: #fef3c7;
  color: #d97706;
}
.backup-badge.info {
  background: var(--primary-light);
  color: var(--primary);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toastContainer {
  pointer-events: none;
}
#toastContainer > div {
  pointer-events: all;
}

/* ============================================================
   CONFIRM DIALOG
   ============================================================ */
#confirmDialog {
  z-index: 99990;
}
#confirmDialog .modal {
  animation: none;
}
/* Confirm dialogs are a small centred popup (not the full-height side drawer
   every other .modal uses). ID selector beats the drawer rules above. */
#confirmDialog {
  justify-content: center !important;
  align-items: center !important;
  padding: 16px;
}
#confirmDialog .modal {
  width: 420px;
  height: auto !important;
  max-height: calc(100vh - 32px) !important;
  border-radius: 14px !important;
  transform: translateY(12px) scale(0.96) !important;
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}
#confirmDialog.open .modal {
  transform: translateY(0) scale(1) !important;
  opacity: 1;
}
#confirmDialog .modal-header,
#confirmDialog .modal-footer {
  border-radius: 0 !important;
}
#confirmDialog .modal-body {
  flex: 0 1 auto !important;
}
#confirmDialog .modal-footer {
  justify-content: flex-end;
  gap: 10px;
  padding-bottom: 20px;
}

/* ============================================================
   LEAVE TYPE ITEM
   ============================================================ */
.lt-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: box-shadow 0.2s;
}
.lt-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.lt-icon-btn {
  transition:
    border-color 0.15s,
    background 0.15s;
}

/* Dynamic lb-fill (override old static fills) */
.lb-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s ease;
}

/* ======================== CUSTOM SEARCHABLE DROPDOWN ======================== */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select {
  position: relative;
  cursor: pointer;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}

.custom-select-trigger:hover {
  border-color: var(--primary);
}

.custom-select-trigger.open {
  border-color: var(--primary);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.15);
}

.custom-select-trigger-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
}

.custom-select-trigger-icon.open {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  max-height: 300px;
  overflow: hidden;
  display: none;
}

.custom-select-dropdown.open {
  display: block;
}

.custom-select-search {
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.custom-select-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}

.custom-select-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.custom-select-options {
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg);
}

.custom-select-options::-webkit-scrollbar {
  width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
  background: var(--bg);
}

.custom-select-options::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.custom-option {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-option:last-child {
  border-bottom: none;
}

.custom-option:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.custom-option.selected {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.custom-option-check {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: white;
  transition: all var(--transition);
}

.custom-option.selected .custom-option-check {
  background: var(--primary);
  border-color: var(--primary);
}

.custom-select-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ======================== STATUS BADGE STYLES ======================== */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge.status-present {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.status-badge.status-absent {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.status-badge.status-leave {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.status-badge.status-holiday {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.status-badge.status-half-day {
  background: rgba(162, 155, 254, 0.12);
  color: #a29bfe;
}

.status-badge.status-late {
  background: rgba(236, 72, 153, 0.12);
  color: #ec4899;
}

/* ============================================================
   USER DETAILS PAGE (user-details.php)
   ============================================================ */

.ud-main {
  padding-top: 8px;
}

.ud-back-btn {
  margin-right: 14px;
}

/* HERO */
.ud-hero {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  overflow: hidden;
}

.ud-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 115px;
  background: linear-gradient(135deg, #6c5ce7, #8574e8 60%, #a29bfe);
}

.ud-hero-content {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 18px 28px 0;
}

.ud-avatar-wrap {
  position: relative;
  margin-bottom: -22px;
}

.ud-avatar {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c5ce7, #8574e8);
  color: #fff;
  font-family: "Sora", sans-serif;
  font-size: 30px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--card-bg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.ud-online-dot {
  position: absolute;
  bottom: 6px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #10b981;
  border: 3px solid var(--card-bg);
}

.ud-hero-info {
  padding-bottom: 14px;
  flex: 1;
  min-width: 0;
}

.ud-hero-name {
  font-family: "Sora", sans-serif;
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 4px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.ud-hero-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  margin-bottom: 10px;
}

.ud-dot {
  margin: 0 5px;
  opacity: 0.6;
}

.ud-hero-badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.ud-hero-stats {
  position: relative;
  display: flex;
  gap: 0;
  padding: 24px 28px 0;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ud-hs {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px 16px 0;
  flex: 1;
  min-width: 150px;
}

.ud-hs + .ud-hs {
  padding-left: 28px;
  border-left: 1px solid var(--border);
}

.ud-hs-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.ud-hs-val {
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}

.ud-hs-lbl {
  font-size: 10.5px;
  color: var(--text-light);
  font-weight: 600;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* TABS */
.ud-tabs-bar {
  display: flex;
  gap: 4px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.ud-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s;
  white-space: nowrap;
}

.ud-tab:hover {
  background: var(--bg);
  color: var(--text);
}

.ud-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.28);
}

/* SECTIONS */
.ud-section {
  display: none;
}

.ud-section.active {
  display: block;
  animation: udFadeIn 0.28s ease;
}

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

/* GRIDS */
.ud-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ud-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.ud-span-2 {
  grid-column: span 2;
}

/* CARDS */
.ud-card {
  background: var(--card-bg);
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.ud-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px 13px;
  border-bottom: 1px solid var(--border);
}

.ud-card-title {
  font-family: "Sora", sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ud-card-title i {
  color: var(--primary);
  font-size: 13px;
}

.ud-card-sub {
  font-size: 11.5px;
  color: var(--text-light);
  font-weight: 600;
}

/* FIELDS */
.ud-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.ud-field {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.ud-field:nth-last-child(-n + 2):not(.full ~ .ud-field) {
  border-bottom: none;
}

.ud-field.full {
  grid-column: span 2;
}

.ud-field-lbl {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.ud-field-val {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.ud-field-val.empty {
  color: var(--text-light);
  font-style: italic;
  font-weight: 400;
}

/* LEAVE */
.ud-leave-item {
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
}

.ud-leave-item:last-child {
  border-bottom: none;
}

.ud-leave-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ud-leave-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.ud-leave-counts {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.ud-leave-remaining {
  font-family: "Sora", sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.ud-leave-remaining-lbl {
  font-size: 10px;
  color: var(--text-light);
  text-align: right;
  font-weight: 600;
}

.ud-leave-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.ud-leave-bar-fill {
  height: 100%;
  border-radius: 3px;
}

/* ATTENDANCE MINI */
.ud-att-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 16px 10px;
}

.ud-att-stat {
  text-align: center;
  padding: 12px 8px;
  border-radius: 6px;
}

.ud-att-stat-val {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.ud-att-stat-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.ud-att-rate-bar {
  padding: 0 16px 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.ud-att-rate-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 5px 0 3px;
}

.ud-att-rate-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #10b981, #a29bfe);
}

/* HEATMAP */
.ud-heatmap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 20px 16px;
}

.ud-hm-day {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  cursor: default;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.ud-hm-day:hover {
  transform: scale(1.18);
  z-index: 5;
}

.hm-present {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  border: 1.5px solid rgba(16, 185, 129, 0.28);
}

.hm-absent {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1.5px solid rgba(239, 68, 68, 0.24);
}

.hm-leave {
  background: rgba(245, 158, 11, 0.13);
  color: #d97706;
  border: 1.5px solid rgba(245, 158, 11, 0.26);
}

.hm-holiday {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
  border: 1.5px solid rgba(139, 92, 246, 0.22);
}

.hm-weekend {
  background: var(--bg);
  color: var(--text-light);
  border: 1.5px solid var(--border);
}

.hm-future {
  background: var(--bg);
  color: var(--border);
  border: 1.5px dashed var(--border);
}
.hm-late {
  background: rgba(249, 115, 22, 0.14);
  color: #ea580c;
  border: 1.5px solid rgba(249, 115, 22, 0.28);
}

.hm-half-day {
  background: rgba(59, 130, 246, 0.13);
  color: #2563eb;
  border: 1.5px solid rgba(59, 130, 246, 0.26);
}

.hm-short-leave {
  background: rgba(14, 165, 233, 0.13);
  color: #0284c7;
  border: 1.5px solid rgba(14, 165, 233, 0.26);
}

.hm-today {
  background: var(--card-bg);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.hm-not_joined,
.hm-exited {
  background: transparent;
  color: var(--border);
  border: 1.5px dotted var(--border);
  opacity: 0.7;
}

.ud-hm-legend {
  display: flex;
  gap: 14px;
  padding: 0 20px 14px;
  flex-wrap: wrap;
}

.ud-hm-leg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.ud-hm-leg-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* TABLES */
.ud-tbl-wrap {
  overflow-x: auto;
}

.ud-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 580px;
}

.ud-table thead th {
  padding: 11px 16px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.ud-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  vertical-align: middle;
}

.ud-table tbody tr:last-child td {
  border-bottom: none;
}

.ud-table tbody tr:hover td {
  background: var(--bg);
}

/* BADGES */
.ud-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
}

.ud-badge-present {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
.ud-badge-absent {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}
.ud-badge-leave {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}
.ud-badge-holiday {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}
.ud-badge-weekend {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.ud-badge-late {
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
}
.ud-badge-halfday {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}
.ud-badge-shortleave {
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
}
.ud-badge-approved {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
.ud-badge-pending {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}
.ud-badge-rejected {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}
.ud-badge-active {
  background: rgba(108, 92, 231, 0.12);
  color: var(--primary);
}
.ud-badge-inactive {
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-muted);
}

/* DOCS */
.ud-docs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  padding: 16px 20px;
}

.ud-doc-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.ud-doc-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.ud-doc-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.ud-doc-status {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ATTENDANCE SUMMARY */
.ud-att-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.ud-att-sum-card {
  background: var(--card-bg);
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ud-att-sum-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.ud-att-sum-val {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.ud-att-sum-lbl {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
}

/* LEAVE CHART */
.ud-leave-chart-wrap {
  display: flex;
  justify-content: center;
  padding: 14px 20px 8px;
}

.ud-leave-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 20px 20px;
}

.ud-leave-leg-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
}

.ud-leave-leg-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.ud-leave-leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* EMPTY */
.ud-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ud-empty i {
  font-size: 32px;
}

/* RESPONSIVE — User Details */
@media (max-width: 1100px) {
  .ud-att-summary-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .ud-hero-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .ud-hero-stats {
    flex-direction: column;
  }
  .ud-hs + .ud-hs {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .ud-grid-2,
  .ud-grid-3 {
    grid-template-columns: 1fr;
  }
  .ud-span-2 {
    grid-column: span 1;
  }
  .ud-fields-grid {
    grid-template-columns: 1fr;
  }
  .ud-field.full {
    grid-column: span 1;
  }
  .ud-att-summary-strip {
    grid-template-columns: 1fr 1fr;
  }
  .ud-tab {
    padding: 8px 12px;
    font-size: 12px;
  }
  .ud-hero-name {
    font-size: 18px;
  }
}

@media print {
  .sidebar,
  .topbar,
  .page-header .page-header-right,
  .ud-tabs-bar {
    display: none !important;
  }
  .ud-section {
    display: block !important;
  }
  .main-content {
    margin: 0 !important;
    padding: 0 !important;
  }
  .modal-backdrop {
    position: static !important;
    background: none !important;
    backdrop-filter: none !important;
  }
  .modal-backdrop .modal {
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
  }
  .modal-close,
  .modal-footer {
    display: none !important;
  }
}

/* ===================== CUSTOM CALENDAR STYLES ===================== */
.calendar-wrapper {
  position: relative;
  width: 100%;
}

.calendar-display-input {
  cursor: pointer;
  background-color: var(--bg-input);
  padding-right: 40px !important;
}

.calendar-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--primary);
  font-size: 14px;
  pointer-events: none;
}

.custom-calendar-picker {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 12px;
  font-family: "Nunito Sans", sans-serif;
  min-width: 280px;
}
#markModal .custom-calendar-picker {
  left: 0;
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.calendar-prev,
.calendar-next {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.calendar-prev:hover,
.calendar-next:hover {
  background-color: var(--primary-light);
}

.calendar-month-year {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  text-align: center;
  min-width: 120px;
}

.calendar-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.calendar-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  padding: 4px 0;
  text-transform: uppercase;
}

.calendar-dates {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
  font-weight: 500;
  border: 1px solid transparent;
}

.calendar-day:not(.other-month):not(.disabled):hover {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.calendar-day.other-month {
  color: var(--text-light);
  cursor: default;
  opacity: 0.4;
}

.calendar-day.today {
  border: 2px solid var(--primary);
  font-weight: 700;
  color: var(--primary);
}

.calendar-day.selected {
  background-color: var(--primary);
  color: white;
  font-weight: 700;
}

.calendar-day.disabled {
  color: var(--text-light);
  cursor: not-allowed;
  opacity: 0.3;
}

.calendar-day.disabled:hover {
  background-color: transparent;
  border-color: transparent;
}

/* Dark mode support */
[data-theme="dark"] .custom-calendar-picker {
  background: var(--bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .calendar-display-input {
  background-color: var(--bg-input);
  color: var(--text);
}

/* ===================== EDIT PROFILE MODAL STYLES ===================== */
.edit-profile-modal {
  max-width: 600px;
}

.edit-profile-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.edit-profile-section {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.edit-profile-section:last-child {
  border-bottom: none;
}

.edit-profile-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.edit-profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.edit-profile-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.edit-profile-field input,
.edit-profile-field select,
.edit-profile-field textarea {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  background-color: var(--bg-input);
  color: var(--text);
  transition: border-color 0.2s;
}

.edit-profile-field input:focus,
.edit-profile-field select:focus,
.edit-profile-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.edit-profile-field textarea {
  resize: vertical;
  min-height: 80px;
}

.edit-profile-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* ---- Calendar month/year dropdown selects ---- */
.cal-header-selects {
  display: flex;
  gap: 6px;
  align-items: center;
}
.cal-month-select,
.cal-year-select {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--card-bg);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.cal-month-select:focus,
.cal-year-select:focus {
  border-color: var(--primary);
}
.cal-month-select {
  min-width: 100px;
}
.cal-year-select {
  min-width: 70px;
}

/* ---- Attendance mark button ---- */
.att-mark-btn {
  background: linear-gradient(135deg, var(--primary), #8574e8);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    opacity 0.2s,
    transform 0.15s;
}
.att-mark-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ---- Employee chip (used in edit attendance to show selected employee) ---- */
.emp-selected-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-light);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  padding: 9px 14px;
}
.emp-selected-chip .chip-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.emp-selected-chip .chip-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}
.emp-selected-chip .chip-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   LOGIN PAGE — index.php
   ========================================================================== */

/* Base overrides for login page only */
/* ================================================================
   LOGIN / AUTH PAGES — Modern floating-card design
   ================================================================ */
body.login-page {
  overflow: auto;
  min-height: 100vh;
  font-family: "Lexend", sans-serif;
  background:
    radial-gradient(ellipse 60% 50% at 12% 8%, rgba(108, 92, 231, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 55% 55% at 90% 12%, rgba(133, 116, 232, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 85% 95%, rgba(108, 92, 231, 0.08) 0%, transparent 55%),
    #f3f5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.login-page * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Floating card wrapper */
.login-wrap {
  display: flex;
  width: 100%;
  max-width: 1000px;
  min-height: 620px;
  border-radius: 26px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 30px 70px -20px rgba(10, 23, 48, 0.28),
    0 0 0 1px rgba(10, 23, 48, 0.04);
  animation: loginCardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes loginCardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---- LEFT PANEL ---- */
.login-left {
  flex: 0 0 46%;
  width: 46%;
  height: auto;
  background: linear-gradient(160deg, #4834a6 0%, #6c5ce7 55%, #2b4aa0 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 340px at 15% 15%, rgba(99, 164, 255, 0.35) 0%, transparent 70%),
    radial-gradient(circle 300px at 90% 85%, rgba(61, 220, 197, 0.18) 0%, transparent 70%),
    radial-gradient(circle 260px at 85% 10%, rgba(255, 255, 255, 0.12) 0%, transparent 65%);
  filter: blur(4px);
}

.login-bg-circles {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.login-bg-circles svg {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.05;
}

.login-wave-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 12, 30, 0.25) 100%);
}

.login-left-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  gap: 22px;
  padding: 56px;
  animation: loginLeftIn 0.7s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-hr-icon {
  width: clamp(52px, 6vw, 64px);
  height: auto;
  padding: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  backdrop-filter: blur(6px);
}

.login-brand-title {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 30px);
  color: #fff;
  letter-spacing: 1.5px;
  line-height: 1.05;
  text-align: left;
}

.login-sep {
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, #c3baf7, transparent);
  border-radius: 4px;
}

.login-tagline {
  font-size: clamp(14px, 1.3vw, 17px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.2px;
  font-style: normal;
  max-width: 340px;
  line-height: 1.6;
}

.login-left-footer {
  position: absolute;
  bottom: 26px;
  left: 0;
  right: 0;
  text-align: left;
  padding-left: 56px;
  z-index: 2;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.3px;
}

.login-left-footer b {
  color: rgba(255, 255, 255, 0.65);
  font-weight: 600;
}

/* ---- RIGHT PANEL ---- */
.login-right {
  flex: 1;
  width: 54%;
  height: auto;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
  position: relative;
  animation: loginRightIn 0.6s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.login-right-logo {
  position: absolute;
  top: 34px;
  left: 0;
  right: 0;
  text-align: center;
}

.brand-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: #4834a6;
}

.brand-wordmark i {
  color: #6c5ce7;
  font-size: 17px;
}

.brand-wordmark span {
  font-weight: 400;
  color: #94a3b8;
  letter-spacing: 1.5px;
}

.login-form-box {
  width: 100%;
  max-width: 320px;
}

.login-form-heading {
  text-align: left;
  margin-bottom: 28px;
}

.login-form-heading h2 {
  font-family: "Outfit", sans-serif;
  font-size: 25px;
  font-weight: 700;
  color: #101a33;
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.login-form-heading p {
  font-size: 13.5px;
  color: #94a3b8;
  font-weight: 400;
  font-family: "Lexend", sans-serif;
}

.login-field {
  margin-bottom: 18px;
}

.login-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  text-transform: none;
  letter-spacing: 0.1px;
  margin-bottom: 7px;
  font-family: "Lexend", sans-serif;
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap input {
  width: 100%;
  padding: 13px 40px 13px 16px;
  border: 1.5px solid transparent;
  border-radius: 4px;
  font-family: "Lexend", sans-serif;
  font-size: 14px;
  color: #1a2040;
  background: #f4f6fb;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background-color 0.2s;
}

.login-input-wrap input::placeholder {
  color: #a8b3c4;
}

.login-input-wrap input:focus {
  border-color: #6c5ce7;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.login-eye-btn {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #a8b3c4;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.login-eye-btn:hover {
  color: #6c5ce7;
}

.login-btn-signin {
  width: 100%;
  padding: 13px;
  margin-top: 6px;
  background: linear-gradient(135deg, #6c5ce7 0%, #2b4aa0 100%);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: "Outfit", sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: none;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  box-shadow: 0 8px 20px -6px rgba(108, 92, 231, 0.5);
}

.login-btn-signin:hover {
  background: linear-gradient(135deg, #4834a6 0%, #6c5ce7 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -6px rgba(108, 92, 231, 0.55);
}

.login-btn-signin:active {
  transform: translateY(0);
}

.login-right-footer {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: #c0cbda;
}

.login-right-footer b {
  color: #6c5ce7;
  font-weight: 700;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .login-wrap {
    max-width: 460px;
    min-height: auto;
  }
  .login-left {
    display: none;
  }
  .login-right {
    width: 100%;
    padding: 64px 32px 40px;
  }
}

@media (max-width: 480px) {
  body.login-page {
    padding: 0;
  }
  .login-wrap {
    max-width: 100%;
    min-height: 100vh;
    border-radius: 0;
  }
  .login-right {
    padding: 72px 24px 32px;
  }
}

/* ================================================================
   LEAVE PAGE — TAB COUNTS
   Extracted from leave.php
================================================================ */
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  background: var(--border);
  color: var(--text-muted);
  margin-left: 5px;
  transition: all 0.2s;
  line-height: 1;
}
.tab.active .tab-count {
  background: var(--primary-light);
  color: var(--primary);
}
.tab-count.pending {
  background: #fef3c7;
  color: #f59e0b;
}
.tab-count.approved {
  background: #d1fae5;
  color: #10b981;
}
.tab-count.rejected {
  background: #fee2e2;
  color: #ef4444;
}
.tab.active .tab-count.pending {
  background: #f59e0b;
  color: #fff;
}
.tab.active .tab-count.approved {
  background: #10b981;
  color: #fff;
}
.tab.active .tab-count.rejected {
  background: #ef4444;
  color: #fff;
}

/* ================================================================
   REFRESH ICON BUTTON (shared — leave + attendance)
================================================================ */
.icon-refresh-btn {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.icon-refresh-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(720deg);
  }
}
.spinning {
  animation: spin 0.7s ease-in-out forwards;
}

/* ================================================================
   ACTION CONFIRMATION POPUP (leave approve/reject)
================================================================ */
.action-confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s;
  pointer-events: none;
}
.action-confirm-backdrop.open {
  opacity: 1;
  pointer-events: all;
}
.action-confirm-box {
  background: var(--card-bg);
  border-radius: 6px;
  padding: 28px 28px 24px;
  max-width: 380px;
  width: 92vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.2s cubic-bezier(0.34, 1.3, 0.64, 1);
  text-align: center;
}
.action-confirm-backdrop.open .action-confirm-box {
  transform: scale(1) translateY(0);
}
.action-confirm-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
}
.action-confirm-title {
  font-family: "Sora", sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.action-confirm-msg {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 22px;
}
.action-confirm-btns {
  display: flex;
  gap: 10px;
}
.action-confirm-btns button {
  flex: 1;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.15s;
}
.acb-cancel {
  background: var(--bg);
  border: 1.5px solid var(--border) !important;
  color: var(--text-muted);
}
.acb-cancel:hover {
  background: var(--border);
}
.acb-approve {
  background: #d1fae5;
  color: #065f46;
}
.acb-approve:hover {
  background: #10b981;
  color: #fff;
}
.acb-reject {
  background: #fee2e2;
  color: #991b1b;
}
.acb-reject:hover {
  background: #ef4444;
  color: #fff;
}

/* ================================================================
   PENDING BUTTON in page header
================================================================ */
.btn-pending {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  height: 38px;
  border-radius: 4px;
  border: 1.5px solid #f59e0b;
  background: #fef3c7;
  color: #b45309;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-pending:hover {
  background: #f59e0b;
  color: #fff;
  border-color: #f59e0b;
}
.pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 20px;
  background: #f59e0b;
  color: #fff;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1;
}
.btn-pending:hover .pending-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ================================================================
   PENDING APPROVALS MODAL — items
================================================================ */
.pend-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.pend-item:last-child {
  border-bottom: none;
}
.pend-item:hover {
  background: var(--card-bg);
}
.pend-item-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}
.pend-av {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}
.pend-info {
  flex: 1;
  min-width: 0;
}
.pend-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}
.pend-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}
.pend-dates {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}
.pend-days {
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 800;
}
.pend-reason {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pend-actions {
  display: flex;
  gap: 8px;
}
.pend-btn {
  flex: 1;
  padding: 7px 12px;
  border-radius: 4px;
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
  font-family: inherit;
}
.pend-btn.approve {
  background: #d1fae5;
  color: #065f46;
}
.pend-btn.approve:hover {
  background: #10b981;
  color: #fff;
}
.pend-btn.reject {
  background: #fee2e2;
  color: #991b1b;
}
.pend-btn.reject:hover {
  background: #ef4444;
  color: #fff;
}

/* ================================================================
   EMPLOYEE LEAVE SUMMARY MODAL
================================================================ */
.els-modal {
  max-width: 900px;
  width: 96vw;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
@media (min-width: 601px) {
  .els-modal { height: 100vh; max-height: 100vh; }
}
@media (max-width: 600px) {
  .els-modal { max-height: 92vh; }
}
.els-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--bg);
  padding: 0;
}
.els-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, #8574e8 100%);
  flex-shrink: 0;
}
.els-emp-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 24px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}
.els-emp-top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.els-emp-info { flex: 1; min-width: 160px; }
.els-emp-card .els-tbb-right {
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.els-bal-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: -6px;
}
.els-bal-title i { color: var(--primary); }
.els-bchips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.els-bchip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--c);
  border-radius: 6px;
  background: var(--card-bg);
  min-width: 0;
}
.els-bchip > i { color: var(--c); font-size: 12px; flex-shrink: 0; }
.els-bchip-l {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.els-bchip-n { font-size: 11px; color: var(--text-light); font-weight: 600; white-space: nowrap; }
.els-bchip-n b { color: var(--c); font-size: 14px; font-weight: 800; margin-right: 1px; }
.els-emp-av {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.els-emp-name {
  font-family: "Sora", sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.els-emp-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}
.els-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.els-stat-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: left;
  min-width: 0;
  transition: box-shadow 0.15s;
}
.els-stat-txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.els-stat-card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}
.els-stat-ico {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.els-stat-num {
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}
.els-stat-lbl {
  white-space: nowrap;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.els-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.els-section:last-child {
  border-bottom: none;
}
.els-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.els-count-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  padding: 2px 9px;
}
.els-balance-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.els-balance-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 13px 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  transition: box-shadow 0.15s;
}
.els-balance-card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}
.els-bc-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.els-bc-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
}
.els-bc-nums {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.els-bc-used {
  font-family: "Sora", sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}
.els-bc-sep {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 1px;
}
.els-bc-total {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}
.els-bc-bar-wrap {
  display: none;
}
.els-bc-bar-fill {
  display: none;
}
.els-bc-rem {
  font-size: 10px;
  font-weight: 700;
  color: #10b981;
}
.els-bc-rem-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}
.els-bc-rem-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.els-bc-rem-val {
  font-size: 11px;
  font-weight: 800;
}
/* ── Total Leave Balance Bar ── */
.els-total-balance-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.els-tbb-left {
  display: flex;
  align-items: center;
  gap: 11px;
}
.els-tbb-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--primary);
  flex-shrink: 0;
}
.els-tbb-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.els-tbb-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}
.els-tbb-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.els-tbb-used,
.els-tbb-rem,
.els-tbb-total {
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.els-tbb-used span {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #f59e0b;
}
.els-tbb-rem span {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #10b981;
}
.els-tbb-total span {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}
.els-tbb-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}
.els-table-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: auto;
  background: var(--card-bg);
}

/* ================================================================
   MONTHLY ATTENDANCE MODAL (MAM)
   Extracted from attendance.php
================================================================ */
.mam-modal {
  max-width: 900px;
  width: 96vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.mam-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  background: linear-gradient(135deg, var(--primary) 0%, #8574e8 100%);
  flex-shrink: 0;
}
.mam-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mam-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}
.mam-header-title {
  font-family: "Sora", sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.mam-header-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 2px;
  font-weight: 500;
}
.mam-close {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.mam-close:hover {
  background: rgba(255, 255, 255, 0.3);
}
.mam-body {
  overflow-y: auto;
  flex: 1;
  background: var(--bg);
}
.mam-emp-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.mam-emp-av {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.mam-emp-info {
  flex: 1;
  min-width: 0;
}
.mam-emp-name {
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mam-emp-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}
.mam-emp-meta span {
  font-weight: 700;
  color: var(--primary);
}
.mam-month-selector {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.mam-stats-bar {
  display: flex;
  gap: 8px;
  padding: 14px 22px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.mam-stat {
  flex: 1;
  min-width: 80px;
  text-align: center;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform 0.15s;
}
.mam-stat:hover {
  transform: translateY(-2px);
}
.mam-stat-val {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.mam-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 5px;
  letter-spacing: 0.3px;
}
.mam-section {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
}
.mam-section:last-child {
  border-bottom: none;
}
.mam-section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mam-section-label i {
  color: var(--primary);
  font-size: 13px;
}
.mam-table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.mam-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.mam-empty i {
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.35;
}
.mam-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ================================================================
   ATTENDANCE DATE PICKER
   Extracted from attendance.php
================================================================ */
.att-date-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.att-date-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  height: 36px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.att-date-btn i:first-child {
  color: var(--primary);
  font-size: 13px;
}
.att-date-btn:hover,
.att-date-btn.open {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.att-date-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.att-date-btn.active i:first-child {
  color: #fff;
}
.att-date-chevron {
  font-size: 9px;
  margin-left: 2px;
  transition: transform 0.2s;
  opacity: 0.6;
}
.att-date-btn.open .att-date-chevron {
  transform: rotate(180deg);
}
.att-date-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 280px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13);
  z-index: 9999;
  overflow: hidden;
  animation: attCalIn 0.18s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.att-date-dropdown.show {
  display: block;
}
@keyframes attCalIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.att-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.att-cal-nav {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.att-cal-nav:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.att-cal-nav:disabled {
  opacity: 0.3;
  cursor: default;
}
.att-cal-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.att-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 8px 10px 4px;
}
.att-cal-weekdays span {
  text-align: center;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.att-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 2px 10px 10px;
}
.att-cal-day {
  aspect-ratio: 1;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.14s cubic-bezier(0.34, 1.2, 0.64, 1);
  border: 1.5px solid transparent;
  user-select: none;
  position: relative;
}
.att-cal-day:hover:not(.att-empty):not(.att-weekend):not(.att-future) {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
}
.att-cal-day.att-empty {
  pointer-events: none;
}
.att-cal-day.att-weekend {
  color: var(--text-light);
  opacity: 0.45;
  cursor: default;
}
.att-cal-day.att-future {
  color: var(--text-light);
  opacity: 0.3;
  pointer-events: none;
}
.att-cal-day.att-today {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 900;
}
.att-cal-day.att-selected {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 3px 10px rgba(108, 92, 231, 0.38);
  transform: scale(1.08);
}
.att-cal-day.att-has-data::after {
  content: "";
  position: absolute;
  bottom: 3px;
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.65;
}
.att-cal-day.att-selected::after {
  background: rgba(255, 255, 255, 0.8);
}
.att-cal-footer {
  display: flex;
  gap: 6px;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--border);
}
.att-cal-today-btn,
.att-cal-clear-btn {
  flex: 1;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s;
  font-family: inherit;
}
.att-cal-today-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.att-cal-clear-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: #fee2e2;
}

/* ================================================================
   CELEBRATIONS PAGE
   Extracted from celebrations.php
================================================================ */
.celeb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 18px;
}
.celeb-card {
  background: var(--card-bg);
  border-radius: 6px;
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}
.celeb-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.celeb-card.today-card {
  border-color: rgba(108, 92, 231, 0.3);
  background: linear-gradient(
    135deg,
    var(--card-bg) 0%,
    rgba(108, 92, 231, 0.03) 100%
  );
}
.celeb-card.today-card.birthday-card {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(
    135deg,
    var(--card-bg) 0%,
    rgba(245, 158, 11, 0.04) 100%
  );
}
.celeb-card.today-card.anniversary-card {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(
    135deg,
    var(--card-bg) 0%,
    rgba(16, 185, 129, 0.04) 100%
  );
}
.celeb-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  position: relative;
}
.celeb-type-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 2px solid var(--card-bg);
}
.badge-birthday {
  background: #f59e0b;
  color: #fff;
}
.badge-anniversary {
  background: #10b981;
  color: #fff;
}
.celeb-info {
  flex: 1;
  min-width: 0;
}
.celeb-name {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.celeb-desig {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.celeb-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.celeb-event {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.celeb-event.birthday-event {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}
.celeb-event.anniversary-event {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
.celeb-date {
  font-size: 11.5px;
  color: var(--text-light);
  font-weight: 600;
}
.celeb-days-away {
  font-size: 11px;
  color: var(--text-light);
  background: var(--bg);
  border-radius: 6px;
  padding: 2px 8px;
  font-weight: 600;
  align-self: flex-start;
}
.today-ribbon {
  position: absolute;
  top: 14px;
  right: -22px;
  background: linear-gradient(90deg, #6c5ce7, #8574e8);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 30px;
  transform: rotate(35deg);
  letter-spacing: 0.5px;
}
.celeb-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.celeb-tab.active,
.celeb-tab:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.celeb-empty {
  text-align: center;
  padding: 50px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (max-width: 640px) {
  .celeb-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   USERS PAGE — Exit button
   Extracted from users.php
================================================================ */
.act-btn.exit-btn {
  color: #f97316;
}
.act-btn.exit-btn:hover {
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
}
.act-btn.reset-btn {
  color: #8b5cf6;
}
.act-btn.reset-btn:hover {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}

/* ================================================================
   PAYROLL PAGE — REDESIGNED
================================================================ */

/* Stat Cards */
.pay-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  box-shadow: var(--shadow);
}
.pay-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.pay-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 6px 6px 0 0;
}
.psc-blue::before {
  background: linear-gradient(90deg, #6c5ce7, #8574e8);
}
.psc-green::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}
.psc-orange::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.psc-purple::before {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.psc-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.psc-blue .psc-icon {
  background: #eff6ff;
  color: #6c5ce7;
}
.psc-green .psc-icon {
  background: #ecfdf5;
  color: #10b981;
}
.psc-orange.psc-icon,
.psc-orange .psc-icon {
  background: #fef3c7;
  color: #f59e0b;
}
.psc-purple .psc-icon {
  background: #f5f3ff;
  color: #8b5cf6;
}

.psc-body {
  flex: 1;
  min-width: 0;
}
.psc-val {
  font-family: "Sora", sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.psc-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 3px;
}
.psc-trend {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-light);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Payroll Run Bar — enhanced */
.payroll-run-bar {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    #8574e8 60%,
    #a29bfe 100%
  );
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  box-shadow: 0 6px 24px rgba(108, 92, 231, 0.35);
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.payroll-run-bar::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}
.prb-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.prb-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}
.prb-left .prb-title {
  font-family: "Sora", sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}
.prb-left .prb-sub {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
}

/* Main layout grid */
.pay-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

/* Table card */
.pay-table-card {
  min-width: 0;
}

/* Tabs row */
.pay-tabs-row {
  padding: 14px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.pay-tabs-row .tabs {
  border-bottom: none;
  padding-bottom: 0;
  gap: 2px;
}
.pay-tabs-row .tab {
  margin-bottom: 0;
  padding-bottom: 12px;
}

/* Tab counts */
.pay-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  background: var(--border);
  color: var(--text-muted);
  margin-left: 4px;
  line-height: 1;
  transition: all 0.2s;
}
.tab.active .pay-tab-count {
  background: var(--primary-light);
  color: var(--primary);
}
.ptc-processed {
  background: #d1fae5;
  color: #059669;
}
.ptc-pending {
  background: #fef3c7;
  color: #d97706;
}
.ptc-hold {
  background: #fee2e2;
  color: #dc2626;
}
.tab.active .ptc-processed {
  background: #10b981;
  color: #fff;
}
.tab.active .ptc-pending {
  background: #f59e0b;
  color: #fff;
}
.tab.active .ptc-hold {
  background: #ef4444;
  color: #fff;
}

/* Pay status pills */
.pay-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.pay-pill-processed {
  background: #d1fae5;
  color: #065f46;
}
.pay-pill-pending {
  background: #fef3c7;
  color: #92400e;
}
.pay-pill-hold {
  background: #fee2e2;
  color: #991b1b;
}

/* Pay chips in table */
.pay-net-chip {
  font-family: "Sora", sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  color: #10b981;
}
.pay-ded-chip {
  font-size: 13px;
  font-weight: 700;
  color: #ef4444;
}

/* Right Sidebar */
.pay-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pay-sidebar-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.pay-sidebar-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}
.psc-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.psc-header-title {
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.psc-header-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  font-weight: 500;
}

/* Payslip preview empty state */
.pay-preview-empty {
  padding: 28px 20px;
  text-align: center;
}
.pay-preview-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bg);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--border);
  margin: 0 auto 12px;
}
.pay-preview-empty-txt {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-light);
  line-height: 1.55;
}

/* Dept split rows */
.dept-split-row {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}
.dept-split-row:last-child {
  border-bottom: none;
}
.dept-split-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.dept-split-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dept-split-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.dept-split-amt {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}
.dept-split-pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  background: var(--bg);
  border-radius: 6px;
  padding: 1px 6px;
  min-width: 32px;
  text-align: center;
}

/* Status summary */
.pay-progress-wrap {
  padding: 14px 18px 10px;
}
.pay-progress-bar-bg {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}
.pay-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 99px;
  transition: width 0.6s ease;
}
.pay-progress-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}
.pay-status-rows {
  padding: 0 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pay-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}
.pay-status-row strong {
  margin-left: auto;
  font-weight: 800;
  color: var(--text);
}
.pay-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Mini payslip preview */
.payslip-mini {
  padding: 14px 16px;
}
.payslip-mini-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 10px;
}
.payslip-mini-emp {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.payslip-mini-av {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
}
.payslip-mini-rows {
  margin-bottom: 8px;
}
.payslip-mini-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.payslip-mini-row span:last-child {
  font-weight: 700;
  color: var(--text);
}
.payslip-mini-row.gross {
  font-weight: 800;
  color: var(--text);
  background: var(--bg);
  padding: 4px 4px;
  border-radius: 5px;
}
.payslip-mini-row.gross span {
  color: var(--primary) !important;
}
.payslip-mini-row.ded span:last-child {
  color: #ef4444 !important;
}
.payslip-mini-net {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  background: var(--primary);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

/* Full payslip in modal */
.payslip-full {
  padding: 24px 28px;
}
.payslip-full-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 3px solid var(--primary);
  margin-bottom: 18px;
}
.payslip-full-emp {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 16px;
}
.payslip-full-av {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.payslip-full-info {
  flex: 1;
  min-width: 0;
}
.payslip-full-bank {
  text-align: right;
}

/* Generate payslip modal */
.pay-gen-modal {
  max-width: 580px;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
}
.pay-view-modal {
  max-width: 580px;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
}
.pay-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, #8574e8 100%);
  flex-shrink: 0;
}
.pay-modal-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #fff;
  flex-shrink: 0;
}
.pay-modal-header-title {
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
.pay-modal-header-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 1px;
}
.pay-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.pay-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Form sections in modal */
.pay-form-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}
.pay-form-section-label {
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pay-form-section-label.earnings {
  background: #ecfdf5;
  color: #065f46;
  border-bottom: 1px solid #d1fae5;
}
.pay-form-section-label.deductions {
  background: #fef2f2;
  color: #991b1b;
  border-bottom: 1px solid #fee2e2;
}
.pay-form-section .form-row {
  padding: 10px 16px 0;
}
.pay-form-section .form-row:last-child {
  padding-bottom: 12px;
}

/* Gross field */
.pay-gross-field {
  background: var(--bg) !important;
  font-weight: 700 !important;
  color: var(--primary) !important;
}

/* Net Pay Banner */
.pay-net-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, #8574e8 100%);
  border-radius: 12px;
  margin-top: 2px;
}
.pay-net-banner-lbl {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pay-net-banner-val {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

@media (max-width: 1100px) {
  .pay-main-grid {
    grid-template-columns: 1fr;
  }
  .pay-sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  }
}

/* ============================================================
   HOLIDAY VIEW TOGGLE (inside gradient bar)
   ============================================================ */
.hol-view-toggle {
  display: flex;
  gap: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  padding: 3px;
  flex-shrink: 0;
}

.hvbtn {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}

.hvbtn.active {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hvbtn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}

/* ============================================================
   CHANGE PASSWORD MODAL STYLES
   ============================================================ */
.cpw-info-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(108, 92, 231, 0.08);
  border: 1px solid rgba(108, 92, 231, 0.18);
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.cpw-info-bar i {
  color: var(--primary);
  font-size: 14px;
  margin-top: 1px;
  flex-shrink: 0;
}

.pw-input-wrap {
  position: relative;
}
.pw-input-wrap .form-input {
  padding-right: 44px;
  width: 100%;
  box-sizing: border-box;
}
.pw-eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  transition: color 0.15s;
}
.pw-eye-btn:hover {
  color: var(--primary);
}

.pw-strength-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.pw-strength-bar {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 99px;
  width: 0;
  transition:
    width 0.3s,
    background 0.3s;
}
.pw-strength-label {
  font-size: 11.5px;
  font-weight: 700;
  min-width: 45px;
  text-align: right;
}

.pw-reqs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-top: 10px;
}
.pw-req {
  font-size: 11.5px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}
.pw-req i {
  font-size: 7px;
  color: var(--border);
  transition: color 0.15s;
}
.pw-req.met {
  color: #10b981;
}
.pw-req.met i {
  color: #10b981;
}

.pw-match-msg {
  font-size: 12px;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 7px;
  font-weight: 600;
}
.pw-match-msg.error {
  background: #fef2f2;
  color: #dc2626;
}
.pw-match-msg.ok {
  background: #ecfdf5;
  color: #10b981;
}

/* ============================================================
   COMPREHENSIVE RESPONSIVENESS FIXES
   ============================================================ */

/* Holiday page responsiveness */
@media (max-width: 768px) {
  .holiday-year-bar {
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }
  .holiday-year-bar .prb-actions {
    width: 100%;
    justify-content: space-between;
  }
  .holiday-grid-layout {
    grid-template-columns: 1fr !important;
  }
  .hc-month-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .user-stat-strip.grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .hc-month-grid {
    grid-template-columns: 1fr !important;
  }
  .holiday-year-bar .prb-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .users-toolbar {
    flex-direction: column;
    align-items: stretch !important;
  }
  .users-toolbar .srch,
  .users-toolbar .fsel {
    width: 100%;
  }
  .user-stat-strip.grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Page header responsiveness */
@media (max-width: 600px) {
  .page-header-right {
    justify-content: flex-end;
  }
  .page-header-left .page-sub {
    margin-left: 0;
  }
}

/* Profile page responsiveness */
@media (max-width: 900px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
  .profile-sidebar-card {
    position: static !important;
  }
}
@media (max-width: 600px) {
  .profile-section-body .form-row {
    grid-template-columns: 1fr !important;
  }
  .notif-pref-grid {
    grid-template-columns: 1fr !important;
  }
  .profile-sidebar-stats {
    padding: 12px;
  }
  .pw-reqs {
    grid-template-columns: 1fr;
  }
}

/* Users/table page responsiveness */

/* Payroll responsiveness */
@media (max-width: 600px) {
  .pay-sidebar {
    grid-template-columns: 1fr !important;
  }
}

/* Modal responsiveness */
@media (max-width: 480px) {
  .modal {
    overflow-y: auto;
  }
  .modal-body {
    padding: 16px;
  }
  .modal-footer {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .modal-footer .btn {
    flex: 1;
  }
  .holiday-type-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Stat strip / ustat responsiveness */
@media (max-width: 480px) {
  .ustat-val {
    font-size: 20px !important;
  }
}

/* Payslip print area */
@media (max-width: 480px) {
  .payslip-header {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .payslip-meta {
    flex-direction: column;
    gap: 6px;
  }
  .payslip-meta-item {
    flex: 1 1 100%;
  }
}

/* Leave / attendance table */
@media (max-width: 600px) {
  .leave-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Topbar responsive */
@media (max-width: 400px) {
  .topbar-right {
    gap: 6px;
  }
  .btn-notif,
  .btn-theme {
    width: 34px;
    height: 34px;
  }
}

/* ============================================================
   PAYROLL PAGE — MAIN GRID + RUN BAR RESPONSIVENESS
   ============================================================ */
.payroll-main-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}

@media (max-width: 1100px) {
  .payroll-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Payroll run bar */
  .payroll-run-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px;
    padding: 16px 18px;
  }
  .payroll-run-bar .prb-actions {
    width: 100%;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .payroll-run-bar .prb-actions .btn {
    flex: 1;
    justify-content: center;
    min-width: 120px;
  }
}

@media (max-width: 640px) {
  .payroll-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  /* payslip modal: emp grid stacks */
  .payslip-emp {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .payroll-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   LEAVE PAGE — FULL RESPONSIVENESS
   ============================================================ */

/* Tabs row + refresh button */
@media (max-width: 768px) {
  .tab {
    flex: 1;
    min-width: 0;
  }
  /* Leave header buttons */
  .btn-pending {
    font-size: 12px;
    padding: 8px 12px;
  }
  /* Leave balance grid in sidebar */
  .leave-balance-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .leave-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 600px) {
  .leave-balance-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  /* Pending modal body max-height */
  #pendingModalBody {
    max-height: 60vh !important;
  }
  /* Pend item actions */
  .pend-actions {
    flex-wrap: wrap;
  }
  .pend-btn {
    flex: 1;
    justify-content: center;
  }
  /* ELS modal balance row */
  .els-balance-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* ELS stats row */
  .els-stats-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .els-stat-card {
    min-width: 0 !important;
  }
  /* Leave type badge in table - truncate */
  .leave-type-badge {
    font-size: 10px;
    padding: 3px 7px;
    white-space: nowrap;
  }
  /* Leave tabs */
  .tab {
    font-size: 11px;
    padding: 6px 8px;
  }
  .tab i {
    display: none;
  }
}

@media (max-width: 480px) {
  .els-stats-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .tab {
    flex-shrink: 0;
  }
}

/* ============================================================
   ATTENDANCE PAGE — FULL RESPONSIVENESS
   ============================================================ */

/* Summary stat row */
@media (max-width: 768px) {
  .att-summary-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* Toolbar: wrap date picker and selects */
  .users-toolbar > div {
    display: none;
  }
  .att-date-wrap {
    flex: 1;
    min-width: 160px;
  }
  .att-date-btn {
    width: 100%;
    justify-content: space-between;
  }
  /* hide dept + punch out columns */
}

@media (max-width: 600px) {
  .att-summary-row {
    grid-template-columns: 1fr 1fr !important;
  }
  /* Attendance table: hide more on small */
  /* Monthly attendance modal */
  .mam-modal {
    width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    max-height: 90vh !important;
    margin: auto 0 0 !important;
  }
  .mam-emp-card {
    padding: 14px 16px !important;
    flex-wrap: wrap;
  }
  .mam-month-selector {
    width: 100%;
    flex: none;
  }
  .mam-section {
    padding: 16px !important;
  }
  .mam-stats-bar {
    padding: 12px 16px !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  .mam-stats-bar > div {
    flex: none !important;
  }
}

@media (max-width: 480px) {
  .att-summary-row {
    grid-template-columns: 1fr 1fr !important;
  }
  .mam-stats-bar {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ============================================================
   SHARED TABLE RESPONSIVE FIXES FOR ALL PAGES
   ============================================================ */
/* Make all tables scroll horizontally on very small screens 
   as a fallback if column hiding isn't enough */

/* Toolbar wrapping behavior */
@media (max-width: 600px) {
  .users-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .users-toolbar .srch {
    width: 100%;
  }
  .users-toolbar .fsel {
    width: 100%;
  }
  .users-toolbar > div {
    width: 100%;
    flex-wrap: wrap;
  }
  /* icon refresh btn alignment */
  .icon-refresh-btn {
    align-self: flex-end;
  }
}

/* ============================================================
   PAGINATION RESPONSIVENESS
   ============================================================ */
@media (max-width: 480px) {
  .pagination {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
  }
  .pbtns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
}

/* ============================================================
   MODAL RESPONSIVENESS (ALL PAGES)
   ============================================================ */
@media (max-width: 600px) {
  /* Leave types modal — icon picker grid */
  #ltIconPicker {
    gap: 5px !important;
  }
}

/* ============================================================
   LEAVE BALANCE GRID ON LEAVE PAGE (leaveBalanceGrid)
   ============================================================ */
@media (max-width: 900px) {
  #leaveBalanceGrid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
@media (max-width: 600px) {
  #leaveBalanceGrid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 400px) {
  #leaveBalanceGrid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ============================================================
   TABLE COLUMN RESPONSIVE HIDING — CLASS-BASED
   (More reliable than :has() selector for cross-browser)
   ============================================================ */

/* Attendance table */
@media (max-width: 768px) {
  .att-tbl-hide-md {
    display: none !important;
  }
}

/* Leave table */
@media (max-width: 768px) {
  .leave-tbl-hide-md {
    display: none !important;
  }
}
@media (max-width: 480px) {
  .leave-tbl-hide-sm {
    display: none !important;
  }
}

/* Payroll table */
@media (max-width: 900px) {
  .pay-tbl-hide-md {
    display: none !important;
  }
}
@media (max-width: 600px) {
  .pay-tbl-hide-sm {
    display: none !important;
  }
}

/* ============================================================
   USERS PAGE — FULL RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .users-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .users-toolbar .srch {
    flex: 1 1 200px;
    min-width: 160px;
  }
  .users-toolbar .fsel {
    flex: 1 1 130px;
    min-width: 110px;
  }
  .toolbar-right {
    margin-left: auto;
  }
}

@media (max-width: 900px) {
  /* Grid cards */
  .users-grid.active {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 700px) {
  .users-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .users-toolbar .srch,
  .users-toolbar .fsel {
    width: 100%;
    min-width: unset;
  }
  .users-toolbar .icon-refresh-btn {
    align-self: flex-end;
  }
  .toolbar-right {
    align-self: flex-end;
  }
  /* Page header stacks */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .page-header-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .user-stat-strip {
    gap: 10px;
  }
  .ustat {
    padding: 12px;
  }
  .ustat-val {
    font-size: 22px;
  }
  .users-grid.active {
    grid-template-columns: 1fr !important;
  }
  .bulk-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ============================================================
   USER DETAILS PAGE — FULL RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .ud-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .ud-span-2 {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .ud-hero-content {
    padding: 14px 18px 0;
  }
  .ud-hero-stats {
    padding: 16px 18px 0;
    flex-wrap: wrap;
    gap: 0;
  }
  .ud-hs {
    min-width: 140px;
    padding: 12px 16px 12px 0;
  }
  .ud-grid-2,
  .ud-grid-3 {
    grid-template-columns: 1fr;
  }
  .ud-span-2 {
    grid-column: span 1;
  }
  .ud-tabs-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 3px;
    -webkit-overflow-scrolling: touch;
  }
  .ud-tabs-bar::-webkit-scrollbar {
    height: 0;
  }
  .ud-tab {
    padding: 8px 12px;
    font-size: 12px;
    flex-shrink: 0;
  }
  .ud-att-summary-strip {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 700px) {
  .ud-hero-content {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 14px 0;
  }
  .ud-avatar-wrap {
    margin-bottom: 0;
  }
  .ud-avatar {
    width: 72px;
    height: 72px;
    font-size: 22px;
  }
  .ud-hero-bg {
    height: 90px;
  }
  .ud-hero-name {
    font-size: 16px;
  }
  .ud-hero-sub {
    font-size: 11px;
  }
  .ud-hero-stats {
    flex-direction: column;
    gap: 0;
  }
  .ud-hs + .ud-hs {
    border-left: none;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 12px;
  }
  .ud-hs {
    padding: 12px 0;
    min-width: unset;
  }
  .ud-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  /* Hide some table columns */

  .ud-fields-grid {
    grid-template-columns: 1fr !important;
  }
  .ud-att-summary-strip {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* page header on details */
  .ud-back-btn span {
    display: none;
  }
}

@media (max-width: 480px) {
  .ud-heatmap {
    gap: 3px;
  }
  .ud-hm-day {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }
  .ud-att-summary-strip {
    grid-template-columns: 1fr 1fr !important;
  }
  .ud-leave-chart-wrap {
    display: none;
  }
}

/* ============================================================
   EXIT USERS PAGE — FULL RESPONSIVE
   ============================================================ */

/* Exit users tabs responsive */
@media (max-width: 700px) {
  .exit-tabs-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .exit-tabs-bar::-webkit-scrollbar {
    height: 0;
  }
  .exit-tabs-bar .tab {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ============================================================
   PAYROLL PAGE — COMPLETE RESPONSIVE OVERHAUL
   ============================================================ */

/* ---- Toolbar: wrapping flex layout ---- */
.payroll-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

/* Ensure payroll users-toolbar always wraps */
.users-card .users-toolbar {
  flex-wrap: wrap;
}

/* Search stretches to fill available space */
.users-card .users-toolbar .srch {
  flex: 1 1 200px;
  min-width: 160px;
}

/* Selects are equal width and flexible */
.users-card .users-toolbar .fsel {
  flex: 1 1 130px;
  min-width: 110px;
  max-width: 200px;
}

/* Refresh button stays on same row */
.users-card .users-toolbar .icon-refresh-btn {
  flex-shrink: 0;
  margin-left: auto;
}

/* ---- Table: always scrollable on small screens ---- */
.users-tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.users-tbl-wrap .users-table {
  min-width: 640px;
}

/* ---- Payroll stat strip ---- */
.payroll-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

/* ---- Tablet: 1100px ---- */
@media (max-width: 1100px) {
  .payroll-summary-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ---- Medium: 900px ---- */
@media (max-width: 900px) {
  .users-card .users-toolbar {
    gap: 8px;
    padding: 12px 16px;
  }
  .users-card .users-toolbar .srch {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .users-card .users-toolbar .fsel {
    flex: 1 1 calc(50% - 8px);
    max-width: calc(50% - 8px);
  }
  .users-card .users-toolbar .icon-refresh-btn {
    flex: 0 0 auto;
    margin-left: 0;
  }
}

/* ---- Small mobile: 600px ---- */
@media (max-width: 600px) {
  .payroll-summary-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }
  .ustat {
    padding: 12px 14px;
  }
  .ustat-val {
    font-size: 20px !important;
  }
  .users-card .users-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px;
  }
  .users-card .users-toolbar .srch,
  .users-card .users-toolbar .fsel {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: unset;
    width: 100%;
    flex-wrap: nowrap;
  }
  .users-card .users-toolbar .icon-refresh-btn {
    align-self: flex-end;
    margin-left: auto;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .page-header-right {
    width: 100%;
    flex-wrap: wrap;
  }
  .page-header-right .btn {
    flex: 1;
    justify-content: center;
    min-width: 100px;
  }
  /* Table — horizontal scroll with min-width for all cols */
  .users-tbl-wrap .users-table {
    min-width: 580px;
  }
  .users-tbl-wrap .users-table th,
  .users-tbl-wrap .users-table td {
    white-space: nowrap;
    padding: 10px 10px;
    font-size: 12.5px;
  }
  .users-tbl-wrap .users-table .u-name {
    font-size: 12.5px;
  }
  .users-tbl-wrap .users-table .u-email {
    font-size: 11px;
  }
  .u-av {
    width: 30px !important;
    height: 30px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
  }
  /* Pagination responsive */
  .pagination {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
  }
  .pbtns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  /* Payslip modal responsive */
  .modal-backdrop .modal {
    margin: 8px !important;
    max-width: calc(100% - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
  }
  .payslip-emp {
    grid-template-columns: 1fr !important;
  }
}

/* ---- Very small: 400px ---- */
@media (max-width: 400px) {
  .payroll-summary-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .ustat {
    padding: 10px;
    gap: 8px;
  }
  .ustat-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 14px !important;
  }
  .ustat-val {
    font-size: 18px !important;
  }
  .ustat-lbl {
    font-size: 10px !important;
  }
}

/* ============================================================
   GLOBAL AUTOFILL / AUTOCOMPLETE SUPPRESSION
   Prevents browser from auto-filling search inputs with
   saved credentials (email/password autofill bug fix)
   ============================================================ */
input[type="search"]:-webkit-autofill,
input[type="search"]:-webkit-autofill:hover,
input[type="search"]:-webkit-autofill:focus,
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px var(--card-bg) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: var(--text);
}
/* ═══════════════════════════════════════
       DOCUMENT MANAGER STYLES
    ═══════════════════════════════════════ */

/* Wrap */
.docmgr-wrap {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

/* ── LEFT panel ── */
.docmgr-left {
  width: 252px;
  flex-shrink: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 400px;
  transition:
    width 0.25s,
    opacity 0.25s,
    min-height 0.25s;
  position: relative;
}

.docmgr-left.left-hidden {
  width: 0 !important;
  min-width: 0 !important;
  opacity: 0;
  pointer-events: none;
  border-width: 0;
  min-height: 0 !important;
  padding: 0;
  overflow: hidden;
}

.dml-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.dml-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}

.dml-title i {
  color: var(--primary);
}

.dml-toggle {
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  display: none;
}

.dml-toggle:hover {
  background: var(--bg);
  color: var(--text);
}

.dml-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.dml-search i {
  color: var(--text-muted);
  font-size: 12px;
  flex-shrink: 0;
}

.dml-search input {
  border: none;
  background: none;
  outline: none;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
  width: 100%;
}

.dml-search input::placeholder {
  color: var(--text-muted);
}

.dml-list {
  overflow-y: auto;
  flex: 1;
  padding: 7px 6px;
  scrollbar-width: thin;
}

.dml-list::-webkit-scrollbar {
  width: 3px;
}

.dml-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.emp-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 9px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.13s;
  margin-bottom: 2px;
}

.emp-item:hover {
  background: var(--bg);
}

.emp-item.active {
  background: var(--primary-light);
}

.emp-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.emp-nm {
  flex: 1;
  min-width: 0;
}

.emp-nm-top {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emp-item.active .emp-nm-top {
  color: var(--primary);
}

.emp-nm-bot {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.emp-cnt {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--border);
  color: var(--text-muted);
  flex-shrink: 0;
}

.emp-item.active .emp-cnt {
  background: var(--primary);
  color: #fff;
}

.emp-missing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
}

/* ── RIGHT panel ── */
.docmgr-right {
  flex: 1;
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Splash */
.doc-splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px;
  text-align: center;
}

.splash-ico {
  font-size: 52px;
  color: var(--border);
  margin-bottom: 14px;
}

.splash-h {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.splash-p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 300px;
}

/* Employee banner */
.emp-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(
    120deg,
    var(--primary-light) 0%,
    var(--card-bg) 60%
  );
  flex-wrap: wrap;
}

.show-left-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
  display: none !important;
}

.show-left-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.eb-av {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

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

.eb-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.eb-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.eb-pills {
  gap: 7px;
  flex-wrap: wrap;
  display: none;
}

.eb-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.pill-blue {
  background: var(--primary-light);
  color: var(--primary);
}

.pill-green {
  background: #f0fdf4;
  color: #16a34a;
}

.pill-orange {
  background: #fff7ed;
  color: #c2410c;
}

.eb-addbtn {
  flex-shrink: 0;
}

/* Missing docs alert */
.missing-wrap {
  margin: 14px 16px 0;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px 14px;
}

.missing-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 8px;
}

.missing-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.missing-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #fef3c7;
  border: 1px dashed #f59e0b;
  color: #92400e;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.missing-chip:hover {
  background: #f59e0b;
  color: #fff;
  border-color: #f59e0b;
}

/* Toolbar */
.doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
  flex-wrap: wrap;
  background: var(--card-bg);
}

.doc-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.doc-tabs::-webkit-scrollbar {
  display: none;
}

.dtab {
  padding: 8px 13px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.dtab:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.dtab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.28);
}

.dtab .tc {
  background: var(--border);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.dtab.active .tc {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.doc-tb-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* View switch */
.view-switch {
  display: flex;
  gap: 2px;
  background: var(--bg);
  border-radius: 8px;
  padding: 3px;
}

.vsw {
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.vsw:hover {
  color: var(--text);
}

.vsw.active {
  background: var(--card-bg);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ── Document Cards ── */
#docGridView {
  padding: 14px 16px;
}

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

.doc-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}

.doc-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.13);
  transform: translateY(-2px);
}

/* Top accent bar per category */
.doc-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 6px 6px 0 0;
}

.cat-identity::before {
  background: #8b5cf6;
}

.cat-employment::before {
  background: #6c5ce7;
}

.cat-payslip::before {
  background: #10b981;
}

.cat-letter::before {
  background: #f59e0b;
}

.cat-educational::before {
  background: #ec4899;
}

.cat-other::before {
  background: #64748b;
}

.dc-row1 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

/* File type icon box */
.dc-ficon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.fi-pdf {
  background: #fee2e2;
  color: #dc2626;
}

.fi-doc {
  background: #dbeafe;
  color: #8574e8;
}

.fi-xls {
  background: #dcfce7;
  color: #16a34a;
}

.fi-img {
  background: #fef3c7;
  color: #d97706;
}

.fi-gen {
  background: #f1f5f9;
  color: #475569;
}

/* Verify circle */
.dc-vbadge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

.vb-verified {
  background: #dcfce7;
  color: #15803d;
}

.vb-pending {
  background: #fef9c3;
  color: #854d0e;
}

.vb-rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.dc-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dc-type {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-muted);
}

.dc-expiry-warn {
  color: #ef4444;
  font-size: 10px;
  font-weight: 700;
}

.dc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.dc-date {
  font-size: 10.5px;
  color: var(--text-muted);
}

.dc-acts {
  display: flex;
  gap: 3px;
}

.dca {
  width: 24px;
  height: 24px;
  border: none;
  background: var(--card-bg);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.dca:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.dca.del:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* ── Category / verify pills ── */
.cpill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
}

.cp-identity {
  background: #ede9fe;
  color: #6d28d9;
}

.cp-employment {
  background: #dbeafe;
  color: #1e40af;
}

.cp-payslip {
  background: #dcfce7;
  color: #166534;
}

.cp-letter {
  background: #fef3c7;
  color: #92400e;
}

.cp-educational {
  background: #fce7f3;
  color: #9d174d;
}

.cp-other {
  background: #f1f5f9;
  color: #475569;
}

.vpill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.vp-verified {
  background: #dcfce7;
  color: #15803d;
}

.vp-pending {
  background: #fef9c3;
  color: #854d0e;
}

.vp-rejected {
  background: #fee2e2;
  color: #b91c1c;
}

/* ── View doc modal ── */
.vdrow {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.vdrow:last-child {
  border-bottom: none;
}

.vdlbl {
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 130px;
  flex-shrink: 0;
}

.vdval {
  font-weight: 600;
  color: var(--text);
  text-align: right;
  word-break: break-word;
  max-width: 58%;
}

/* ── Drop zone ── */
.upld-dz {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 26px 16px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 18px;
  color: var(--text-muted);
}

.upld-dz:hover,
.upld-dz.dz-on {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.upld-dz-ico {
  font-size: 28px;
  display: block;
  margin-bottom: 7px;
}

.upld-dz-h {
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 3px;
}

.upld-dz-h span {
  color: var(--primary);
  text-decoration: underline;
}

.upld-dz-s {
  font-size: 12px;
}

.upld-dz-f {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 8px;
  min-height: 18px;
}

/* Bulk file list */
.bfile-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 5px;
  font-size: 12.5px;
}

.bfile-row i {
  color: var(--primary);
  flex-shrink: 0;
}

.bfile-name {
  flex: 1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bfile-size {
  color: var(--text-muted);
  font-size: 11.5px;
  flex-shrink: 0;
}

.bfile-del {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  padding: 0 3px;
}

.bfile-del:hover {
  color: #ef4444;
}

/* ════════════ RESPONSIVE ════════════ */
@media (max-width: 1100px) {
  .doc-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
}

@media (max-width: 960px) {
  .docmgr-left {
    width: 220px;
  }

  .user-stat-strip {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 860px) {
  .docmgr-wrap {
    flex-direction: column;
  }

  .docmgr-left {
    width: 100% !important;
    min-height: unset;
  }

  .docmgr-left.left-hidden {
    max-height: 0;
    width: 100% !important;
    overflow: hidden;
  }

  .dml-list {
    max-height: 180px;
  }

  .doc-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  }
}

@media (max-width: 640px) {

  .page-header-right .btn {
    justify-content: center;
  }

  .emp-banner {
    padding: 12px 14px;
    gap: 10px;
  }

  .eb-pills {
    display: none;
  }

  .doc-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .doc-tb-right {
    width: 100%;
  }

  .doc-tb-right .srch {
    flex: 1;
  }

  .doc-card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .users-tbl-wrap {
    overflow-x: auto;
  }

  .form-row {
    flex-direction: column;
  }

  .form-row .form-group {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .xbtn-txt {
    display: none;
  }

  .doc-card-grid {
    grid-template-columns: 1fr;
  }

  .user-stat-strip {
    grid-template-columns: 1fr 1fr !important;
  }

  .users-tbl-wrap {
    margin: 0 8px 8px !important;
  }
}

/* ============================================================
   ADDITIONAL RESPONSIVE & FEATURE STYLES
   ============================================================ */

/* ── Increment button color ── */
.act-btn.increment-btn {
  color: #10b981;
}
.act-btn.increment-btn:hover {
  background: rgba(16, 185, 129, 0.1);
}

/* ── Attendance: punch detail chip ── */
.punch-detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(108, 92, 231, 0.1);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.punch-detail-chip:hover {
  background: rgba(108, 92, 231, 0.2);
}

/* ── Dashboard module tabs ── */
.dash-module-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.dash-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: "Nunito Sans", sans-serif;
}
.dash-tab i {
  font-size: 12px;
}
.dash-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.dash-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}
.dash-module-panel {
  display: none;
}
.dash-module-panel.active {
  display: block;
}

/* ── KPI mini cards ── */
.dash-kpi-card {
  border-radius: 6px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.dash-kpi-icon {
  font-size: 18px;
  opacity: 0.8;
  margin-bottom: 4px;
}
.dash-kpi-val {
  font-family: "Sora", sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}
.dash-kpi-lbl {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
}

/* ── Selfie upload ── */
.selfie-upload-wrap {
  width: 100%;
  height: 110px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  overflow: hidden;
  background: var(--bg);
}
.selfie-upload-wrap:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* ── Location detect ── */
.location-detect-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.location-detect-wrap .form-input {
  flex: 1;
  min-width: 0;
}
.btn-detect-loc {
  white-space: nowrap;
  padding: 0 14px;
  height: 40px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.btn-detect-loc:hover {
  opacity: 0.85;
}

/* ── Punch detail modal ── */
.pdm-selfie {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 14px;
  cursor: zoom-in;
}
.pdm-selfie-wrap { position: relative; }
.pdm-selfie-hint {
  position: absolute; right: 8px; bottom: 22px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 9px; border-radius: 20px; pointer-events: none;
}
/* Full-size selfie viewer (click a punch-in / punch-out selfie) */
.selfie-lightbox {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(8,10,18,.92);
  display: none; align-items: center; justify-content: center; flex-direction: column;
  padding: 56px 16px 24px;
}
.selfie-lightbox.open { display: flex; }
.selfie-lightbox img {
  max-width: min(96vw, 900px); max-height: calc(100vh - 120px);
  object-fit: contain; border-radius: 12px; box-shadow: 0 10px 50px rgba(0,0,0,.6);
  background: #111;
}
.selfie-lightbox .sl-cap { color: #e5e7eb; font-size: 13px; font-weight: 600; margin-top: 12px; text-align: center; }
.selfie-lightbox .sl-close {
  position: absolute; top: 14px; right: 16px;
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.18); color: #fff; font-size: 28px; line-height: 1; padding: 0 0 3px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.selfie-lightbox .sl-close:hover { background: rgba(239,68,68,.9); }
.pdm-loc-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

/* ── Salary increment history ── */
.inc-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.inc-history-row:last-child {
  border-bottom: none;
}

/* ── Responsive: attendance table ── */
@media (max-width: 900px) {
  .att-tbl-hide-md {
    display: none !important;
  }
}
@media (max-width: 600px) {
  .att-tbl-hide-sm {
    display: none !important;
  }
  .punch-detail-chip span {
    display: none;
  }
  .selfie-upload-wrap {
    height: 80px;
  }
  .location-detect-wrap {
    flex-wrap: wrap;
  }
  .btn-detect-loc {
    width: 100%;
    justify-content: center;
  }
}

/* ── Responsive: dashboard tabs ── */
@media (max-width: 768px) {
  .dash-module-tabs {
    gap: 4px;
  }
  .dash-tab span {
    display: none;
  }
  .dash-tab {
    padding: 8px 12px;
  }
  .dash-kpi-val {
    font-size: 16px;
  }
  .welcome-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .dash-module-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
}
@media (max-width: 480px) {
  .dash-kpi-card {
    padding: 10px 12px;
  }
  .dash-kpi-val {
    font-size: 14px;
  }
  .dash-kpi-lbl {
    font-size: 10px;
  }
}

/* ── General responsive improvements ── */
@media (max-width: 768px) {
  .att-summary-row {
    grid-template-columns: 1fr 1fr;
  }
  .users-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .users-toolbar > div {
    flex-wrap: wrap;
  }
  .mam-emp-card {
    flex-wrap: wrap;
    gap: 10px;
  }
  .mam-month-selector {
    width: 100%;
  }
  .mam-stats-bar {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .att-summary-row {
    grid-template-columns: 1fr 1fr;
  }
  .mam-stats-bar {
    grid-template-columns: 1fr 1fr;
  }
  .modal {
    margin: 10px;
    max-height: calc(100vh - 20px);
  }
  .form-row {
    flex-direction: column;
  }
  .form-row .form-group {
    width: 100%;
  }
}

/* ================================================================
   EMPLOYEE MODAL — WIZARD STEPS
   ================================================================ */
.emp-wizard-steps {
  display: flex;
  align-items: center;
  padding: 14px 24px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  gap: 0;
  overflow-x: auto;
}
.ews-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 70px;
  padding-bottom: 12px;
  cursor: default;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.ews-step.active {
  opacity: 1;
}
.ews-step.done {
  opacity: 1;
  cursor: pointer;
}
.ews-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  transition: all 0.25s;
}
.ews-step.active .ews-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.35);
}
.ews-step.done .ews-circle {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.ews-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: center;
}
.ews-step.active .ews-label {
  color: var(--primary);
}
.ews-step.done .ews-label {
  color: #10b981;
}
.ews-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 16px;
  margin-bottom: 20px;
  transition: background 0.25s;
}
.ews-line.done {
  background: #10b981;
}

/* Required field error */
.field-error {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.04) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* ================================================================
   USERS PAGE — Exited employee row highlight
   ================================================================ */
tr.row-exited {
  background: rgba(239, 68, 68, 0.04) !important;
}
tr.row-exited td:first-child {
  border-left: 3px solid #ef4444;
}
.badge-exited {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  font-size: 9.5px;
  font-weight: 800;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-left: 5px;
  vertical-align: middle;
}
.card-exited-banner {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

/* ================================================================
   EXIT USERS — Full detail modal (tabs like user-details)
   ================================================================ */
.exit-view-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.exit-view-tab {
  padding: 10px 18px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
}
.exit-view-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.exit-view-panel {
  display: none;
  padding-top: 14px;
}
.exit-view-panel.active {
  display: block;
}
.evm-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.evm-field {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
}
.evm-field.full {
  grid-column: 1/-1;
}
.evm-lbl {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}
.evm-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 600px) {
  .emp-wizard-steps {
    padding: 10px 12px 0;
  }
  .ews-step {
    min-width: 50px;
  }
  .ews-label {
    font-size: 9.5px;
  }
  .evm-info-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   EPF / PF TOGGLE SECTION — in employee modal Tab 3
   ================================================================ */
.epf-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 0;
  gap: 12px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.epf-toggle-card:has(input:checked) {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.08);
}
.epf-toggle-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.epf-toggle-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(108, 92, 231, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.epf-toggle-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.epf-toggle-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
/* Toggle switch */
.epf-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.epf-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.epf-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: 0.25s;
}
.epf-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.25s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.epf-switch input:checked + .epf-slider {
  background: var(--primary);
}
.epf-switch input:checked + .epf-slider::before {
  transform: translateX(20px);
}

/* EPF calc preview box */
.epf-preview-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 12px 0;
}
.epf-prev-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 12.5px;
  color: var(--text-muted);
  border-bottom: 1px dashed var(--border);
}
.epf-prev-row:last-child {
  border-bottom: none;
}
.epf-prev-row span:last-child {
  font-weight: 700;
  color: var(--text);
}
.epf-prev-total {
  font-weight: 800;
  color: var(--text) !important;
  font-size: 13px;
  padding-top: 8px;
}
.epf-prev-total span:last-child {
  color: var(--primary) !important;
  font-size: 14px;
}

/* ================================================================
   OFFICE SHIFTS PAGE
   ================================================================ */
.shift-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.shift-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 20px 22px;
  position: relative;
  transition:
    box-shadow 0.2s,
    transform 0.15s;
  overflow: hidden;
}
.shift-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.shift-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 6px;
}
.shift-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.shift-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.shift-card-title {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.shift-card-type {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.shift-card-actions {
  display: flex;
  gap: 6px;
}
.shift-time-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.shift-time-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}
.shift-time-sep {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
}
.shift-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.shift-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.shift-emp-count {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
}
.shift-emp-avatars {
  display: flex;
}
.shift-emp-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  margin-left: -6px;
  flex-shrink: 0;
}
.shift-emp-av:first-child {
  margin-left: 0;
}
.shift-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Shift assign modal — employee list */
.assign-emp-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 8px;
}
.assign-emp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.assign-emp-row:last-child {
  border-bottom: none;
}
.assign-emp-row:hover {
  background: var(--bg);
}
.assign-emp-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.assign-emp-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.assign-emp-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.assign-emp-sub {
  font-size: 11px;
  color: var(--text-muted);
}
/* ============================================================
           RESPONSIVE OVERRIDES
        ============================================================ */
@media (max-width: 900px) {
  .user-stat-strip {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {

  .page-header-right {
    display: flex;
    gap: 8px;
  }

  .users-toolbar .srch {
    width: 100%;
    min-width: unset;
  }
}

@media (max-width: 480px) {
  .user-stat-strip {
    grid-template-columns: 1fr 1fr !important;
  }

  .users-tbl-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ---- Status badge ---- */
.exp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.exp-badge.active-badge {
  background: #f0fdf4;
  color: #15803d;
}

.exp-badge.inactive-badge {
  background: #f1f5f9;
  color: #64748b;
}

/* ---- Category cell ---- */
.cat-name-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}

.cat-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cat-name-text {
  font-weight: 700;
  font-size: 13.5px;
}

.cat-id-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ---- Month chip ---- */
.month-exp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
}

.month-exp-zero {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---- Color picker ---- */
.cat-color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.cat-color-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  outline: none;
  transition:
    transform 0.15s,
    border-color 0.15s;
}

.cat-color-btn:hover {
  transform: scale(1.2);
}

.cat-color-btn.active {
  border-color: #1e293b;
  transform: scale(1.2);
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3px #1e293b;
}
@media (max-width: 600px) {
  .shift-cards-grid {
    grid-template-columns: 1fr;
  }
  .epf-toggle-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ===== COMPREHENSIVE RESPONSIVE ADDITIONS ===== */

/* Settings page responsive */
@media (max-width: 900px) {
  div[style*="grid-template-columns:220px"] {
    grid-template-columns: 1fr !important;
  }
  #settingsNav {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px;
    padding-bottom: 8px;
  }
  .settings-nav-btn {
    width: auto !important;
    flex: 0 0 auto;
    font-size: 12px !important;
    padding: 7px 12px !important;
  }
}

/* Dashboard module tabs responsive */
@media (max-width: 600px) {
  .dash-module-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
  }
  .dash-tab {
    flex-shrink: 0;
    padding: 8px 12px !important;
  }
  .dash-tab span {
    display: none;
  }
}

/* Dashboard stat strip: all 6 cards compact, in ONE row, count shown beside the icon */
.stats-grid.dash-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.dash-stats .stat-card {
  padding: 12px 12px 11px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon count" "label label" "trend trend";
  align-items: center;
  justify-items: start;
  column-gap: 10px;
  row-gap: 0;
}
.dash-stats .stat-card:hover { transform: translateY(-2px); }
.dash-stats .stat-icon {
  grid-area: icon;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 14px;
  margin-bottom: 0;
}
.dash-stats .stat-count {
  grid-area: count;
  font-size: 22px;
  margin: 0;
}
.dash-stats .stat-label {
  grid-area: label;
  font-size: 11.5px;
  line-height: 1.25;
  margin: 8px 0 6px;
}
.dash-stats .stat-trend {
  grid-area: trend;
  font-size: 10px;
  padding: 2px 8px;
}
/* Celebrations card: same compact footprint (photo ring + name beside it) */
.dash-stats .stat-card.sc5 {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.dash-stats .stat-cel-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}
.dash-stats .stat-cel-body { width: 100%; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.dash-stats .cfx-cc-slide { gap: 9px; padding: 6px 8px; }
.dash-stats .cfx-cc-av { width: 34px; height: 34px; flex: 0 0 34px; }
.dash-stats .cfx-cc-ring { inset: -2px; }
.dash-stats .cfx-cc-ph { font-size: 12px; }
.dash-stats .cfx-cc-em { font-size: 12px; right: -6px; bottom: -6px; }
.dash-stats .cfx-cc-tx b { font-size: 12px; }
.dash-stats .cfx-cc-tx span { font-size: 10px; margin-top: 1px; }
.dash-stats .cfx-cc-dots { margin-top: 4px; }
.dash-stats .cfx-cc-empty { padding: 6px 8px; gap: 9px; }
.dash-stats .cfx-cc-empty .ic { width: 34px; height: 34px; flex: 0 0 34px; font-size: 14px; }
.dash-stats .cfx-cc-empty b { font-size: 11.5px; }
.dash-stats .cfx-cc-empty span { display: none; }
@media (max-width: 1100px) {
  .stats-grid.dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Stats grid responsive */
@media (max-width: 600px) {
  .user-stat-strip.grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Page header responsive */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
  }
  .page-header-right {
    width: 100%;
    flex-wrap: wrap;
  }
  .page-header-right .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }
}

/* Users/table card responsive */
@media (max-width: 768px) {
  .users-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .users-toolbar .srch {
    flex: 1 1 100%;
  }
  .users-toolbar .fsel {
    flex: 1;
    min-width: 130px;
  }
  .users-tbl-wrap {
    overflow-x: auto;
  }
}

/* Modal responsive */
@media (max-width: 600px) {
  .modal {
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    max-height: 95vh !important;
    width: 100% !important;
    max-width: 100% !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
  }
  .modal-backdrop {
    align-items: flex-end !important;
  }
  .modal-footer {
    flex-wrap: wrap;
    gap: 8px;
  }
  .modal-footer .btn {
    flex: 1;
    min-width: 100px;
    justify-content: center;
  }
  .form-row {
    flex-direction: column !important;
    gap: 0 !important;
  }
  .form-row .form-group {
    width: 100% !important;
  }
}

/* Bottom grid (card layout) responsive */
@media (max-width: 900px) {
  .bottom-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Topbar responsive */
@media (max-width: 600px) {
  .topbar-center {
    display: none !important;
  }
  .topbar-right {
    gap: 4px !important;
  }
}

/* Employee modal tabs responsive */
@media (max-width: 600px) {
  .emp-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .emp-tab-btn {
    flex-shrink: 0;
    font-size: 11px !important;
    padding: 8px 10px !important;
  }
  .emp-tab-btn span {
    display: none;
  }
}

/* Dashboard KPI cards responsive */
@media (max-width: 500px) {
  .dash-kpi-card {
    padding: 14px 12px !important;
  }
  .dash-kpi-val {
    font-size: 22px !important;
  }
}

/* Notification panel responsive */
@media (max-width: 480px) {
  .notif-panel {
    right: -50px !important;
    width: 300px !important;
  }
}

/* ===================================================
   ATTENDANCE - Inline styles migrated from attendance.php
   =================================================== */

/* Shift day pills */
.shift-day-pill input {
  display: none;
}
.shift-day-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 32px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.shift-day-pill input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Shift panel row */
.spr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  transition: box-shadow 0.15s;
}
.spr:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}
.spr-accent {
  width: 4px;
  border-radius: 4px;
  align-self: stretch;
  flex-shrink: 0;
}
.spr-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}
.spr-info {
  flex: 1;
  min-width: 0;
}
.spr-name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
}
.spr-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.spr-badge {
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.spr-actions {
  display: flex;
  gap: 6px;
}

/* Punch-out chip - purple tint */
.punch-out-chip {
  background: rgba(139, 92, 246, 0.1) !important;
  color: #8b5cf6 !important;
}
.punch-out-chip:hover {
  background: rgba(139, 92, 246, 0.18) !important;
}

/* ============================================================
   SHARED PAGE COMPONENTS — status dot, row action menu (UAM),
   detail fields and the tabs + filters toolbar
   ============================================================ */

/* ── Status dot in tabs ── */
.tk-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 2px;
  flex-shrink: 0;
}

/* ── Form sections ── */

/* ── UAM ── */
.uam-wrap {
  position: relative;
  display: inline-block;
}
.uam-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.uam-trigger:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.uam-menu {
  position: fixed;
  z-index: 999999;
  min-width: 190px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.uam-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.uam-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
}
.uam-item:hover {
  background: var(--bg);
}
.uam-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11.5px;
  background: var(--bg);
}
.uam-divider {
  height: 1px;
  background: var(--border);
  margin: 3px 0;
}

/*  ── Detail fields ──  */
.tv-fld {
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 9px;
  border: 1px solid var(--border);
}
.tv-fld-lbl {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}
.tv-fld-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ── Tabs + Inline Toolbar Row ── */
.req-tabs-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 0;
  flex-wrap: wrap;
}
.req-inline-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.req-srch-compact {
  width: 200px;
  min-width: 160px;
}
.req-inline-filters .fsel {
  width: 140px;
  min-width: 120px;
}

/*  ── Tabs + filters toolbar responsive ──  */
@media (max-width: 900px) {
  .req-tabs-toolbar-row {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px 0;
    gap: 10px;
  }
  .req-inline-filters {
    width: 100%;
    flex-wrap: wrap;
  }
  .req-srch-compact {
    width: 100%;
    flex: 1 1 100%;
    order: -1;
  }
  .req-inline-filters .fsel {
    flex: 1;
    min-width: 120px;
  }
}
@media (max-width: 768px) {
  .tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    padding-bottom: 4px;
  }
  .tabs::-webkit-scrollbar {
    height: 3px;
  }
  .tabs::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
  }
  .tab {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px;
    padding: 6px 10px;
  }
  #leaveTabsGroup .tab {
    flex: none;
  }
  .tab-count {
    font-size: 10px;
    padding: 1px 5px;
  }
}
@media (max-width: 550px) {
  .req-inline-filters .fsel {
    min-width: calc(50% - 5px);
    flex: 1 1 calc(50% - 5px);
  }
  .page-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  .page-header-right {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .page-header-right .btn {
    flex: 1;
    justify-content: center;
    white-space: nowrap;
  }
  .user-stat-strip.grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 380px) {
  .tabs {
    gap: 2px;
  }
  .tab {
    padding: 5px 8px;
    font-size: 11px;
  }
}

/* =============================================================
   HOLIDAYS PAGE — extracted from holidays.php
   ============================================================= */
/* ── Multi-select dropdown ── */
.hms-wrap {
  position: relative;
}
.hms-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s;
}
.hms-trigger:hover {
  border-color: var(--primary);
  color: var(--text);
}
.hms-arrow {
  font-size: 10px;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.hms-drop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 9990;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.hms-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.hms-search {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.hms-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 12px;
  color: var(--text);
  flex: 1;
}
.hms-all-chk {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.hms-list {
  max-height: 190px;
  overflow-y: auto;
  padding: 6px 0;
}
.hms-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
}
.hms-item:hover {
  background: var(--bg);
}
.hms-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── View Holiday Modal detail rows ── */
.vh-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vh-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
}
.vh-lbl {
  min-width: 130px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.vh-lbl i {
  color: var(--primary);
  width: 14px;
  text-align: center;
}
.vh-val {
  color: var(--text);
  font-weight: 600;
  flex: 1;
  word-break: break-word;
}

/* ── Regional State Row animation ── */
#hStateRow {
  overflow: hidden;
  transition: opacity 0.2s ease;
}
#hStateRow[style*="display:none"],
#hStateRow[style*="display: none"] {
  opacity: 0;
  pointer-events: none;
}
#hStateRow:not([style*="display:none"]) {
  opacity: 1;
}

/* ── Date Range Trigger Input ── */
.hdr-range-display {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  cursor: pointer;
  user-select: none;
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
}

.hdr-range-display:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.hdr-range-display.has-value {
  color: var(--text);
  border-color: var(--primary);
  background: var(--primary-light);
}

.hdr-disp-icon {
  color: var(--primary);
  font-size: 13px;
  flex-shrink: 0;
}

.hdr-range-display span {
  flex: 1;
}

.hdr-disp-arrow {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

/* ── Calendar Wrapper ── */
.hdr-calendar-wrap {
  margin-top: 6px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

/* ── Nav Header ── */
.hdr-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  background: linear-gradient(135deg, var(--primary), #1a9fd4);
}

.hdr-cal-month-label {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.2px;
}

.hdr-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: background 0.15s;
}

.hdr-nav-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

/* ── Day Headers ── */
.hdr-cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 8px 10px 4px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.hdr-cal-days-header span {
  text-align: center;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Grid ── */
.hdr-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  padding: 8px 10px 10px;
  background: var(--card-bg);
}

.hdr-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition:
    background 0.12s,
    color 0.12s;
  position: relative;
}

.hdr-cell:not(.hdr-empty):not(.hdr-start):not(.hdr-end):hover {
  background: var(--primary-light);
  color: var(--primary);
}

.hdr-cell.hdr-empty {
  cursor: default;
  pointer-events: none;
}

.hdr-cell.hdr-today {
  font-weight: 900;
  color: var(--primary);
}

.hdr-cell.hdr-today::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
}

.hdr-cell.hdr-start {
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: 8px 0 0 8px;
  font-weight: 800;
}

.hdr-cell.hdr-end {
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: 0 8px 8px 0;
  font-weight: 800;
}

.hdr-cell.hdr-start.hdr-end {
  border-radius: 8px !important;
}

.hdr-cell.hdr-in-range {
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 0;
}

/* ── Footer with OK button ── */
.hdr-cal-footer {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  gap: 10px;
}

.hdr-cal-sel-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.hdr-ok-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border-radius: 4px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}

.hdr-ok-btn:hover {
  background: var(--primary-dark, #0f6aa8);
}

/* =============================================================
   REPORT PAGES — RESPONSIVE CHART GRIDS
   ============================================================= */

.rpt-chart-row-wide {
  grid-template-columns: 2fr 1fr;
}
.rpt-chart-row-half {
  grid-template-columns: 1fr 1fr;
}
.rpt-chart-row-thirds {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Tablet: stack side-by-side cols */
@media (max-width: 1024px) {
  .rpt-chart-row-wide {
    grid-template-columns: 1fr 1fr;
  }
  .rpt-chart-row-thirds {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile: fully stack */
@media (max-width: 640px) {
  .rpt-chart-row-wide,
  .rpt-chart-row-half,
  .rpt-chart-row-thirds {
    grid-template-columns: 1fr;
  }
  /* Reduce chart heights on mobile */
  .chart-box {
    height: 180px !important;
  }
  .users-card .users-toolbar {
    flex-wrap: wrap;
  }
  .users-card .users-toolbar .srch {
    width: 100%;
    min-width: unset;
  }
  .users-card .users-toolbar .fsel {
    flex: 1;
    min-width: 120px;
  }
  /* Report page header stacking */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .page-header-right {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-header-right .btn,
  .page-header-right .fsel {
    flex: 1;
    min-width: 100px;
  }
}

/* Very small screens */
@media (max-width: 400px) {
  .chart-box {
    height: 160px !important;
  }
  .user-stat-strip {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ============================================================
   FLATPICKR — Navy theme (matches app palette, light + dark)
   ============================================================ */
.flatpickr-calendar {
  background: var(--card-bg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: "Nunito Sans", sans-serif;
}
.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
  border-bottom-color: var(--card-bg);
}
.flatpickr-months .flatpickr-month {
  background: var(--primary);
  border-radius: 12px 12px 0 0;
  color: #fff;
}
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: #fff;
  font-weight: 700;
}
.flatpickr-current-month .flatpickr-monthDropdown-months option {
  color: #101a33;
}
.flatpickr-weekdays {
  background: var(--primary);
}
span.flatpickr-weekday {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
}
.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  fill: #fff;
}
.flatpickr-day {
  color: var(--text);
  border-radius: 8px;
}
.flatpickr-day.today {
  border-color: var(--primary);
}
.flatpickr-day:hover,
.flatpickr-day:focus {
  background: var(--primary-light);
  border-color: var(--primary-light);
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.flatpickr-day.inRange {
  background: var(--primary-light);
  box-shadow: -5px 0 0 var(--primary-light), 5px 0 0 var(--primary-light);
  border-color: var(--primary-light);
}
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: var(--text-light);
  opacity: 0.5;
}
.monthSelectPlugin-month.selected,
.monthSelectPlugin-month.selected:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}
.monthSelectPlugin-month:hover {
  background: var(--primary-light) !important;
}
input.flatpickr-date-input,
input.flatpickr-month-input,
input.flatpickr-input {
  cursor: pointer;
}
[data-theme="dark"] .flatpickr-calendar {
  box-shadow: var(--shadow-lg);
}


/* ================================================================
   LEAVE MANAGEMENT PAGE — table, Pending Approvals drawer
================================================================ */
.lv-tbl-wrap { overflow-x: auto; }
.lv-table { min-width: 760px; }
.lv-table td { vertical-align: middle; }
.lv-th-act { width: 110px; text-align: right; }
.lv-emp-link { color: var(--text); }
.user-cell:hover .lv-emp-link { color: var(--primary); }
.lv-period { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
.lv-period i { font-size: 9px; color: var(--text-light); margin: 0 3px; }
.lv-days { display: flex; align-items: baseline; gap: 4px; }
.lv-days b { font-family: "Sora", sans-serif; font-size: 15px; font-weight: 700; color: var(--text); }
.lv-days span { font-size: 11px; color: var(--text-light); font-weight: 600; }
.lv-sess { margin-top: 3px; font-size: 10.5px; font-weight: 600; color: #3b82f6; white-space: nowrap; }
.lv-reason { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); font-size: 12.5px; }
.lv-status { text-transform: capitalize; }
.lv-acts { justify-content: flex-end; flex-wrap: nowrap; }
.lv-acts .act-btn { flex-shrink: 0; }
.act-btn.lv-ok { color: #10b981; }
.act-btn.lv-ok:hover { border-color: #10b981; background: rgba(16, 185, 129, 0.08); color: #10b981; }
.act-btn.lv-no { color: #ef4444; }

.pend-modal { width: 560px; max-width: 100vw; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
@media (min-width: 601px) { .pend-modal { height: 100vh; max-height: 100vh; } }
@media (max-width: 600px) { .pend-modal { max-height: 92vh; } }
.pend-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 24px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary) 0%, #8574e8 100%);
}
.pend-head-l, .pend-head-r { display: flex; align-items: center; gap: 12px; }
.pend-head-ic { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.2); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.pend-head-t { font-family: "Sora", sans-serif; font-size: 16px; font-weight: 800; color: #fff; }
.pend-head-s { font-size: 11.5px; color: rgba(255,255,255,.78); margin-top: 1px; }
.pend-head-count { background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 20px; padding: 3px 12px; font-size: 11.5px; font-weight: 800; }
.pend-head-x { width: 32px; height: 32px; border-radius: 6px; border: none; background: rgba(255,255,255,.18); color: #fff; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pend-head-x:hover { background: rgba(255,255,255,.3); }
.pend-body { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.pend-body > .pend-empty { margin: auto; }
.pend-body .pend-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.pend-body .pend-item:last-child { border-bottom: 1px solid var(--border); }
.pend-body .pend-item:hover { border-color: var(--primary); }
.pend-foot { flex-shrink: 0; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--card-bg); display: flex; justify-content: flex-end; }

/* ================================================================
   SCROLL LOCK — page behind an open popup / right panel never scrolls.
   Toggled by assets/js/scroll-lock.js (html.hrms-scroll-locked).
   Body is pinned (position:fixed, top set by JS) — works on iOS too;
   overflow-y:scroll keeps the scrollbar gutter so nothing shifts.
   ================================================================ */
html.hrms-scroll-locked {
  overflow-y: scroll;
}
html.hrms-scroll-locked body {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

/* Popups scroll INSIDE themselves only when their content overflows,
   and never hand the scroll over to the page below. */
.modal-backdrop,
.action-confirm-backdrop,
.ctp-backdrop {
  overscroll-behavior: contain;
}
.modal,
.modal-body,
.els-body,
.els-table-wrap,
.mam-body,
.pend-body {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ── Employee-name link (opens the details popup; replaces the old "View" action column) ── */
.emp-name-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}
.emp-name-link:hover,
.emp-name-link:focus-visible {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

/* ===== Payroll: status pills + bulk status bar ===== */
.pay-st{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:6px;font-size:11.5px;font-weight:700;white-space:nowrap;}
.pay-st i{font-size:10.5px;}
.pay-st-pending{background:#fef3c7;color:#92400e;}
.pay-st-processed{background:#dbeafe;color:#1e40af;}
.pay-st-paid{background:#d1fae5;color:#065f46;}
.pay-st-hold{background:#fee2e2;color:#991b1b;}
.pay-st-draft{background:#f1f5f9;color:#64748b;}
.pay-chk{width:16px;height:16px;cursor:pointer;accent-color:var(--primary);vertical-align:middle;}
.pay-chk:disabled{cursor:not-allowed;opacity:.35;}
.pay-bulk-bar{display:none;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 16px;background:var(--primary-light);border-bottom:1px solid var(--border);}
.pay-bulk-bar.show{display:flex;}
.pay-bulk-bar .pb-count{font-size:13px;font-weight:700;color:var(--primary);}
.pay-bulk-bar .pb-note{font-weight:600;color:var(--text-muted);font-size:12px;margin-left:6px;}
.pay-bulk-bar .pb-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.pay-bulk-bar .pb-actions label{font-size:12.5px;font-weight:600;color:var(--text-muted);}
.users-table tr.pay-row-sel{background:var(--primary-light);}
.uam-item.uam-st-active{font-weight:800;pointer-events:none;opacity:.6;}
@media (max-width:600px){.pay-bulk-bar{padding:10px 12px;}.pay-bulk-bar .pb-actions{width:100%;}}

/* ===== Searchable multi-select (Mark Attendance → Employee) ===== */
.ms-wrap{position:relative;width:100%;}
.ms-trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;border:1.5px solid transparent;border-radius:4px;background:var(--bg);color:var(--text-muted);font:inherit;font-size:13px;text-align:left;cursor:pointer;}
.ms-trigger:focus,.ms-trigger[aria-expanded="true"]{outline:none;border-color:var(--primary);background:var(--card-bg);box-shadow:0 0 0 3px rgba(108,92,231,.1);}
.ms-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ms-label.has-val{color:var(--text);font-weight:600;}
.ms-caret{font-size:11px;color:var(--text-muted);transition:transform .15s;}
.ms-trigger[aria-expanded="true"] .ms-caret{transform:rotate(180deg);}
.ms-panel{display:none;margin-top:6px;border:1.5px solid var(--border);border-radius:6px;background:var(--card-bg);overflow:hidden;}
.ms-panel.open{display:block;}
.ms-search{position:relative;padding:8px;border-bottom:1px solid var(--border);}
.ms-search i{position:absolute;left:18px;top:50%;transform:translateY(-50%);font-size:12px;color:var(--text-muted);pointer-events:none;}
.ms-search input{width:100%;box-sizing:border-box;padding:9px 12px 9px 32px;border:1.5px solid transparent;border-radius:4px;background:var(--bg);color:var(--text);font:inherit;font-size:13px;outline:none;}
.ms-search input:focus{border-color:var(--primary);background:var(--card-bg);}
.ms-all,.ms-item{display:flex;align-items:center;gap:10px;padding:9px 12px;cursor:pointer;font-size:13px;color:var(--text);}
.ms-all{font-weight:700;border-bottom:1px solid var(--border);background:var(--primary-light);color:var(--primary);}
.ms-item:hover{background:var(--bg);}
.ms-list{max-height:230px;overflow-y:auto;overscroll-behavior:contain;}
.ms-av{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;color:#fff;flex-shrink:0;}
.ms-nm{display:flex;flex-direction:column;min-width:0;line-height:1.25;}
.ms-nm b{font-weight:600;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ms-nm small{font-size:11px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ms-empty{padding:18px;text-align:center;font-size:12.5px;color:var(--text-muted);}
.ms-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;max-height:92px;overflow-y:auto;}
.ms-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 4px 3px 10px;border-radius:6px;background:var(--primary-light);color:var(--primary);font-size:12px;font-weight:600;}
.ms-chip button{border:0;background:transparent;color:inherit;width:18px;height:18px;border-radius:4px;cursor:pointer;font-size:10px;padding:0;}
.ms-chip button:hover{background:rgba(108,92,231,.18);}
.ms-chip.ms-more{padding-right:10px;}
.ms-hint{margin-top:6px;font-size:11.5px;color:var(--text-muted);}

/* ===== Pending join-requests popup (shown after Admin login) ===== */
.jrp-backdrop{position:fixed;inset:0;z-index:99980;display:none;align-items:center;justify-content:center;padding:16px;background:rgba(15,23,42,.5);backdrop-filter:blur(3px);opacity:0;transition:opacity .2s;}
.jrp-backdrop{display:flex;visibility:hidden;}
.jrp-backdrop.open{visibility:visible;opacity:1;}
.jrp-card{width:460px;max-width:100%;max-height:calc(100vh - 32px);display:flex;flex-direction:column;background:var(--card-bg);border-radius:14px;box-shadow:0 24px 60px rgba(15,23,42,.3);overflow:hidden;transform:translateY(14px) scale(.97);transition:transform .25s cubic-bezier(.16,1,.3,1);}
.jrp-backdrop.open .jrp-card{transform:none;}
.jrp-head{display:flex;align-items:center;gap:12px;padding:18px 18px 14px;border-bottom:1px solid var(--border);}
.jrp-ic{width:42px;height:42px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:var(--primary-light);color:var(--primary);font-size:17px;flex-shrink:0;}
.jrp-title{font-family:'Sora',sans-serif;font-size:16px;font-weight:700;color:var(--text);}
.jrp-sub{font-size:12px;color:var(--text-muted);margin-top:2px;}
.jrp-x{margin-left:auto;width:30px;height:30px;border:0;border-radius:6px;background:transparent;color:var(--text-muted);cursor:pointer;font-size:14px;}
.jrp-x:hover{background:var(--bg);color:var(--text);}
.jrp-list{overflow-y:auto;overscroll-behavior:contain;padding:6px 8px;min-height:0;}
.jrp-item{display:flex;align-items:center;gap:12px;padding:10px;border-radius:8px;text-decoration:none;color:var(--text);}
.jrp-item:hover{background:var(--bg);}
.jrp-av{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,#6c5ce7,#8b7cf6);color:#fff;font-size:12px;font-weight:800;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.jrp-main{display:flex;flex-direction:column;min-width:0;flex:1;line-height:1.3;}
.jrp-main b{font-size:13.5px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.jrp-main small{font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.jrp-time{font-size:11.5px;color:var(--text-muted);white-space:nowrap;flex-shrink:0;}
.jrp-foot{display:flex;justify-content:flex-end;gap:10px;padding:14px 18px;border-top:1px solid var(--border);}
@media (max-width:520px){.jrp-foot .btn{flex:1;justify-content:center;}.jrp-time{display:none;}}

/* ===== v3_25 responsive hardening (additive — only affects small screens) ===== */
html, body { max-width: 100%; }
img, video, canvas, svg { max-width: 100%; }
.main-content > *, .users-card, .card, .grid-custom > *, .overview-charts-grid > * { min-width: 0; }
.users-tbl-wrap, .tbl-wrap, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 768px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-left { width: auto; min-width: 0; flex: 0 1 auto; }
  .topbar-right { flex-shrink: 0; margin-left: auto; }
  .page-header { flex-wrap: wrap; gap: 10px; }
  .page-header-right { flex-wrap: wrap; gap: 8px; max-width: 100%; }
  .page-header-right > .fsel, .page-header-right > select { flex: 1 1 120px; min-width: 0; max-width: 100%; }
}
@media (max-width: 480px) {
  .profile-btn { padding: 3px; gap: 0; margin-left: 0; }
  .profile-btn .profile-chevron { display: none; }
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; max-width: 100%; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs .tab { flex: 0 0 auto; white-space: nowrap; padding: 8px 12px; }
  .modal, .modal-box, .modal-card { max-width: calc(100vw - 20px); }
  .users-toolbar { flex-wrap: wrap; gap: 8px; }
  .users-toolbar .srch { flex: 1 1 100%; min-width: 0; }
  .users-toolbar select, .users-toolbar .fsel { flex: 1 1 130px; min-width: 0; }
}
.user-stat-strip > *, .security-layout > *, .profile-layout > *, .security-col > *, .profile-main > * { min-width: 0; }
.session-item, .lh-item { flex-wrap: wrap; word-break: break-word; }

/* ===== Sidebar section labels (Main / Organization / Finance / Tools …) hidden ===== */
.sidebar .nav-label { display: none !important; }

/* Logo area never shrinks on desktop — even if an old cached script sets an inline width on it */
@media (min-width: 769px) {
  .topbar-left { width: var(--sidebar-width) !important; min-width: var(--sidebar-width) !important; }
  .topbar-left .logo, .topbar-left .logo-img { flex: 0 0 auto; width: auto !important; max-width: none !important; }
}

/* ================================================================
   TABS INSIDE THE FILTER ROW (Leave + Attendance)
================================================================ */
.users-toolbar .tabs { flex: 0 0 auto; }
@media (max-width: 900px) {
  .users-card .users-toolbar > .tabs,
  .users-card .users-toolbar > div > .tabs { flex: 1 1 100%; max-width: 100%; }
}

/* ================================================================
   ATTENDANCE — MONTHLY VIEW (all employees × days matrix)
================================================================ */
.att-mx-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.users-tbl-wrap .att-mx { min-width: 100%; width: max-content; border-collapse: separate; border-spacing: 0; }
.att-mx th, .att-mx td { text-align: center; white-space: nowrap; }
.att-mx th { padding: 8px 3px; }
.att-mx td { padding: 8px 3px; font-size: 12px; }
.att-mx .mx-emp { position: sticky; left: 0; z-index: 2; text-align: left; min-width: 200px; padding: 8px 14px 8px 16px; background: var(--card-bg); box-shadow: 1px 0 0 var(--border); }
.att-mx thead .mx-emp { background: var(--bg); z-index: 3; }
.att-mx tbody tr:hover td.mx-emp { background: var(--bg); }
.att-mx .mx-day { min-width: 32px; }
.att-mx .mx-dh span { display: block; font-size: 12px; font-weight: 800; color: var(--text); letter-spacing: 0; }
.att-mx .mx-dh small { display: block; font-size: 9px; font-weight: 700; color: var(--text-light); letter-spacing: .4px; }
.att-mx .mx-off { background: rgba(100, 116, 139, .07); }
.att-mx .mx-sum { min-width: 40px; font-weight: 800; border-left: 1px solid var(--border); }
.att-mx th.mx-sum { color: var(--text-light); }
.att-mx td.mx-sum { color: var(--text); font-size: 12.5px; }
.att-mx .mx-sum.s-p { color: #10b981; } .att-mx .mx-sum.s-a { color: #ef4444; }
.att-mx .mx-sum.s-l { color: #f59e0b; } .att-mx .mx-sum.s-lt { color: #f97316; }
.att-mx .mx-sum.s-hd { color: #8b5cf6; } .att-mx .mx-sum.s-sl { color: #14b8a6; }
.mx-b { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 4px; border-radius: 6px; font-size: 10.5px; font-weight: 800; cursor: default; line-height: 1; }
.mx-b.p  { background: rgba(16,185,129,.14);  color: #10b981; }
.mx-b.a  { background: rgba(239,68,68,.14);   color: #ef4444; }
.mx-b.nm { background: transparent; color: #ef4444; border: 1px dashed rgba(239,68,68,.55); }
.mx-b.l  { background: rgba(245,158,11,.16);  color: #f59e0b; }
.mx-b.lt { background: rgba(249,115,22,.15);  color: #f97316; }
.mx-b.hd { background: rgba(139,92,246,.15);  color: #8b5cf6; }
.mx-b.sl { background: rgba(20,184,166,.15);  color: #14b8a6; }
.mx-b.h  { background: rgba(14,165,233,.15);  color: #0ea5e9; }
.mx-b.w  { background: transparent; color: var(--text-light); font-weight: 700; }
.mx-b.f  { background: transparent; color: var(--text-light); opacity: .5; font-weight: 700; }
.att-mx-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-muted); align-items: center; }
.att-mx-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ── SaaS: free-trial / renewal strip + Plan & Billing page ── */
.plan-banner{margin-top:var(--topbar-height);display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 20px;background:#fff7e6;border-bottom:1px solid #fde2a8;color:#8a5a00;font-size:13px}
.plan-banner.urgent{background:#fdecec;border-bottom-color:#f6c4c4;color:#a4262c}
.plan-banner a{margin-left:auto;font-weight:700;color:inherit;text-decoration:none;white-space:nowrap}
.plan-banner a:hover{text-decoration:underline}
.plan-banner ~ .main-content{margin-top:0}  /* ~ not + : the change-password modal sits between the banner and <main>, so + never matched and the topbar offset was added twice (big gap) */
.plan-banner-x{background:none;border:0;color:inherit;cursor:pointer;padding:3px 8px;margin-left:2px;border-radius:6px;font-size:13px;line-height:1;opacity:.7;flex-shrink:0}
.plan-banner-x:hover{opacity:1;background:rgba(0,0,0,.07)}
.bill-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:18px;margin-bottom:18px}
@media(max-width:1000px){.bill-grid{grid-template-columns:1fr}}
.bill-card{background:var(--card-bg);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:20px}
.bill-card h3{font-family:'Sora',sans-serif;font-size:15px;margin:0 0 14px;display:flex;align-items:center;gap:8px}
.bill-card h3 i{color:var(--primary)}
.bill-kv{display:grid;grid-template-columns:150px 1fr;gap:10px 14px;font-size:13.5px}
.bill-kv dt{color:var(--text-muted);font-weight:600}.bill-kv dd{margin:0;word-break:break-word}
.bill-bar{height:8px;border-radius:99px;background:var(--border);overflow:hidden;margin:6px 0 4px}
.bill-bar>i{display:block;height:100%;background:var(--primary);border-radius:99px}
.bill-bar.full>i{background:#e5484d}
.bill-plans{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px}
.bill-plan{border:1.5px solid var(--border);border-radius:var(--radius);padding:18px;display:flex;flex-direction:column;gap:8px;background:var(--card-bg)}
.bill-plan.current{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-light)}
.bill-plan h4{margin:0;font-family:'Sora',sans-serif;font-size:16px}
.bill-plan .amt{font-size:26px;font-weight:800}.bill-plan .amt small{font-size:12px;font-weight:600;color:var(--text-muted)}
.bill-plan ul{list-style:none;margin:6px 0 10px;padding:0;font-size:13px;display:grid;gap:6px}
.bill-plan li i{color:#10b981;margin-right:7px}
.bill-plan .btn{margin-top:auto}
.bill-expired{background:#fdecec;border:1px solid #f6c4c4;color:#a4262c;border-radius:var(--radius);padding:14px 18px;margin-bottom:18px;font-size:14px;display:flex;gap:12px;align-items:flex-start}

.ss-item.ss-sel{background:var(--primary-light);}
.ss-item.ss-sel .ms-nm b{color:var(--primary);}

/* ── Install App (PWA) button in the admin topbar: full button on desktop; icon-only on tablets;
      on phones it moves into the profile dropdown so the topbar is not crowded ── */
.pwa-install-btn { white-space: nowrap; }
@media (max-width: 1100px) { .pwa-install-btn span { display: none; } .pwa-install-btn { padding: 8px 10px !important; } }
@media (max-width: 700px)  { .pwa-install-btn { display: none !important; } }
@media (min-width: 701px)  { .pwa-install-item { display: none !important; } }

/* ── Working-shift popup: Weekly Off Days chips ── */
.sh-wo { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-wo-chip { position: relative; cursor: pointer; }
.sh-wo-chip input { position: absolute; opacity: 0; pointer-events: none; }
.sh-wo-chip span { display: inline-block; min-width: 46px; text-align: center; padding: 7px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 700; border: 1px solid var(--border); background: var(--bg); color: var(--text-muted); transition: all .15s; user-select: none; }
.sh-wo-chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.sh-wo-chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Dashboard stat cards that open their page */
.stat-card.stat-link { cursor: pointer; }
.stat-card.stat-link:focus-visible { outline: 2px solid var(--primary, #6c5ce7); outline-offset: 2px; }
