:root {
  --primary: #127ec2;
  --primary-dark: #0e65a0;
  --primary-light: #e8f4fd;
  --secondary: #0ea5e9;
  --accent: #06b6d4;
  --bg: #f0f4f8;
  --sidebar-bg: #127ec2;
  --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, #1a1f3a 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(18, 126, 194, 0.18);
}

*,
*::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);
  transition: width var(--transition);
  flex-shrink: 0;
}

.hamburger {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  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: 9px;
  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(18, 126, 194, 0.35);
}

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

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

.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: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 16px;
  width: 380px;
  max-width: 100%;
  transition: all var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.12);
}

.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;
}

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

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  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: 12px;
  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(18, 126, 194, 0.08);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #127ec2, #06b6d4);
  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;
}

/* 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(--sidebar-bg);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  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: rgba(255, 255, 255, 0.5);
  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: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  cursor: pointer;
  border-radius: 10px;
  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: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.nav-link.active .nav-indicator {
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  height: 55%;
  width: 3px;
  background: #ffffff;
}

.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: rgba(255, 255, 255, 0.75);
  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: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  transition: background 0.2s;
}

.sub-link:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.sub-link:hover::before,
.sub-link.active::before {
  background: #ffffff;
}

.sub-link.active {
  color: #ffffff;
}

/* 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: 7px;
  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: #0e65a0;
  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;
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 11px;
  overflow: hidden;
  position: fixed;
  bottom: 0;
  width: var(--sidebar-width);
  background: #0065a4;
}

.sf-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  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: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sf-role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

/* Dark mode sidebar styles */
[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #1e2a4a 0%, #111827 50%, #0d1526 100%);
  border-right-color: rgba(99, 133, 255, 0.12);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .sidebar-footer {
  background: rgba(10, 15, 35, 0.9);
  border-top-color: rgba(99, 133, 255, 0.1);
}

[data-theme="dark"] .collapsed-flyout {
  background: #1e2a4a;
  border: 1px solid rgba(99, 133, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .nav-label {
  color: rgba(148, 163, 184, 0.6);
}

[data-theme="dark"] .nav-link:hover {
  background: rgba(99, 133, 255, 0.12);
  color: #c7d4ff;
}

[data-theme="dark"] .nav-link.active {
  background: rgba(99, 133, 255, 0.18);
  color: #c7d4ff;
}

[data-theme="dark"] .sub-link:hover {
  background: rgba(99, 133, 255, 0.1);
  color: #c7d4ff;
}

.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 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: inherit;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #127ec24f;
}

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

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

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

.stats-grid a{
  text-decoration: none;
  cursor: pointer;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  cursor: default;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}

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

.stat-card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  opacity: 0.06;
  transition:
    opacity 0.25s,
    transform 0.4s;
}

.stat-card:hover::after {
  opacity: 0.12;
  transform: scale(1.2);
}

.sc1::after {
  background: #127ec2;
}

.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;
}

.sc1 .stat-icon {
  background: rgba(18, 126, 194, 0.12);
  color: #127ec2;
}

.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: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 5px;
}

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

.stat-trend {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
}

.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: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition:
    background var(--transition),
    border-color 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: 3px;
  background: var(--bg);
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--border);
}

.tab {
  padding: 7px 16px;
  border-radius: 7px;
  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(--card-bg);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* 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: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 14px;
  flex: 1;
  min-width: 160px;
  transition: border-color 0.2s;
}

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

.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: 8px 36px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  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 12px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  outline: none;
}

.fsel:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.1);
}

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

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

.data-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;
}

.data-table td {
  padding: 13px 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-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;
}

.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: var(--radius);
  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(18, 126, 194, 0.12);
  color: #127ec2;
}

.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: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: visible;
}

/* 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: 8px;
  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: 9px;
  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: 9px;
  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: 7px;
  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 {
  overflow-x: auto;
}

.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(18, 126, 194, 0.12);
  color: #127ec2;
}

.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: 7px;
  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: var(--radius);
  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);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 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: all 0.25s;
}

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

.modal {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  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);
}

.modal-header {
  padding: 20px 24px 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: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  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 {
  border-color: #e2e8f0;
  color: #323334;
  background: #e2e8f0;
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  padding: 16px 24px;
  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: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

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

.form-input,
.form-select {
  padding: 9px 16px 9px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  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;
  cursor: pointer;
  width: 100%;
}
.form-input {
  background-image: none;
}
.form-input:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 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, #127ec2, #06b6d4);
  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;
}

.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) {
  .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;
  }

  .welcome-section {
    flex-direction: column;
    align-items: flex-start;
  }
  .grid-custom {
    grid-template-columns: 1fr;
  }
}

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

  .profile-info {
    display: none;
  }

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

/* ============================================================
   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: rgba(255, 255, 255, 0.7);
  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
   ============================================================ */
.nav-link.active {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}

.nav-link.active .nav-indicator {
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  height: 55%;
  width: 3px;
  background: #ffffff;
  border-radius: 2px;
}

.sub-link.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff !important;
}
.sub-link.active::before {
  background: #fff !important;
}

/* nav-item active — for parent when child page is active */
.nav-item.parent-active > .nav-link {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

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

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

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

.emp-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.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: var(--primary);
  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 form */
.modal.modal-lg {
  width: 680px;
}

/* 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: 10px;
  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: 7px;
  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(--card-bg);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.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: 9px;
  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(18, 126, 194, 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: var(--radius);
  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: #127ec2;
}
.lb-card.comp::after {
  background: #10b981;
}
.lb-card.mat::after {
  background: #8b5cf6;
}
.lb-card.pat::after {
  background: #06b6d4;
}

.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: #127ec2;
}
.lb-type.comp {
  color: #10b981;
}
.lb-type.mat {
  color: #8b5cf6;
}
.lb-type.pat {
  color: #06b6d4;
}

.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 {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s ease;
}
.lb-fill.sick {
  background: #ef4444;
}
.lb-fill.casual {
  background: #f59e0b;
}
.lb-fill.annual {
  background: #127ec2;
}
.lb-fill.comp {
  background: #10b981;
}
.lb-fill.mat {
  background: #8b5cf6;
}
.lb-fill.pat {
  background: #06b6d4;
}
.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: 7px;
  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(18, 126, 194, 0.1);
  color: #127ec2;
}
.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(6, 182, 212, 0.1);
  color: #06b6d4;
}

/* 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 ---- */
.payroll-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.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 */
.payroll-run-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(18, 126, 194, 0.35);
  flex-wrap: wrap;
  gap: 14px;
}
.prb-left .prb-title {
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.prb-left .prb-sub {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
}
.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(18, 126, 194, 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: 8px;
  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: var(--radius);
  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: var(--radius);
  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: 9px;
  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: var(--radius);
  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: var(--radius);
  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);
}
.doc-toolbar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Document cards grid */
.doc-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 16px 20px;
}
.doc-card {
  border: 1.5px solid var(--border);
  border-radius: 11px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
}
.doc-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(18, 126, 194, 0.12);
  transform: translateY(-2px);
}
.doc-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  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: 99px;
  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: 6px;
  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,
.doc-dropzone.drag-over {
  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;
}

/* ============================================================
   TASKS PAGE
   ============================================================ */
.task-board-layout {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) {
  .task-board-layout {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 650px) {
  .task-board-layout {
    grid-template-columns: 1fr;
  }
}

.task-col {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px;
  min-height: 400px;
}
.task-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.task-col-title {
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-col-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.task-col-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
}
.task-col-add {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: none;
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.task-col-add:hover {
  background: var(--primary);
  color: #fff;
}

/* Task card */
.task-card {
  background: var(--card-bg);
  border-radius: 11px;
  padding: 13px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.18s;
  border-left: 3px solid transparent;
  position: relative;
}
.task-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.task-card.prio-critical {
  border-left-color: #dc2626;
}
.task-card.prio-high {
  border-left-color: #f97316;
}
.task-card.prio-medium {
  border-left-color: #f59e0b;
}
.task-card.prio-low {
  border-left-color: #10b981;
}
.task-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.task-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.task-card-menu {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.task-card-menu:hover {
  background: var(--bg);
  color: var(--text);
}
.task-card-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.task-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.task-card-assignees {
  display: flex;
}
.task-assignee-av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1.5px solid var(--card-bg);
  margin-left: -5px;
}
.task-assignee-av:first-child {
  margin-left: 0;
}
.task-due {
  font-size: 10.5px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 3px;
}
.task-due.overdue {
  color: #dc2626;
}
.task-due.soon {
  color: #f59e0b;
}

/* Priority badge */
.prio-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.prio-badge.prio-critical {
  background: #fee2e2;
  color: #dc2626;
}
.prio-badge.prio-high {
  background: #ffedd5;
  color: #ea580c;
}
.prio-badge.prio-medium {
  background: #fef9c3;
  color: #ca8a04;
}
.prio-badge.prio-low {
  background: #dcfce7;
  color: #16a34a;
}

/* Task list view */
.task-list-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.task-list-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 120px 80px;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.task-list-row:last-child {
  border-bottom: none;
}
.task-list-header {
  background: var(--bg);
  border-radius: var(--radius) var(--radius) 0 0;
}
.task-list-header div {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
}
.task-row-title {
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Task view/edit modal extras */
.task-modal-priority-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}
.task-prio-btn {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 8px 4px;
  background: var(--card-bg);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.task-prio-btn:hover {
  border-color: var(--primary);
}
.task-prio-btn.sel-critical {
  border-color: #dc2626;
  background: #fee2e2;
}
.task-prio-btn.sel-high {
  border-color: #f97316;
  background: #ffedd5;
}
.task-prio-btn.sel-medium {
  border-color: #f59e0b;
  background: #fef9c3;
}
.task-prio-btn.sel-low {
  border-color: #10b981;
  background: #dcfce7;
}
.task-prio-icon {
  font-size: 16px;
}
.task-prio-label {
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 3px;
}

.task-view-section {
  margin-bottom: 18px;
}
.task-view-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.task-view-value {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 600;
}
.task-view-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  background: var(--bg);
  border-radius: 9px;
  padding: 12px 14px;
}
.task-activity {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.task-activity-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.ta-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.ta-content {
  flex: 1;
}
.ta-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.ta-text {
  font-size: 12px;
  color: var(--text-muted);
}
.ta-time {
  font-size: 10.5px;
  color: var(--text-light);
}
.task-comment-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
}
.task-comment-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 12.5px;
  background: var(--card-bg);
  color: var(--text);
  resize: none;
  font-family: inherit;
}
.task-comment-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Assignee multi-select chips */
.assignee-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
}
.assignee-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 10px 4px 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.assignee-chip.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.assignee-chip-av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* ============================================================
   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: 9px;
  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(18, 126, 194, 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: 9px;
  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: 9px;
  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: var(--radius);
  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: var(--radius);
  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: var(--radius);
  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(18, 126, 194, 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: var(--radius);
  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: var(--radius);
  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: 9px;
  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: 9px;
  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, #127ec2, #06b6d4);
  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;
}
@media (max-width: 600px) {
  .notif-pref-grid {
    grid-template-columns: 1fr;
  }
}
.notif-pref-card {
  border: 1.5px solid var(--border);
  border-radius: 11px;
  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: 11px;
  padding: 16px;
  text-align: center;
  transition: all 0.18s;
  cursor: pointer;
}
.integration-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(18, 126, 194, 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;
}

/* ============================================================
   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: var(--radius);
  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: var(--radius) var(--radius) 0 0;
  box-shadow: 0 4px 12px rgba(18, 126, 194, 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: 0 0 var(--radius) var(--radius);
  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: 6px;
  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(18, 126, 194, 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(59, 130, 246, 0.12);
  color: #3b82f6;
}

.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, #127ec2, #0ea5e9 60%, #06b6d4);
}

.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, #127ec2, #0ea5e9);
  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: var(--radius-lg);
  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: 9px;
  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(18, 126, 194, 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: var(--radius-lg);
  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: 10px;
}

.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, #06b6d4);
}

/* 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-halfday {
    background: rgba(245, 158, 11, 0.13);
    color: #ac600a;
    border: 1.5px solid rgba(245, 158, 11, 0.26);
}
.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);
}

.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-shortleave {
  background: rgba(245, 158, 11, 0.13);
    color: #ac600a;
}
.ud-badge-halfday {
  background: rgba(245, 158, 11, 0.13);
    color: #ac600a;
}

.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(18, 126, 194, 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(5, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.ud-att-sum-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  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-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .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;
  }
}

/* ===================== 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: 6px;
  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(18, 126, 194, 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: 8px;
  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), #0ea5e9);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  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 */
body.login-page {
  overflow: hidden;
  font-family: "Lexend", sans-serif;
}

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

/* Page wrapper */
.login-wrap {
  display: flex;
  width: 100vw;
  height: 100vh;
}

/* ---- LEFT PANEL (65%) ---- */
.login-left {
  flex: 0 0 65%;
  width: 65%;
  height: 100%;
  background: #127ec2;
  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(ellipse 90% 90% at 30% 50%, #1a90d4 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 20%, #0e65a0 0%, transparent 50%),
    radial-gradient(ellipse 70% 70% at 10% 80%, #0a5585 0%, transparent 55%);
}

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

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

.login-wave-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    ellipse 140% 100% at 50% 110%,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 60%
  );
}

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

@keyframes loginLeftIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.login-hr-icon {
  width: clamp(100px, 12vw, 160px);
  height: auto;
  animation: loginIconPulse 5s ease-in-out infinite;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.18));
}

@keyframes loginIconPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

.login-brand-title {
  font-family: "Outfit", sans-serif;
  font-weight: 900;
  font-size: clamp(42px, 5.5vw, 60px);
  color: #fff;
  letter-spacing: 3px;
  line-height: 0.92;
  text-transform: uppercase;
  text-align: left;
}

.login-sep {
  width: 70px;
  height: 3px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  margin-left: 80px;
}

.login-tagline {
  font-size: clamp(13px, 1.3vw, 17px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
  font-style: italic;
}

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

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

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

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

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

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

.login-form-heading {
  text-align: center;
  margin-bottom: 30px;
}

.login-form-heading h2 {
  font-size: 21px;
  font-weight: 700;
  color: #1a2040;
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}

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

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

.login-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  margin-bottom: 7px;
  font-family: "Lexend", sans-serif;
}

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

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

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

.login-input-wrap input:focus {
  border-color: #127ec2;
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.12);
}

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

.login-eye-btn:hover {
  color: #127ec2;
}

.login-btn-signin {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  background: #127ec2;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-family: "Outfit", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(18, 126, 194, 0.35);
}

.login-btn-signin:hover {
  background: #0e65a0;
  transform: translateY(-1px);
  box-shadow: 0 7px 22px rgba(18, 126, 194, 0.45);
}

.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: #127ec2;
  font-weight: 700;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .login-wrap {
    flex-direction: column;
  }
  .login-left {
    flex: 0 0 42%;
    width: 100%;
  }
  .login-right {
    flex: 1;
    width: 100%;
  }
}

/* ================================================================
   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: 20px;
  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: 9px;
  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: 18px;
  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: 10px;
  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: 10px;
  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: 8px;
  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;
  border-radius: 20px;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: 92vh;
}
.els-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 100%);
  flex-shrink: 0;
}
.els-emp-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}
.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: flex;
  gap: 10px;
  padding: 16px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.els-stat-card {
  flex: 1;
  min-width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  transition: box-shadow 0.15s;
}
.els-stat-card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}
.els-stat-ico {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.els-stat-num {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.els-stat-lbl {
  font-size: 10px;
  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: 12px;
  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: 12px;
  overflow: hidden;
  max-height: 300px;
  overflow-y: auto;
}

/* ================================================================
   MONTHLY ATTENDANCE MODAL (MAM)
   Extracted from attendance.php
================================================================ */
.mam-modal {
  max-width: 900px;
  width: 96vw;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  padding: 0;
}
.mam-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 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: 10px;
  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: 8px;
  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: 7px;
  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(18, 126, 194, 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: 7px;
  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(280px, 1fr));
  gap: 18px;
}
.celeb-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  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(18, 126, 194, 0.3);
  background: linear-gradient(
    135deg,
    var(--card-bg) 0%,
    rgba(18, 126, 194, 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, #127ec2, #0ea5e9);
  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: 9px;
  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 */
.payroll-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.pay-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  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: var(--radius-lg) var(--radius-lg) 0 0;
}
.psc-blue::before {
  background: linear-gradient(90deg, #127ec2, #0ea5e9);
}
.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: #127ec2;
}
.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%,
    #0ea5e9 60%,
    #06b6d4 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(18, 126, 194, 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: 20px;
  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: var(--radius-lg);
  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: 18px;
  overflow: hidden;
  padding: 0;
}
.pay-view-modal {
  max-width: 580px;
  border-radius: 18px;
  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%, #0ea5e9 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: 9px;
  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%, #0ea5e9 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(280px, 1fr));
  }
  .payroll-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .payroll-summary-grid {
    grid-template-columns: 1fr 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: 7px;
  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(18, 126, 194, 0.08);
  border: 1px solid rgba(18, 126, 194, 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 {
    flex-direction: column;
    gap: 10px;
  }
  .page-header-right {
    width: 100%;
    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 */
@media (max-width: 768px) {
  .users-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .users-toolbar .srch {
    flex: 1;
    min-width: 160px;
  }
}

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

/* Modal responsiveness */
@media (max-width: 480px) {
  .modal {
    margin: 12px;
    max-height: calc(100dvh - 24px);
    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 {
    padding: 12px 14px;
  }
  .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;
  }
  .payroll-summary-grid {
    grid-template-columns: repeat(2, 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) {
  .tabs {
    flex-wrap: wrap;
    gap: 4px;
  }
  .tab {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    padding: 7px 10px;
    white-space: nowrap;
  }
  /* 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 {
    flex-wrap: wrap;
    display: none;
  }
  .att-date-wrap {
    flex: 1;
    min-width: 160px;
  }
  .att-date-btn {
    width: 100%;
    justify-content: space-between;
  }
  /* hide dept + punch out columns */
  .att-tbl-hide-md {
    display: none;
  }
}

@media (max-width: 600px) {
  .att-summary-row {
    grid-template-columns: 1fr 1fr !important;
  }
  /* Attendance table: hide more on small */
  .att-tbl-hide-sm {
    display: none;
  }
  /* 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 */
.users-tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 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) {
  .modal-backdrop .modal {
    margin: 8px;
    max-width: calc(100% - 16px) !important;
    max-height: calc(100dvh - 16px);
  }
  /* 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;
  }
}
@media (max-width: 600px) {
  .att-tbl-hide-sm {
    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 {
    grid-template-columns: 1fr 1fr !important;
    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;
  display: flex;
  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;
  title: "Missing required documents";
}

/* ── 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: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  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 {
  display: flex;
  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;
  overflow-x: auto;
  scrollbar-width: none;
}

.doc-tabs::-webkit-scrollbar {
  display: none;
}

.dtab {
  padding: 8px 13px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.dtab:hover {
  color: var(--text);
}

.dtab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.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: var(--primary);
  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: 14px;
  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(18, 126, 194, 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: 14px 14px 0 0;
}

.cat-identity::before {
  background: #8b5cf6;
}

.cat-employment::before {
  background: #127ec2;
}

.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: #2563eb;
}

.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 {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-header-right {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .page-header-right .btn {
    flex: 1;
    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(18, 126, 194, 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(18, 126, 194, 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: 10px;
  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(18, 126, 194, 0.3);
}
.dash-module-panel {
  display: none;
}
.dash-module-panel.active {
  display: block;
}

/* ── KPI mini cards ── */
.dash-kpi-card {
  border-radius: 12px;
  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: 8px;
  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;
}
.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) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .page-header-right {
    width: 100%;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .page-header-right .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }
  .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(18, 126, 194, 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: 8px;
  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);
}

/* ================================================================
   DASHBOARD TASKS TAB
   ================================================================ */
.task-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.task-row:last-child {
  border-bottom: none;
}
.task-cb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.task-cb.ticked {
  background: #10b981;
  border-color: #10b981;
}
.task-cb.ticked::after {
  content: "✓";
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}
.task-body {
  flex: 1;
  min-width: 0;
}
.task-title-txt {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.task-title-txt.striked {
  text-decoration: line-through;
  color: var(--text-muted);
}
.task-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.task-pri {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
}
.task-add-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

@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: 12px;
  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(18, 126, 194, 0.08);
}
.epf-toggle-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.epf-toggle-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(18, 126, 194, 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(300px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.shift-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  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: var(--radius-lg) var(--radius-lg) 0 0;
}
.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 {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-header-right {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .page-header-right .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }

  .users-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .users-toolbar .srch {
    width: 100%;
    min-width: unset;
  }

  .users-toolbar .fsel {
    flex: 1;
    min-width: 130px;
  }
}

@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;
  }
}

/* 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;
  }
}

/* Projects grid responsive */
@media (max-width: 600px) {
  #projGrid {
    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;
}

/* ===================================================
   TASKS PAGE — styles migrated from tasks.php
   =================================================== */

/* ── Status dot in tabs ── */
.tk-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 2px;
  flex-shrink: 0;
}

/* ── Form sections ── */
.tk-form-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.tk-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.tk-section-title i {
  color: var(--primary);
  font-size: 12px;
}

/* ── Task list item card ── */
.tk-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: visible;
  transition:
    box-shadow 0.18s,
    transform 0.18s;
  cursor: pointer;
  position: relative;
}
.tk-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.tk-item-accent {
  width: 4px;
  flex-shrink: 0;
  border-radius: 12px 0 0 12px;
}
.tk-item-body {
  flex: 1;
  padding: 13px 16px;
  min-width: 0;
}
.tk-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 14px;
  gap: 8px;
  flex-shrink: 0;
}

.tk-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.tk-item-title {
  font-weight: 800;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.35;
}
.tk-item-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 9px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tk-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.tk-item-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

/* assignee avatars row */
.tk-assignees {
  display: flex;
  flex-direction: row;
}
.tk-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 2px solid var(--card-bg);
  margin-left: -7px;
  flex-shrink: 0;
}
.tk-av:first-child {
  margin-left: 0;
}

/* date range chip */
.tk-dates {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}
.tk-dates i {
  font-size: 10px;
}
.tk-dates.overdue {
  color: #ef4444;
}

/* status badge */
.tk-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
}
.tk-status.pending {
  background: #fef3c7;
  color: #d97706;
}
.tk-status.active {
  background: #dbeafe;
  color: #2563eb;
}
.tk-status.done {
  background: #d1fae5;
  color: #059669;
}
.tk-status.closed {
  background: #f1f5f9;
  color: #64748b;
}

/* ── 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: 7px;
  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;
}

/* ── Multi-select assignee dropdown ── */
.assign-dropdown-wrap {
  position: relative;
}
.assign-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
.assign-dropdown-trigger:hover,
.assign-dropdown-trigger.open {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.1);
}
.assign-selected-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.assign-placeholder {
  font-size: 13px;
  color: var(--text-light);
}
.assign-sel-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 4px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.assign-sel-chip-av {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.25);
}
.assign-sel-chip-rm {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  cursor: pointer;
  margin-left: 2px;
}
.assign-arrow {
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.assign-arrow.rotated {
  transform: rotate(180deg);
}
.assign-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.assign-dropdown-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.assign-search-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.assign-search-wrap i {
  color: var(--text-muted);
  font-size: 12px;
  flex-shrink: 0;
}
.assign-search-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
}
.assign-list {
  max-height: 220px;
  overflow-y: auto;
}
.assign-list-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.12s;
}
.assign-list-item:hover {
  background: var(--bg);
}
.assign-list-item.selected {
  background: rgba(18, 126, 194, 0.06);
}
.assign-item-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.assign-item-info {
  flex: 1;
  min-width: 0;
}
.assign-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.assign-item-dept {
  font-size: 11px;
  color: var(--text-muted);
}
.assign-item-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.assign-list-item.selected .assign-item-check {
  background: var(--primary);
  border-color: var(--primary);
}
.assign-item-check i {
  font-size: 9px;
  color: #fff;
  display: none;
}
.assign-list-item.selected .assign-item-check i {
  display: block;
}

/* ── Select All row ── */
.assign-select-all-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  transition: background 0.12s;
}
.assign-select-all-row:hover {
  background: rgba(18, 126, 194, 0.06);
}
.assign-select-all-row .assign-item-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.assign-select-all-row.all-selected .assign-item-check {
  background: var(--primary);
  border-color: var(--primary);
}
.assign-select-all-row.all-selected .assign-item-check i {
  display: block;
}
.assign-select-all-row .assign-item-check i {
  font-size: 9px;
  color: #fff;
  display: none;
}

/* ── Assign-to-Other Modal ── */
.ato-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}
.ato-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.ato-modal {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  width: 100%;
  max-width: 800px;
  overflow: hidden;
  transform: translateY(18px) scale(0.97);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ato-modal-overlay.open .ato-modal {
  transform: translateY(0) scale(1);
}
.ato-header {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ato-header-title {
  color: #fff;
  font-family: Sora, sans-serif;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ato-header-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.ato-body {
  padding: 20px 22px;
}
.ato-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.ato-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.ato-col-left {
  display: flex;
  flex-direction: column;
}
.ato-col-right {
  display: flex;
  flex-direction: column;
}

/* ── View task detail fields ── */
.tv-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.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);
}

/* ── Task action buttons ── */
.tk-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: "Nunito Sans", sans-serif;
}
.tk-act-btn i {
  font-size: 10px;
}
.tk-act-btn.status-btn:hover {
  border-color: #8b5cf6;
  color: #8b5cf6;
  background: #ede9fe;
}
.tk-act-btn.edit-btn:hover {
  border-color: #127ec2;
  color: #127ec2;
  background: var(--primary-light);
}
.uam-active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}
.tk-assignee-names {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
  text-align: right;
}

/* ── Tabs + Inline Toolbar Row ── */
.task-tabs-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 0;
  flex-wrap: wrap;
}
.task-inline-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.task-srch-compact {
  width: 200px;
  min-width: 160px;
}
.task-inline-filters .fsel {
  width: 140px;
  min-width: 120px;
}

/* ── Tasks page responsive ── */
@media (max-width: 900px) {
  .task-tabs-toolbar-row {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px 0;
    gap: 10px;
  }
  .task-inline-filters {
    width: 100%;
    flex-wrap: wrap;
  }
  .task-srch-compact {
    width: 100%;
    flex: 1 1 100%;
    order: -1;
  }
  .task-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;
  }
  .tk-item {
    flex-direction: column;
    align-items: stretch;
  }
  .tk-item-accent {
    width: 100%;
    height: 4px;
    border-radius: 12px 12px 0 0;
  }
  .tk-item-body {
    padding: 12px 14px 8px;
  }
  .tk-item-right {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px 12px;
    border-top: 1px solid var(--border);
    gap: 8px;
  }
  .tk-item-right > div:first-child {
    flex-wrap: wrap;
    gap: 5px;
  }
  .tk-assignee-names {
    display: none;
  }
  .tv-grid2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .ato-modal {
    max-width: 98vw;
  }
  .ato-two-col {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 550px) {
  .task-inline-filters .fsel {
    min-width: calc(50% - 5px);
    flex: 1 1 calc(50% - 5px);
  }
  .task-modal-priority-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tk-item-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .tk-act-btn {
    padding: 4px 8px;
    font-size: 10.5px;
  }
  .tk-status {
    font-size: 10.5px;
    padding: 3px 8px;
  }
  .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) {
  .tk-act-btn span,
  .tk-act-btn {
    font-size: 10px;
  }
  .tabs {
    gap: 2px;
  }
  .tab {
    padding: 5px 8px;
    font-size: 11px;
  }
}

/* =============================================================
   HOLIDAYS PAGE — extracted from holidays.php
   ============================================================= */
/* ── UAM Action Menu (matches users.php) ── */
.uam-wrap {
  position: relative;
  display: inline-block;
}
.uam-trigger {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition:
    background 0.12s,
    color 0.12s;
}
.uam-trigger:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.uam-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 9999;
  min-width: 190px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  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;
}

/* ── 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: 8px;
  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: 8px;
  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: 8px;
  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);
}

/* =============================================================
   TASK PAGE — ATTACHMENT UPLOAD & PREVIEW
   ============================================================= */

/* Drop zone */
.task-attach-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 16px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  text-align: center;
}
.task-attach-dropzone:hover,
.task-attach-dropzone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
.task-attach-icon {
  font-size: 26px;
  color: var(--primary);
  opacity: 0.7;
}
.task-attach-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}
.task-attach-hint {
  font-size: 11px;
  color: var(--text-light);
}

/* PDF chip */
.task-attach-file-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.task-attach-file-chip.pdf {
  border-color: #fca5a5;
  background: #fff1f2;
}
.task-attach-file-chip.pdf i:first-child {
  font-size: 20px;
  color: #ef4444;
}
.task-attach-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-attach-rm {
  border: none;
  background: #fee2e2;
  color: #ef4444;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  flex-shrink: 0;
}

/* Image preview */
.task-attach-img-wrap {
  position: relative;
  display: inline-block;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  max-width: 100%;
}
.task-attach-img-preview {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 10px;
}
.task-attach-img-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  padding: 8px 10px 7px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-attach-img-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.task-attach-rm-img {
  border: none;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  flex-shrink: 0;
}

/* =============================================================
   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;
  }
}
