: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.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.w-100 {
  width: 100%;
}
html {
  font-size: 14px;
  scroll-behavior: smooth;
}
.mt-0 {
  margin-top: 0 !important;
}
.pt-0 {
  padding-top: 0;
}
i.fas.fa-phone-alt {
  transform: rotate(90deg);
}
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);
}
.text-no-wrap {
  white-space: nowrap;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
/* 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: 20px;
  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: 600;
  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: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.profile-info {
  line-height: 1.3;
}

.profile-name {
  font-size: 13px;
  font-weight: 600;
  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: 600;
  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: 600;
  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: 0;
  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: 700;
  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;
  outline: 0;
}

.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: max-content;
}

.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: 600;
  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: 600;
  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: 600;
  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: 700;
  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: 600;
  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-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: 600;
  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;
}

.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: 600;
  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: 600;
  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: 600;
  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: 600;
  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: nowrap;
  overflow-x: auto;
}

.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: 700;
  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; */
  max-width: 200px;
  text-overflow: ellipsis;
  overflow: hidden;
}

.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: 700;
  color: #fff;
  flex-shrink: 0;
}

.emp-name {
  font-weight: 600;
  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: 600;
  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: 600;
  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: 600;
  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: 600;
  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: 600;
  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: 600;
  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: hidden;
}

/* Bulk Action Bar */
.bulk-bar {
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  display: none;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
}

.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: 600;
  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: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1.5px solid var(--border);
  background-color: var(--bg);
}

.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: 700;
  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: 600;
  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: 600;
  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: 600;
  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: 700;
  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: 600;
  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: 600;
  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: 600;
  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: 600;
  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: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.aus-name {
  font-size: 12.5px;
  font-weight: 600;
  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: 700;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.avatar-upload-text .aup-title {
  font-size: 13px;
  font-weight: 600;
  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;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    z-index: 1040;
  }

  .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: 600;
  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: 600;
  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: 700;
  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: 700;
  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: 700;
  color: #fff;
  flex-shrink: 0;
}

.udp-info .udp-name {
  font-family: "Sora", sans-serif;
  font-size: 18px;
  font-weight: 600;
  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: 600;
  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: 700;
  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: 600;
  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: 700;
  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: 600;
  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: 600;
  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: 600;
  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: 600;
  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;
}

/* ============================================================
   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: 600;
  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: 600;
  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: 600;
  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: 700;
  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: 700;
  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: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
}
.task-row-title {
  font-weight: 600;
  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: 600;
  margin-top: 3px;
}

.task-view-section {
  margin-bottom: 18px;
}
.task-view-label {
  font-size: 10.5px;
  font-weight: 700;
  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: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.ta-content {
  flex: 1;
}
.ta-name {
  font-size: 12px;
  font-weight: 600;
  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: 700;
  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);
}
.d-flex {
  display: flex;
}
.align-content-center {
  align-items: center;
}
/* 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: 600;
  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: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rk-value {
  font-family: "Sora", sans-serif;
  font-size: 26px;
  font-weight: 700;
  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: 600;
  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: 600;
  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: 600;
  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: 700;
  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: 600;
  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: 700px) {
  .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: 700;
  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: 600;
  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: 600;
  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: 700;
  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: 600;
  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: 700;
}

/* 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: 700;
  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: 700;
  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: 600;
  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: 600;
  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: 600;
  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: 600;
  color: var(--text);
}
.backup-meta {
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 2px;
}
.backup-badge {
  font-size: 10px;
  font-weight: 600;
  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 {
    top: 40px !Important;
  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: 700;
  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: 700;
  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: 600;
  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: 600;
  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: 600;
  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: 600;
  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: 700;
}

.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: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.ud-att-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  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: 600;
  cursor: default;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.ud-hm-day:hover {
  transform: scale(1.18);
  z-index: 5;
}

.hm-present {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  border: 1.5px solid rgba(16, 185, 129, 0.28);
}

.hm-absent {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1.5px solid rgba(239, 68, 68, 0.24);
}

.hm-leave {
  background: rgba(245, 158, 11, 0.13);
  color: #d97706;
  border: 1.5px solid rgba(245, 158, 11, 0.26);
}

.hm-holiday {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
  border: 1.5px solid rgba(139, 92, 246, 0.22);
}

.hm-weekend {
  background: var(--bg);
  color: var(--text-light);
  border: 1.5px solid var(--border);
}

.hm-future {
  background: var(--bg);
  color: var(--border);
  border: 1.5px dashed var(--border);
}

.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: 600;
  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: 600;
}

.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-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: 600;
  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: 700;
  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%;
}
#dateRange {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  cursor: pointer;
  outline: 0;
  color: var(--text);
}
.filter-group {
  position: relative;
}
.calendar-display-input {
  cursor: pointer;
  background-color: var(--card-bg);
  padding-right: 24px !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%;
  left: 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: 600;
  color: var(--primary);
}

.calendar-day.selected {
  background-color: var(--primary);
  color: white;
  font-weight: 600;
}

.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(--card-bg);
  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);
}

.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: 600;
  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: 700;
  color: #fff;
  flex-shrink: 0;
}
.emp-selected-chip .chip-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.emp-selected-chip .chip-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* 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: 600;
  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: 600;
  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: 600;
}

/* ---- 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: 700;
  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 i {
  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: 700;
  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: 600;
  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: 600;
  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: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}
.pend-info {
  flex: 1;
  min-width: 0;
}
.pend-name {
  font-size: 13.5px;
  font-weight: 700;
  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: 700;
}
.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: 600;
  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: 700;
  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: 700;
  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: 700;
  line-height: 1;
}
.els-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  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: 600;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.els-count-badge {
  font-size: 11px;
  font-weight: 600;
  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: 600;
  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: 700;
  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: 600;
  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: 700;
}
/* ── 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: 700;
  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: 700;
  color: #f59e0b;
}
.els-tbb-rem span {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #10b981;
}
.els-tbb-total span {
  display: block;
  font-size: 18px;
  font-weight: 700;
  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: 700;
  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: 700;
  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: 600;
  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: 600;
  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: 700;
  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: 600;
  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: 700;
  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: 700;
  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: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.14s cubic-bezier(0.34, 1.2, 0.64, 1);
  border: 1.5px solid transparent;
  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: 600;
  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: 600;
  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: 600;
  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: 600;
  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: 700;
  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: 700;
  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: 600;
  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: 700;
  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: 700;
  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: 600;
  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: 700;
  color: #10b981;
}
.pay-ded-chip {
  font-size: 13px;
  font-weight: 600;
  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: 700;
  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: 600;
  color: var(--text);
  flex: 1;
}
.dept-split-amt {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.dept-split-pct {
  font-size: 11px;
  font-weight: 600;
  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: 600;
  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: 700;
  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: 700;
  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: 600;
  color: var(--text);
}
.payslip-mini-row.gross {
  font-weight: 700;
  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: 700;
  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: 700;
  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: 700;
  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: 700;
  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: 600;
  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: 700;
  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.14);
  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: 600;
  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;
  }
}

.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: 600;
  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: 700;
  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: 600;
  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: 600;
  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: 700;
  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: 700;
  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: 700;
  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: 600;
  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: 600;
  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: 600;
  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: 600;
  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: 600;
  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: 600;
  padding: 2px 9px;
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-muted);
}

.dc-expiry-warn {
  color: #ef4444;
  font-size: 10px;
  font-weight: 600;
}

.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: 600;
}

.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: 600;
}

.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: 600;
  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: 600;
  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;
  }
}

.act-btn.increment-btn {
  color: #10b981;
}
.act-btn.increment-btn:hover {
  background: rgba(16, 185, 129, 0.1);
}

.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: 600;
  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: 700;
  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: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.btn-detect-loc:hover {
  opacity: 0.85;
}

.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%;
  }
}

.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: 700;
  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: 600;
  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;
}

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: 700;
  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: 600;
  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: 600;
  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: 700;
  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: 700;
}
.task-body {
  flex: 1;
  min-width: 0;
}
.task-title-txt {
  font-size: 13.5px;
  font-weight: 600;
  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: 600;
}
.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: 600;
  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: 600;
  color: var(--text);
}
.epf-prev-total {
  font-weight: 700;
  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: 700;
  color: var(--text);
}
.shift-card-type {
  font-size: 11px;
  font-weight: 600;
  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: 700;
}
.shift-time-sep {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.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: 600;
  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: 600;
}
.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: 700;
  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: 700;
  color: #fff;
  flex-shrink: 0;
}
.assign-emp-name {
  font-size: 13px;
  font-weight: 600;
  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: 600;
  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: 600;
  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: 600;
}

.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: 600;
  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: 600;
  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: 600;
}
.spr-actions {
  display: flex;
  gap: 6px;
}

.punch-out-chip,
.punch-in-chip {
  color: #8b5cf6 !important;
  cursor: pointer;
}

.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: 700;
  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: 700;
  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: 600;
}

/* assignee avatars row */
.tk-assignees {
  display: flex;
  flex-direction: row;
}
.tk-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  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: 600;
  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: 600;
}
.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: 600;
  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: 700;
  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: 700;
  color: #fff;
  flex-shrink: 0;
}
.assign-item-info {
  flex: 1;
  min-width: 0;
}
.assign-item-name {
  font-size: 13px;
  font-weight: 600;
  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: 700px;
  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: 700;
  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: 700;
  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: 600;
  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: 600;
}
.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: 600;
  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: 600;
  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: 700;
  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: 700;
  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: 700;
}

.hdr-cell.hdr-end {
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: 0 8px 8px 0;
  font-weight: 700;
}

.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: 600;
  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: 600;
  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: 600;
  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: 600;
  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;
  }
}

/* ════════════════════════════════════════════════
   CRM MODULE STYLES
════════════════════════════════════════════════ */

/* CRM stat cards accent colors */
.sc-enq1 {
  --card-accent: #127ec2;
}
.sc-enq2 {
  --card-accent: #f59e0b;
}
.sc-enq3 {
  --card-accent: #10b981;
}
.sc-enq4 {
  --card-accent: #3b82f6;
}
.sc-enq5 {
  --card-accent: #ef4444;
}
.sc-enq6 {
  --card-accent: #8b5cf6;
}
.crm-stats .stat-card {
  border-left: 3px solid var(--card-accent, var(--primary));
}

/* Page header for inner pages */
.page-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title-main {
  font-family: "Sora", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.breadcrumb-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.breadcrumb-row a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumb-row i {
  font-size: 9px;
}

/* Enquiry tabs */
.enq-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 20px 0;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.enq-tabs::-webkit-scrollbar {
  display: none;
}
.enq-tab {
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.enq-tab:hover {
  color: var(--text);
}
.enq-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.etab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
}

/* Buttons */
.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9px;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(18, 126, 194, 0.25);
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary-sm:hover {
  background: var(--primary-dark);
}
.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9px;
  border: 1.5px solid var(--primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--primary);
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-outline-sm:hover {
  background: var(--primary-light);
}
.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
}
.btn-ghost-sm:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Side panel */
.enq-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 490;
}
.enq-side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 520px;
  max-width: 100vw;
  background: var(--card-bg);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  z-index: 500;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.enq-side-panel.open {
  transform: translateX(0);
}
.enq-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.enq-panel-title {
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 600;
}
.enq-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}
.enq-panel-close:hover {
  background: #fee2e2;
  color: #dc2626;
}
.enq-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  scrollbar-width: thin;
}
.enq-panel-footer {
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* Form grid */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.fg {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fg-full {
  grid-column: 1 / -1;
}
.flabel {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.finput {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: all 0.2s;
  resize: vertical;
  width: 100%;
}
.finput:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.1);
}

/* Upload zone */
.upload-zone-inner {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
  margin-bottom: 16px;
}
.upload-zone-inner:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.uz-icon {
  font-size: 36px;
  color: var(--text-light);
  margin-bottom: 10px;
}
.uz-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.uz-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.upload-info-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

/* CRM Modals */
.crm-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.crm-modal {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: crmModalIn 0.22s ease;
}
@keyframes crmModalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.crm-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.crm-modal-title {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
}
.crm-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.crm-modal-close:hover {
  background: #fee2e2;
  color: #dc2626;
}
.crm-modal-body {
  padding: 20px 24px;
}
.crm-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Master pages table */
.master-page-wrap {
}
.master-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .enq-side-panel {
    width: 100vw;
  }
}

/* ═══════════════════════════════════════════════════════════
   UM SHARED v2 — Users & Designation refined styles
═══════════════════════════════════════════════════════════ */

/* ── Spin only the icon ── */
@keyframes iconSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(720deg);
  }
}
.icon-spin-only i {
  animation: iconSpin 0.65s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ── Page wrapper card ── */
.um2-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ── Top single-row bar: tabs + filters + refresh ── */
.um2-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  background: var(--card-bg);
}

/* Segmented tabs inside bar */
.um2-seg {
  display: flex;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.um2-seg-btn {
  padding: 6px 16px;
  border-radius: 7px;
  border: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.um2-seg-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(18, 126, 194, 0.3);
}
.um2-seg-btn:hover:not(.active) {
  color: var(--text);
  background: rgba(18, 126, 194, 0.06);
}
.um2-seg-pill {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
}
.um2-seg-btn.active .um2-seg-pill {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Divider line between seg and filters */
.um2-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 2px;
}

/* Search in bar */
.um2-search {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 7px 11px;
  min-width: 190px;
  flex: 1;
  max-width: 240px;
  transition: all 0.2s;
}
.um2-search:focus-within {
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.07);
}
.um2-search i {
  color: var(--text-light);
  font-size: 12px;
  flex-shrink: 0;
}
.um2-search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
  width: 100%;
}

/* Compact custom select */
.um2-csel-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.um2-csel-wrap .um2-csel-icon {
  position: absolute;
  right: 9px;
  pointer-events: none;
  color: var(--primary);
  font-size: 10px;
}
.um2-csel {
  padding: 7px 28px 7px 11px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: all 0.2s;
  min-width: 120px;
}
.um2-csel:focus {
  border-color: var(--primary);
  color: var(--text);
  background: var(--card-bg);
}

/* Push refresh to right end */
.um2-bar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Refresh btn (icon only spins via JS) */
.um2-refresh {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px 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: all 0.2s;
  flex-shrink: 0;
}
.um2-refresh:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ── Table ── */
.um2-tbl-wrap {
  overflow-x: auto;
}
.um2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.um2-table thead tr {
  background: var(--bg);
}
.um2-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1.5px solid var(--border);
}
.um2-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
.um2-table tbody tr:last-child td {
  border-bottom: none;
}
.um2-table tbody tr {
  transition: background 0.12s;
}
.um2-table tbody tr:hover td {
  background: #f8fafc;
}
/* ── Toggle visibility fix for module permission table ── */
.um2-table td .toggle-switch {
  display: inline-flex;
  vertical-align: middle;
}
.um2-table td[style*="text-align:center"],
.um2-table th[style*="text-align:center"] {
  vertical-align: middle;
}
/* Module perm table - center toggle cells */
#modulePermTable td:not(:first-child) {
  text-align: center;
  vertical-align: middle;
}
#modulePermTable .toggle-switch {
  margin: 0 auto;
  display: inline-flex;
}

/* ── User cell ── */
.um2-user {
  display: flex;
  align-items: center;
  gap: 9px;
}
.um2-av-wrap {
  position: relative;
  flex-shrink: 0;
}
.um2-av {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}
.um2-online {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--card-bg);
  position: absolute;
  bottom: -1px;
  right: -1px;
}
.um2-uname {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}
.um2-uname:hover {
  color: var(--primary);
  text-decoration: underline;
}
.um2-usub {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 1px;
}

/* ── Role + designation 2-line cell ── */
.um2-role-cell {
}
.um2-role-cell .um2-desig {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Badges ── */
.um2-bp {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.um2-active {
  background: #d1fae5;
  color: #065f46;
}
.um2-inactive {
  background: #fee2e2;
  color: #991b1b;
}
.um2-admin {
  background: var(--primary-light);
  color: var(--primary);
}
.um2-manager {
  background: #ecfeff;
  color: #0891b2;
}
.um2-emp {
  background: #f1f5f9;
  color: #475569;
}
.um2-hr {
  background: #ede9fe;
  color: #5b21b6;
}
.um2-sales {
  background: #fef9c3;
  color: #92400e;
}
.um2-junior {
  background: #f0f9ff;
  color: #0c4a6e;
}
.um2-mid {
  background: #fef9c3;
  color: #92400e;
}
.um2-senior {
  background: #eff6ff;
  color: #1d4ed8;
}
.um2-field {
  background: #fff7ed;
  color: #c2410c;
}
.um2-fin {
  background: #f3f4f6;
  color: #374151;
}

/* ── Action btns ── */
.um2-acts {
  display: flex;
  gap: 4px;
  align-items: center;
}
.um2-act {
  width: 27px;
  height: 27px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.15s;
  text-decoration: none;
}
.um2-act:hover.ev {
  border-color: #10b981;
  color: #10b981;
  background: #d1fae5;
}
.um2-act:hover.ee {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.um2-act:hover.ed {
  border-color: #dc2626;
  color: #dc2626;
  background: #fee2e2;
}

/* ── Pane toggle ── */
.um2-pane {
  display: none;
}
.um2-pane.active {
  display: block;
}

/* ── Stats strip ── */
.um2-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.um2-stat {
  padding: 16px 20px;
  border-right: 1px solid var(--border);
  position: relative;
}
.um2-stat:last-child {
  border-right: none;
}
.um2-stat-val {
  font-family: "Sora", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.um2-stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
}
.um2-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

/* ── Empty row ── */
.um2-empty {
  text-align: center;
  padding: 44px 20px;
  color: var(--text-light);
}
.um2-empty i {
  font-size: 32px;
  margin-bottom: 10px;
  display: block;
  opacity: 0.5;
}
.um2-empty-t {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Add User modal full-screen creative ── */
.au-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 700;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.au-modal {
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  width: 100%;
  max-width: 660px;
  max-height: 92vh;
  overflow-y: auto;
  animation: auIn 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes auIn {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.au-hdr {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.au-hdr-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.au-hdr-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #0891b2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  box-shadow: 0 4px 12px rgba(18, 126, 194, 0.35);
}
.au-hdr-title {
  font-family: "Sora", sans-serif;
  font-size: 17px;
  font-weight: 600;
}
.au-hdr-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.au-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}
.au-close:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* User type selector — creative cards */
.au-type-section {
  padding: 20px 26px 0;
}
.au-type-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.au-type-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 0;
}
.au-type-card {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.au-type-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 60%,
    rgba(18, 126, 194, 0.04)
  );
  opacity: 0;
  transition: opacity 0.2s;
}
.au-type-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}
.au-type-card:hover::before {
  opacity: 1;
}
.au-type-card.selected {
  border-color: var(--primary);
  background: linear-gradient(
    135deg,
    var(--primary-light),
    rgba(8, 145, 178, 0.06)
  );
  box-shadow: 0 4px 14px rgba(18, 126, 194, 0.15);
}
.au-type-card input[type="radio"] {
  display: none;
}
.au-type-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}
.au-type-card:not(.selected) .au-type-icon {
  background: var(--bg);
  color: var(--text-muted);
}
.au-type-card.selected .au-type-icon {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 8px rgba(18, 126, 194, 0.35);
}
.au-type-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.au-type-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.au-type-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s;
}
.au-type-card.selected .au-type-check {
  opacity: 1;
  transform: scale(1);
}

/* Form body */
.au-body {
  padding: 18px 26px;
}
.au-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  padding-bottom: 7px;
  border-bottom: 1.5px solid var(--primary-light);
  margin-bottom: 14px;
  margin-top: 18px;
}
.au-section-title:first-child {
  margin-top: 0;
}
.au-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.au-fg {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.au-fg.full {
  grid-column: 1/-1;
}
.au-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.au-label .req {
  color: #dc2626;
  margin-left: 2px;
}
.au-input {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  transition: all 0.2s;
  width: 100%;
}
.au-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.08);
}
.au-sel {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 9px 30px 9px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  cursor: pointer;
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  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='%23127EC2' 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 10px center;
  transition: all 0.2s;
}
.au-sel:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.08);
}

/* Footer */
.au-footer {
  padding: 16px 26px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg);
  border-radius: 0 0 18px 18px;
}

/* ── User Details page ── */
.ud2-hero {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    #0891b2 60%,
    #7c3aed 100%
  );
  border-radius: 14px;
  padding: 28px 28px 80px;
  position: relative;
  overflow: hidden;
  margin-bottom: -60px;
}
.ud2-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.ud2-hero-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 16px;
  transition: color 0.15s;
}
.ud2-hero-back:hover {
  color: #fff;
}
.ud2-hero-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ud2-hero-av {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}
.ud2-hero-name {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}
.ud2-hero-role {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 3px;
}
.ud2-hero-meta {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.ud2-hero-meta span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 5px;
}

.ud2-content {
  padding: 0 0 24px;
  position: relative;
  z-index: 1;
}
.ud2-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.ud2-info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.ud2-info-card.full {
  grid-column: 1/-1;
}
.ud2-info-card.half {
  grid-column: span 2;
}
.ud2-info-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 7px;
}
.ud2-info-title i {
  color: var(--primary);
  font-size: 12px;
}
.ud2-field {
  margin-bottom: 8px;
}
.ud2-field:last-child {
  margin-bottom: 0;
}
.ud2-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.ud2-field-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.ud2-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 768px) {
  .um2-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .ud2-info-grid {
    grid-template-columns: 1fr;
  }
  .ud2-info-card.half {
    grid-column: 1/-1;
  }
  .au-type-cards {
    grid-template-columns: 1fr;
  }
  .au-grid {
    grid-template-columns: 1fr;
  }
}

.mp-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.mp-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.mp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 7px 12px;
  min-width: 200px;
  flex: 1;
  max-width: 260px;
  transition: all 0.2s;
}
.mp-search:focus-within {
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.07);
}
.mp-search i {
  color: var(--text-light);
  font-size: 12px;
  flex-shrink: 0;
}
.mp-search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
  width: 100%;
}
.mp-csel-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.mp-csel-wrap .mp-icon {
  position: absolute;
  right: 9px;
  pointer-events: none;
  color: var(--primary);
  font-size: 10px;
}
.mp-csel {
  padding: 7px 28px 7px 11px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: all 0.2s;
  min-width: 120px;
}
.mp-csel:focus {
  border-color: var(--primary);
  color: var(--text);
  background: var(--card-bg);
}
.mp-toolbar-right {
  margin-left: auto;
  display: flex;
  gap: 7px;
  align-items: center;
}
.mp-refresh {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px 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: all 0.2s;
}
.mp-refresh:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.mp-tbl-wrap {
  overflow-x: auto;
}
.mp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.mp-table thead tr {
  background: var(--bg);
}
.mp-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1.5px solid var(--border);
}
.mp-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.mp-table tbody tr:last-child td {
  border-bottom: none;
}
.mp-table tbody tr {
  transition: background 0.12s;
}
.mp-table tbody tr:hover td {
  background: #f8fafc;
}
.mp-bp {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.mp-active {
  background: #d1fae5;
  color: #065f46;
}
.mp-inactive {
  background: #fee2e2;
  color: #991b1b;
}
.mp-Active {
  background: #d1fae5;
  color: #065f46;
}
.mp-Inactive {
  background: #fee2e2;
  color: #991b1b;
}
.mp-national {
  background: #dbeafe;
  color: #1e40af;
}
.mp-festival {
  background: #d1fae5;
  color: #065f46;
}
.mp-high {
  background: #fee2e2;
  color: #991b1b;
}
.mp-medium {
  background: #fef9c3;
  color: #92400e;
}
.mp-low {
  background: #f0f9ff;
  color: #0c4a6e;
}
.mp-paid {
  background: #d1fae5;
  color: #065f46;
}
.mp-unpaid {
  background: #f1f5f9;
  color: #475569;
}
.mp-acts {
  display: flex;
  gap: 4px;
  align-items: center;
}
.mp-act {
  width: 27px;
  height: 27px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.15s;
}
.mp-act:hover.ee {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.mp-act:hover.ed {
  border-color: #dc2626;
  color: #dc2626;
  background: #fee2e2;
}

/* ════════════════════════════════════════
   ENQUIRY PAGE STYLES
   ════════════════════════════════════════ */

/* ── ENQUIRY PAGE ──────────────────────────────────────── */
.enq-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.enq-summary-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.enq-summary-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--sc-color, var(--primary));
  border-radius: 3px 0 0 3px;
}

.esc-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--sc-bg, var(--primary-light));
  color: var(--sc-color, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.esc-count {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.esc-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 600;
}

.enq-main-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Tabs */
.enq-tab-bar {
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

.enq-tab-list {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.enq-tab-list::-webkit-scrollbar {
  display: none;
}

.enq-tab-btn {
  padding: 14px 18px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
}

.enq-tab-btn:hover {
  color: var(--text);
}

.enq-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.enq-tab-pill {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
}

/* Toolbar */
.enq-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
  overflow-x: auto;
}

.enq-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 7px 12px;
  min-width: 200px;
  flex: 1;
  max-width: 280px;
  transition: all 0.2s;
}

.enq-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.08);
}

.enq-search-box i {
  color: var(--text-light);
  font-size: 12px;
  flex-shrink: 0;
}

.enq-search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  width: 100%;
}

.csel-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.csel-wrap .csel-icon {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: var(--primary);
  font-size: 11px;
  z-index: 1;
}

.csel {
  padding: 7px 30px 7px 11px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: all 0.2s;
  width: 100%;
}

.csel:focus {
  border-color: var(--primary);
  color: var(--text);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.08);
}

.enq-toolbar-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.enq-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: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.enq-refresh-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.enq-refresh-btn.spinning i {
  animation: iconSpin 0.65s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.enq-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.enq-download-btn:hover {
  border-color: #10b981;
  color: #10b981;
  background: #f0fdf4;
}

/* Table */
.enq-table-wrap {
  overflow-x: auto;
}

.enq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  /* min-width: 900px; */
}

.enq-table thead tr {
  background: var(--bg);
}

.enq-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1.5px solid var(--border);
}

.enq-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

.enq-table tbody tr:last-child td {
  border-bottom: none;
}

.enq-table tbody tr:hover td {
  background: var(--bg);
}

.row-user {
  display: flex;
  align-items: center;
  gap: 9px;
}

.row-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.row-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}

.row-name:hover {
  text-decoration: underline;
}

.row-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.enq-id-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  white-space: nowrap;
  font-family: "Courier New", monospace;
  letter-spacing: 0.03em;
}

/* Actions */
.enq-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.enq-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  background: none;
}

.enq-act-status {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.enq-act-status:hover {
  background: var(--primary);
  color: #fff;
}

.enq-act-edit {
  border-color: #f59e0b;
  color: #92400e;
  background: #fef9c3;
}

.enq-act-edit:hover {
  background: #f59e0b;
  color: #fff;
}

/* Empty */
.enq-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-light);
}

.enq-empty i {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
  opacity: 0.4;
}

.enq-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.enq-empty-sub {
  font-size: 12px;
  margin-top: 4px;
}

/* Pagination */
.enq-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  flex-wrap: wrap;
  gap: 8px;
}

.enq-page-info {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.enq-page-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.enq-page-btn {
  min-width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.enq-page-btn:hover:not([disabled]) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.enq-page-btn.pg-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.enq-page-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.enq-per-page {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.enq-per-page select {
  padding: 4px 8px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  font-family: inherit;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  outline: none;
}

/* ── SIDE PANEL ── */
.enq-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 990;
}

.enq-side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 580px;
  max-width: 100vw;
  background: var(--card-bg);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.16);
  z-index: 991;
  transform: translateX(110%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.enq-side-panel.open {
  transform: translateX(0);
}

.ep-hdr {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: var(--bg);
}

.ep-hdr-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ep-hdr-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--primary);
  color: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.ep-title {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.ep-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.ep-close {
  background: #127ec214;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}

.ep-close:hover {
  background: #fee2e2;
  color: #dc2626;
}

.ep-body {
  flex: 1;
  overflow-y: auto;
}

.ep-content {
  padding: 20px 20px 0;
}

.ep-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg);
  flex-shrink: 0;
}

/* Form inside panel */
.fsec {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 20px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--primary-light);
}

.fsec:first-child {
  margin-top: 0;
}

.fgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.fgrid:last-child {
  margin-bottom: 0;
}

.fc {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fc-full {
  grid-column: 1/-1;
}

.flbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.flbl .req {
  color: #dc2626;
  margin-left: 2px;
}

.finp {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 11px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  transition: all 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.finp:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.08);
}

textarea.finp {
  resize: vertical;
}

.fsel {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 30px 8px 11px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23127EC2' 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 10px center;
  transition: all 0.2s;
}

.fsel:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.08);
}

/* Qualified box */
.qual-box {
  display: none;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
}

.qual-box.show {
  display: block;
}

.qual-lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #065f46;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Follow-up radio */
.fu-radios {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.fu-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s;
  background: var(--card-bg);
  user-select: none;
}

.fu-radio input {
  display: none;
}

.fu-radio.sel {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 14px;
  background: var(--bg);
}

.upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.uz-icon {
  font-size: 36px;
  color: #10b981;
  margin-bottom: 10px;
}

.uz-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.uz-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.upload-info {
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

/* ── STATUS MODAL ── */
.crm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 995;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.crm-overlay.show {
  display: flex;
}

.crm-modal {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: mdlIn 0.2s ease;
}

@keyframes mdlIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.crm-mhdr {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 1;
  border-radius: 14px 14px 0 0;
}

.crm-mtitle {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.crm-mclose {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s;
}

.crm-mclose:hover {
  background: #fee2e2;
  color: #dc2626;
}

.crm-mbody {
  padding: 18px 20px;
}

.crm-mfoot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--card-bg);
  position: sticky;
  bottom: 0;
  border-radius: 0 0 14px 14px;
}

.mfg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.mfg:last-child {
  margin-bottom: 0;
}

.mflbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.phdr-btn-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
/* Modal Backdrop */
.enq-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 35, 0.52);
  z-index: 700;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  backdrop-filter: blur(2px);
}

.enq-modal-backdrop.enq-modal-open {
  display: flex;
}

/* Modal */
.enq-modal {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  width: 100%;
  max-width: 480px;
  animation: enqModalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  margin: auto;
}

.enq-modal-lg {
  max-width: 720px;
}

@keyframes enqModalIn {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(-12px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Header */
.enq-modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  gap: 12px;
}

.enq-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}

.enq-modal-title {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #111827);
}

.enq-modal-sub {
  font-size: 12px;
  color: var(--text-muted, #6b7280);
  margin-top: 2px;
}

.enq-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: var(--bg, #f9fafb);
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s;
}

.enq-modal-close:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* Body */
.enq-modal-body {
  padding: 20px 24px;
  max-height: 70vh;
  overflow-y: auto;
}

/* Section title */
.enq-form-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--primary, #127ec2);
  border-bottom: 1px solid var(--border, #e5e7eb);
  padding-bottom: 7px;
  margin: 5px 0 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.enq-form-section-title:first-child {
  margin-top: 0;
}

/* Grid */
.enq-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 15px;
}

.enq-fc {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.enq-fc-full {
  grid-column: 1/-1;
}

/* Label */
.enq-flbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #111827);
}

.enq-req {
  color: #ef4444;
  margin-left: 2px;
}

/* Input */
.enq-finp {
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 9px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text, #111827);
  background: var(--card-bg, #fff);
  outline: none;
  transition: all 0.2s;
  resize: vertical;
  width: 100%;
  box-sizing: border-box;
}

.enq-finp:focus {
  border-color: var(--primary, #127ec2);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.12);
}

.enq-finp.enq-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Select */
.enq-sel-wrap {
  position: relative;
}

.enq-sel-wrap::after {
  content: "\f078";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 10px;
  color: var(--text-muted, #6b7280);
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.enq-fsel {
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid var(--border, #e5e7eb);
  border-radius: 9px;
  padding: 9px 34px 9px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text, #111827);
  background: var(--card-bg, #fff);
  outline: none;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s;
}

.enq-fsel:focus {
  border-color: var(--primary, #127ec2);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.12);
}

.enq-fsel.enq-invalid {
  border-color: #ef4444 !important;
}

/* Error */
.enq-err {
  font-size: 11px;
  color: #ef4444;
  min-height: 16px;
  display: block;
  font-weight: 500;
}

/* Footer */
.enq-modal-ftr {
  padding: 14px 24px;
  border-top: 1px solid var(--border, #e5e7eb);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Pagination */
.enq-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border, #e5e7eb);
  flex-wrap: wrap;
  gap: 10px;
}

.enq-page-info {
  font-size: 12.5px;
  color: var(--text-muted, #6b7280);
  font-weight: 500;
}

.enq-page-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.enq-pg-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border, #e5e7eb);
  background: var(--card-bg, #fff);
  color: var(--text, #111827);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}

.enq-pg-btn:hover:not(:disabled) {
  border-color: var(--primary, #127ec2);
  color: var(--primary, #127ec2);
  background: var(--primary-light, #e8f4fb);
}

.enq-pg-btn.active {
  background: var(--primary, #127ec2);
  border-color: var(--primary, #127ec2);
  color: #fff;
  box-shadow: 0 2px 8px rgba(18, 126, 194, 0.3);
}

.enq-pg-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.enq-pg-ellipsis {
  padding: 0 4px;
  color: var(--text-muted, #6b7280);
  font-size: 13px;
  line-height: 34px;
}
#stFuFields .custom-calendar-picker {
  left: 0;
}

@media (max-width: 640px) {
  .enq-form-grid {
    grid-template-columns: 1fr;
  }

  .enq-fc-full {
    grid-column: 1;
  }

  .enq-modal-hdr,
  .enq-modal-body,
  .enq-modal-ftr {
    padding-left: 16px;
    padding-right: 16px;
  }
}
@media (max-width: 1000px) {
  .enq-summary-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .enq-summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .enq-side-panel {
    width: 100vw;
  }

  .fgrid {
    grid-template-columns: 1fr;
  }

  .fc-full {
    grid-column: unset;
  }
}

/* ===== enquiry-details.php ===== */
/* ── ENQUIRY DETAILS ──────────────────────────── */
.ed-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ed-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ed-hdr-left h2 {
  font-family: "Sora", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.ed-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.ed-hdr-btns {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.edb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  background: none;
  text-decoration: none;
}

.edb-edit {
  border-color: #f59e0b;
  color: #92400e;
  background: #fef9c3;
}
.edb-status {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.edb-status:hover {
  background: var(--primary);
  color: var(--primary-light);
}
.edb-edit:hover {
  background: #f59e0b;
  color: #fff;
}

.edb-remark {
  border-color: #8b5cf6;
  color: #5b21b6;
  background: #ede9fe;
}

.edb-remark:hover {
  background: #8b5cf6;
  color: #fff;
}

.edb-followup {
  border-color: #10b981;
  color: #065f46;
  background: #d1fae5;
}

.edb-followup:hover {
  background: #10b981;
  color: #fff;
}

.edb-quote {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.edb-quote:hover {
  background: #0f65a3;
  border-color: #0f65a3;
}

/* Grid */
.ed-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 18px;
  align-items: start;
}

/* Cards */
.ed-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Avatar row */
.ed-av-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.ed-avatar {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.ed-cname {
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.ed-cco {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Fields */
.ed-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.ed-field {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.ed-field:last-child {
  border-bottom: none;
}

.ed-field:nth-last-child(2):nth-child(odd) {
  border-bottom: none;
  padding-bottom: 20px;
}

.ed-flbl {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.ed-fval {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

/* Tabs */
.ed-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.ed-tab {
  padding: 12px 18px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ed-tab:hover {
  color: var(--text);
}

.ed-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.ed-tab-panel {
  display: none;
  padding: 16px 18px;
  min-height: 180px;
}

.ed-tab-panel.active {
  display: block;
}

/* Log */
.ed-log-item {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.ed-log-item:last-child {
  border-bottom: none;
}

.ed-log-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.ed-log-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.ed-log-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ed-log-note {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.5;
}

/* FU table */
.fu-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.fu-tbl th {
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border);
  background: var(--bg);
}

.fu-tbl td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.fu-tbl tbody tr:last-child td {
  border-bottom: none;
}

/* Empty */
.ed-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-light);
}

.ed-empty i {
  font-size: 28px;
  display: block;
  margin-bottom: 10px;
  opacity: 0.4;
}

.ed-empty-lbl {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 13px;
}

/* Badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.bp-pending {
  background: #fff7ed;
  color: #c2410c;
}

.bp-win {
  background: #d1fae5;
  color: #065f46;
}

.bp-disqualified {
  background: #e8e5fa;
  color: #8b5cf6;
}

.bp-qualified {
  background: #ecf5fa;
  color: #3b82f6;
}

.bp-lost {
  background: #fef2f2;
  color: #ef4444;
}

.bp-hot {
  background: #fff7ed;
  color: #c2410c;
}

.bp-warm {
  background: #fef9c3;
  color: #92400e;
}

.bp-cold {
  background: #f0f9ff;
  color: #0c4a6e;
}

.enq-id-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  white-space: nowrap;
  font-family: "Courier New", monospace;
}

/* ── MODALS ── */
.crm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 995;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.crm-overlay.show {
  display: flex;
}

.crm-modal {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  animation: mdlIn 0.2s ease;
}

@keyframes mdlIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.crm-mhdr {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 1;
  border-radius: 14px 14px 0 0;
}

.crm-mtitle {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.crm-mclose {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s;
}

.crm-mclose:hover {
  background: #fee2e2;
  color: #dc2626;
}

.crm-mbody {
  padding: 18px 20px;
}

.crm-mfoot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: var(--card-bg);
  border-radius: 0 0 14px 14px;
}

.mfg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 13px;
}

.mfg:last-child {
  margin-bottom: 0;
}

.mflbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* ── EDIT SIDE PANEL ── */
.enq-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 990;
}

.enq-side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 580px;
  max-width: 100vw;
  background: var(--card-bg);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.16);
  z-index: 991;
  transform: translateX(110%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.enq-side-panel.open {
  transform: translateX(0);
}

/* On enquiry-details page: panel & overlay sit BELOW the topbar so the
   topbar remains fully visible and interactive while the panel is open. */
body.page-enq-details .enq-panel-overlay {
  top: var(--topbar-height);
  z-index: 499;
}
body.page-enq-details .enq-side-panel {
  top: var(--topbar-height);
  z-index: 500;
  box-shadow: -6px 0 32px rgba(0, 0, 0, 0.18);
}

.ep-hdr {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: var(--bg);
}

.ep-hdr-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ep-title {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.ep-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.ep-body {
  flex: 1;
  overflow-y: auto;
}

.ep-content {
  padding: 20px 20px 0;
}

.ep-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg);
  flex-shrink: 0;
}

.fsec {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 20px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--primary-light);
}

.fsec:first-child {
  margin-top: 0;
}

.fgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.fc {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fc-full {
  grid-column: 1/-1;
}

.flbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.flbl .req {
  color: #dc2626;
  margin-left: 2px;
}

.finp {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 11px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  transition: all 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.finp:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.08);
}

textarea.finp {
  resize: vertical;
}

.fsel {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 30px 8px 11px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23127EC2' 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 10px center;
  transition: all 0.2s;
}

.fsel:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.08);
}

.qual-box {
  display: none;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
}

.qual-box.show {
  display: block;
}

.qual-lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #065f46;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fu-radios {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.fu-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s;
  background: var(--card-bg);
  user-select: none;
}

.fu-radio input {
  display: none;
}

.fu-radio.sel {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

@media (max-width: 1024px) {
  .ed-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .enq-side-panel {
    width: 100vw;
  }

  .fgrid {
    grid-template-columns: 1fr;
  }

  .fc-full {
    grid-column: unset;
  }
}

/* ===== designation.php ===== */
.fgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.fc {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fc-full {
  grid-column: 1/-1;
}

.flbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.req {
  color: #ef4444;
  margin-left: 2px;
}

.finp {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  transition: border-color 0.2s;
}

.finp:focus {
  border-color: var(--primary);
}

.finp.invalid {
  border-color: #ef4444 !important;
}

.fsel-inp {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 30px;
  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='%23127EC2' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.ferr {
  font-size: 11px;
  color: #ef4444;
  min-height: 14px;
}

/* ===== users.php ===== */
/* ── Main card ── */
.um-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ── Segment tabs — primary highlighted ── */
.um-seg-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 20px 0;
  border-bottom: 1px solid var(--border);
}

.um-seg-btn {
  padding: 10px 20px;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
  position: relative;
  white-space: nowrap;
}

.um-seg-btn:hover {
  color: var(--text);
}

.um-seg-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}

.um-seg-btn.active .um-seg-pill {
  background: var(--primary);
  color: #fff;
}

.um-seg-pill {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  background: var(--bg);
  color: var(--text-muted);
  transition: all 0.2s;
}

/* ── Toolbar ── */
.um-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.um-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 8px 12px;
  min-width: 220px;
  flex: 1;
  max-width: 300px;
  transition: all 0.2s;
}

.um-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.08);
  background: var(--card-bg);
}

.um-search i {
  color: var(--text-light);
  font-size: 12px;
}

.um-search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  width: 100%;
}

.um-sel-wrap {
  position: relative;
}

.um-sel-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--primary);
  font-size: 10px;
}

.um-sel {
  padding: 8px 30px 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  min-width: 130px;
  transition: all 0.2s;
}

.um-sel:focus {
  border-color: var(--primary);
}

.um-toolbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.um-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.um-icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ── Table ── */
.um-tbl-wrap {
  overflow-x: auto;
}

.um-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.um-table thead tr {
  background: var(--bg);
}

.um-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1.5px solid var(--border);
}

.um-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.um-table tbody tr:last-child td {
  border-bottom: none;
}

.um-table tbody tr:hover td {
  background: #f8fafc;
}

/* ── User cell ── */
.um-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.um-av-wrap {
  position: relative;
  flex-shrink: 0;
}

.um-av {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.um-online {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--card-bg);
}

.um-uname {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  display: block;
}

.um-uname:hover {
  color: var(--primary);
}

.um-usub {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 1px;
}

/* ── Badges ── */
.um-bp {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.bp-admin {
  background: #eff6ff;
  color: #1d4ed8;
}

.bp-manager {
  background: #d1fae5;
  color: #065f46;
}

.bp-sales {
  background: #e0f2fe;
  color: #0369a1;
}

.bp-field {
  background: #fff7ed;
  color: #c2410c;
}

.bp-hr {
  background: #fdf2f8;
  color: #9d174d;
}

.bp-fin {
  background: #fef9c3;
  color: #854d0e;
}

.bp-ops {
  background: #f3e8ff;
  color: #6b21a8;
}

.bp-emp {
  background: #f3f4f6;
  color: #374151;
}

.bp-active {
  background: #dcfce7;
  color: #15803d;
}
.bp-Active {
  background: #dcfce7;
  color: #15803d;
}

.bp-inactive {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.bp-Inactive {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* ── UAM trigger + menu ── */
.uam-wrap {
  position: relative;
  display: inline-flex;
}

.uam-trigger {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}

.uam-trigger:hover,
.uam-trigger.open {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.uam-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.13);
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
}

.uam-menu.open {
  display: block;
}

.uam-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.15s;
}

.uam-menu-item:hover {
  background: var(--bg);
}

.uam-menu-item i {
  width: 16px;
  text-align: center;
  font-size: 13px;
}

.uam-menu-item.item-edit i {
  color: var(--primary);
}

.uam-menu-item.item-status i {
  color: #10b981;
}

.uam-menu-item.item-status.deactivate i {
  color: #f59e0b;
}

.uam-menu-item.item-view i {
  color: #7c3aed;
}

.uam-menu-item.item-reset i {
  color: #ef4444;
}

.uam-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ── Pagination ── */
.um-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.um-page-info {
  font-size: 12px;
  color: var(--text-muted);
}

.um-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.um-pg-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.um-pg-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.um-pg-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}

.um-pg-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.um-pg-ellipsis {
  font-size: 13px;
  color: var(--text-muted);
  padding: 0 3px;
}

/* Pane show/hide */
.um-pane {
  display: none;
}

.um-pane.active {
  display: block;
}

/* ── Reset Device Modal ── */
.um-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.um-modal-overlay.open {
  display: flex;
}

.um-modal {
  background: var(--card-bg);
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.um-modal-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.um-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fef2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #ef4444;
  flex-shrink: 0;
}

.um-modal-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.um-modal-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.um-modal-close {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.um-modal-body {
  padding: 18px 20px;
}

.um-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.um-modal-warn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #fef2f2;
  border-radius: 9px;
  margin-bottom: 14px;
}

.um-modal-warn i {
  color: #ef4444;
  font-size: 14px;
  margin-top: 1px;
  flex-shrink: 0;
}

.um-modal-warn p {
  font-size: 12.5px;
  color: #991b1b;
  line-height: 1.5;
  margin: 0;
}

/* Upload modal */
.um-upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.um-upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.um-upload-zone i {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 8px;
  display: block;
}

.um-upload-zone p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0;
}

.um-upload-zone span {
  font-size: 11.5px;
  color: var(--text-light);
}

@media (max-width: 700px) {
  .um-stat {
    min-width: 50%;
    border-bottom: 1px solid var(--border);
  }

  .um-stat:nth-child(2n) {
    border-right: none;
  }

  .um-stat:nth-last-child(-n + 2) {
    border-bottom: none;
  }
}

/* ===== user-details.php ===== */
.ud2-hero {
  background: linear-gradient(135deg, #127ec2 0%, #0ea5e9 55%, #7c3aed 100%);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
}
.ud2-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.ud2-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.ud2-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  transition: all 0.2s;
}
.ud2-back:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.ud2-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s;
}
.ud2-edit-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.ud2-hero-body {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.ud2-av {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  position: relative;
}
.ud2-av img {
  width: 68px;
  height: 66px;
  border-radius: 8px;
  background-size: contain;
  object-fit: contain;
  margin-top: 5px;
}
.ud2-online {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: #22c55e;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.8);
}
.ud2-hero-name {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}
.ud2-hero-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 3px;
}
.ud2-hero-tags {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.ud2-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
}

.ud2-content {
  position: relative;
  z-index: 1;
  padding-bottom: 24px;
}
.ud2-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding-top: 14px;
}
.ud2-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.ud2-card.col2 {
  grid-column: span 2;
}
.ud2-card.col3 {
  grid-column: 1/-1;
  margin-top: 14px;
}
.ud2-card-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 7px;
}
.ud2-card-title i {
  color: var(--primary);
}
.ud2-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.ud2-fl {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.ud2-fv {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* Perf stats */
.ud2-perf {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ud2-pstat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
}
.ud2-pval {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}
.ud2-plbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
}
.ud2-pstat.pad-8 {
  padding: 8px;
}
@media (max-width: 900px) {
  .ud2-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ud2-card.col3 {
    grid-column: 1/-1;
  }
  .ud2-card.col2 {
    grid-column: 1/-1;
  }
}
@media (max-width: 600px) {
  .ud2-grid {
    grid-template-columns: 1fr;
  }
  .ud2-perf {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== add-new-user.php ===== */
.form-page-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  max-width: 100%;
}

.form-page-hdr {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #127ec2 0%, #7c3aed 100%);
}

.form-page-hdr-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

.form-page-hdr-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.form-page-hdr-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 2px;
}

/* User type selector */
.utype-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}

.utype-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
  position: relative;
}

.utype-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.utype-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.utype-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s;
}

.utype-card.selected .utype-icon {
  background: var(--primary);
  color: #fff;
}

.utype-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.utype-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.utype-check {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s;
}

.utype-card.selected .utype-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Form common */
.form-section {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-sec-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 18px;
}

.fg-grid .fg-full {
  grid-column: 1/-1;
}

.fg label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fg label .req {
  color: #ef4444;
  margin-left: 2px;
}

.fg input,
.fg select,
.fg textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  box-sizing: border-box;
}

.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.1);
  background: var(--card-bg);
}

.fg select {
  -webkit-appearance: none;
  appearance: none;
  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='%23127EC2' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.form-page-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg);
}

.pw-wrap {
  position: relative;
}

.pw-wrap input {
  padding-right: 40px;
}

.pw-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 14px;
  padding: 0;
}

.pw-eye:hover {
  color: var(--primary);
}

@media (max-width: 700px) {
  .fg-grid {
    grid-template-columns: 1fr 1fr;
  }

  .fg-grid .fg-full {
    grid-column: 1/-1;
  }

  .utype-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .fg-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== edit-user.php ===== */
.form-page-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  max-width: 100%;
}
.form-page-hdr {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #127ec2 0%, #03609b 100%);
}
.form-page-hdr-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}
.form-page-hdr-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.form-page-hdr-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 2px;
}
.edit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.utype-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.utype-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
  position: relative;
}
.utype-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.utype-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.utype-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s;
}
.utype-card.selected .utype-icon {
  background: var(--primary);
  color: #fff;
}
.utype-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.utype-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.utype-check {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s;
}
.utype-card.selected .utype-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.form-section {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}
.form-section:last-of-type {
  border-bottom: none;
}
.form-sec-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 18px;
}
.fg-grid .fg-full {
  grid-column: 1/-1;
}
.fg label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fg label .req {
  color: #ef4444;
  margin-left: 2px;
}
.fg input,
.fg select,
.fg textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  box-sizing: border-box;
}
.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.1);
  background: var(--card-bg);
}
.fg select {
  -webkit-appearance: none;
  appearance: none;
  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='%23127EC2' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.form-page-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg);
}
.pw-wrap {
  position: relative;
}
.pw-wrap input {
  padding-right: 40px;
}
.pw-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 14px;
  padding: 0;
}
.pw-eye:hover {
  color: var(--primary);
}
@media (max-width: 700px) {
  .fg-grid {
    grid-template-columns: 1fr 1fr;
  }
  .fg-grid .fg-full {
    grid-column: 1/-1;
  }
  .utype-cards {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .fg-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== master-modal-script.php ===== */
.fgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
.fc {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fc-full {
  grid-column: 1/-1;
}
.flbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.req {
  color: #ef4444;
  margin-left: 2px;
}
.finp {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  transition: border-color 0.2s;
}
.finp:focus {
  border-color: var(--primary);
}
.finp.invalid {
  border-color: #ef4444 !important;
}
.fsel-inp {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 30px;
  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='%23127EC2' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
textarea.finp {
  resize: vertical;
  min-height: 70px;
}
.ferr {
  font-size: 11px;
  color: #ef4444;
  min-height: 14px;
}

/* ===== create-quotation.php ===== */
.cq-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 18px;
}
.cq-card-hdr {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  gap: 10px;
}
.cq-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.cq-card-title {
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 600;
}
.cq-card-body {
  padding: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.fg {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fg-full {
  grid-column: 1/-1;
}
.flabel {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.flabel .req {
  color: #dc2626;
  margin-left: 2px;
}
.finput {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  transition: all 0.2s;
  resize: vertical;
  width: 100%;
  box-sizing: border-box;
}
.finput:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.08);
}
.fsel-panel {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 9px 32px 9px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  cursor: pointer;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  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='%23127EC2' 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 11px center;
  transition: all 0.2s;
  box-sizing: border-box;
}
.fsel-panel:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.08);
}
/* Items table */
.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.items-table th {
  padding: 9px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border);
  background: var(--bg);
}
.items-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.items-table td input {
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.items-table td input:focus {
  border-color: var(--primary);
}
.remove-row-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: #fee2e2;
  color: #dc2626;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.15s;
}
.remove-row-btn:hover {
  background: #dc2626;
  color: #fff;
}
.add-item-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1.5px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 10px;
}
.add-item-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.cq-totals {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  max-width: 320px;
  margin-left: auto;
}
.cq-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  padding: 5px 0;
}
.cq-total-row.grand {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  border-top: 1.5px solid var(--border);
  padding-top: 10px;
  margin-top: 5px;
}
.cq-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}
.sp-form-grid label.error {
  bottom: -18px;
  position: absolute;
  left: 5px;
  color: #ff4e4e;
  font-size: 12px;
}
@media (max-width: 900px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ── Sidebar toggle on mobile ── */
@media (max-width: 991px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    z-index: 1050;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: var(--sidebar-width) !important;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1040;
  }
  .sidebar-overlay.active {
    display: block;
  }
  .main-wrapper {
    margin-left: 0 !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 14px !important;
  }
  .topbar-header {
    left: 0 !important;
    padding-left: 14px;
  }
}

@media (max-width: 640px) {
  .page-hdr {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
  }
  .page-hdr .btn-primary-sm {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 1100px) {
  .dash-stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 580px) {
  .dash-stat-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .um2-tbl-wrap,
  .enq-tbl-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .um2-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .um2-seg {
    width: 100%;
  }
  .um2-search {
    flex: 1 1 180px;
    min-width: 0;
  }
  /* .um2-csel-wrap {
    flex: 0 0 130px;
  } */
}

@media (max-width: 1024px) {
  .ed-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 700px) {
  .enq-side-panel {
    width: 100vw !important;
  }
  .fgrid {
    grid-template-columns: 1fr !important;
  }
  .fc-full {
    grid-column: unset !important;
  }
  .ed-hdr {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ed-hdr-btns {
    flex-wrap: wrap;
    gap: 6px;
  }
  .ed-hdr-btns .edb {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
  }
  .ed-fields {
    grid-template-columns: 1fr !important;
  }
  .sp-form-grid {
    grid-template-columns: 1fr !important;
  }
  .sp-fc-full {
    grid-column: unset !important;
  }
}

@media (max-width: 540px) {
  .crm-modal {
    margin: 8px;
    max-height: calc(100vh - 16px);
  }
  .fgrid {
    grid-template-columns: 1fr !important;
  }
  .fc-full {
    grid-column: unset !important;
  }
}

@media (max-width: 768px) {
  .enq-filter-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .enq-filter-bar > * {
    flex: 1 1 140px;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .cq-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 600px) {
  .cq-item-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 860px) {
  .ud-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 700px) {
  .uf-grid {
    grid-template-columns: 1fr !important;
  }
  .uf-fc-full {
    grid-column: unset !important;
  }
}

@media (max-width: 480px) {
  .tb-search-wrap {
    display: none;
  }
  .tb-actions {
    gap: 6px;
  }
}

@media (max-width: 700px) {
  .fu-tbl {
    min-width: 640px;
  }
  #edPanelFu > div {
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .master-filter-bar {
    flex-direction: column;
    gap: 8px;
  }
  .master-filter-bar > * {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .btn-primary-sm,
  .btn-ghost-sm {
    font-size: 12px;
    padding: 7px 12px;
  }
  h2.page-title-main {
    font-size: 17px;
  }
}

.anu-utype-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.anu-utype-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
  position: relative;
  user-select: none;
}

.anu-utype-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.anu-utype-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.anu-utype-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.anu-utype-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s;
}

.anu-utype-card.selected .anu-utype-icon {
  background: var(--primary);
  color: #fff;
}

.anu-utype-body {
  flex: 1;
}

.anu-utype-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.anu-utype-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.anu-utype-check {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s;
}

.anu-utype-card.selected .anu-utype-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

@media (max-width: 560px) {
  .anu-utype-cards {
    grid-template-columns: 1fr;
  }
}

/* ── 2. Profile Image Upload Card ── */
.anu-img-upload-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px;
  border: 1.5px dashed var(--border);
  border-radius: 14px;
  background: var(--bg);
  flex-wrap: wrap;
}

.anu-img-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.anu-img-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-muted);
  background: var(--card-bg);
  overflow: hidden;
  transition: border-color 0.2s;
}

.anu-img-avatar.has-img {
  border-color: var(--primary);
  border-style: solid;
}

.anu-img-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.anu-img-edit-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  border: 2px solid var(--card-bg);
  transition:
    background 0.2s,
    transform 0.15s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.anu-img-edit-btn:hover {
  background: var(--primary-dark, #1a56db);
  transform: scale(1.1);
}

.anu-img-details {
  flex: 1;
  min-width: 180px;
}

.anu-img-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.anu-img-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.anu-img-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.anu-img-label {
  cursor: pointer;
}

.anu-img-remove {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  transition: opacity 0.15s;
}

.anu-img-remove:hover {
  opacity: 0.75;
  text-decoration: underline;
}

/* ── 3. Multi-select Assign Dropdown ── */
.anu-multi-select-wrap {
  position: relative;
}

.anu-multi-trigger {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 42px;
  padding: 6px 36px 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  cursor: pointer;
  transition: border-color 0.2s;
  position: relative;
  user-select: none;
}

.anu-multi-trigger:hover {
  border-color: var(--primary);
}

.anu-multi-placeholder {
  font-size: 13px;
  color: var(--text-muted);
}

.anu-multi-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.anu-multi-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--primary);
}

.anu-multi-tag i {
  cursor: pointer;
  font-size: 10px;
  opacity: 0.7;
}

.anu-multi-tag i:hover {
  opacity: 1;
}

.anu-multi-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-muted);
  pointer-events: none;
  transition: transform 0.2s;
}

.anu-multi-arrow.open {
  transform: translateY(-50%) rotate(180deg);
}

.anu-multi-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 500;
  overflow: hidden;
}

.anu-multi-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.anu-multi-search-row input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
}

.anu-multi-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
}

.anu-multi-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background 0.12s;
  user-select: none;
}

.anu-multi-item:hover {
  background: var(--primary-light);
}

.anu-multi-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.anu-multi-item input[type="checkbox"]:checked + span {
  color: var(--primary);
  font-weight: 600;
}

.anu-multi-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.anu-multi-clear {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: color 0.15s;
}

.anu-multi-clear:hover {
  color: #ef4444;
}

.anu-multi-done {
  padding: 5px 14px !important;
  font-size: 12px !important;
}

/* ── 4. Calendar — fix for multiple instances on same page ── */

#ctrlDate .calendar-wrapper {
  max-width: 200px;
}
.custom-calendar-picker {
  position: fixed;
  z-index: 999999;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
  min-width: 280px;
}

/* Custom Select wrapper */
.anu-sel-wrap {
  position: relative;
}

.anu-sel-wrap select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 34px 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.anu-sel-wrap select:focus {
  border-color: var(--primary);
}

.anu-sel-icon {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Textarea */
textarea {
  width: 100%;
  resize: vertical;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  transition: border-color 0.2s;
}

textarea:focus {
  border-color: var(--primary);
}

/* Brand checkboxes */
.anu-brand-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.anu-brand-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  color: var(--text);
}

.anu-brand-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.anu-brand-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
}

.fg-full {
  grid-column: 1 / -1;
}

/* ── Dark theme overrides ── */
[data-theme="dark"] .anu-img-upload-card {
  border-color: var(--border);
}

[data-theme="dark"] .anu-multi-dropdown {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .custom-calendar-picker {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ── Fix: Prevent duplicate date picker icon (Issue #1) ── */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  filter: invert(0.3);
}
input[type="date"]::-webkit-inner-spin-button {
  display: none;
}
/* Remove background-image from any date input that might add a second icon */
.finp[type="date"],
.fg input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  background-image: none !important;
  padding-right: 10px;
}

/* ── Assign Module Modal Styles (users.php) ── */
.assign-module-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.assign-module-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.assign-module-modal {
  background: var(--card-bg);
  border-radius: 14px;
  width: 600px;
  max-width: 96vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  transform: translateY(12px);
  transition: transform 0.2s;
}
.assign-module-overlay.open .assign-module-modal {
  transform: translateY(0);
}
.assign-module-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.assign-module-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #e8f4fd;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.assign-module-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.assign-module-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}
.assign-module-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}
.assign-module-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 9px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.assign-module-user-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.assign-module-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.assign-module-user-role {
  font-size: 11.5px;
  color: var(--text-muted);
}
.assign-module-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.assign-module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.assign-module-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s;
  background: var(--card-bg);
}
.assign-module-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.assign-module-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.assign-module-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.assign-module-item-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.assign-module-item-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.assign-module-item-sub {
  font-size: 10.5px;
  color: var(--text-muted);
}
.assign-module-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── Add District Modal (master-state.php) ── */
.add-district-btn {
  background: none;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.add-district-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* ── Change Credentials Popup (user-details-system.php) ── */
.cred-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.cred-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.cred-modal {
  background: var(--card-bg);
  border-radius: 14px;
  width: 420px;
  max-width: 95vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  transform: translateY(12px);
  transition: transform 0.2s;
}
.cred-overlay.open .cred-modal {
  transform: translateY(0);
}
.cred-mhdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.cred-mtitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cred-mclose {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.2s;
}
.cred-mclose:hover {
  color: var(--text);
}
.cred-mbody {
  padding: 18px 20px;
}
.cred-field {
  margin-bottom: 14px;
}
.cred-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  display: block;
}
.cred-input-wrap {
  position: relative;
}
.cred-input {
  width: 100%;
  padding: 9px 38px 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  box-sizing: border-box;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.cred-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.1);
}
.cred-input.readonly-inp {
  background: var(--bg);
  color: var(--text-muted);
}
.cred-eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 2px;
}
.cred-err {
  font-size: 11px;
  color: #ef4444;
  min-height: 14px;
  display: block;
  margin-top: 3px;
}
.cred-mfoot {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── User Details System - Section styles ── */
.uds-section-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.uds-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.uds-section-title i {
  color: var(--primary);
  font-size: 13px;
}
.uds-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 20px;
}
.uds-field {
}
.uds-fl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 3px;
}
.uds-fv {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.uds-cred-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 9px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}
.uds-cred-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.uds-cred-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.uds-change-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.uds-change-btn:hover {
  opacity: 0.88;
}
.uds-assign-users-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.uds-assign-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
}
.uds-assign-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.uds-assign-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.uds-assign-role {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ── Credentials overlay uses .open class ── */
.cred-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}
.cred-overlay.open {
  display: flex;
}

/* ── Fix: Hide native date input completely when custom calendar is active ── */
input[type="date"][data-cal-init="1"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  position: absolute !important;
  pointer-events: none !important;
}
/* Prevent any residual browser date-picker icon from showing */
input[type="date"]::-webkit-calendar-picker-indicator {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-clear-button {
  display: none !important;
  -webkit-appearance: none !important;
}
input[type="date"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* ── Assign Module Grid (user-details-system.php) ── */
.assign-mod-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: all 0.18s;
  background: var(--card-bg);
  user-select: none;
}
.assign-mod-item:hover {
  border-color: var(--primary);
  background: rgba(18, 126, 194, 0.04);
}
.assign-mod-item.assigned {
  border-color: var(--primary);
  background: rgba(18, 126, 194, 0.06);
}
.assign-mod-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
@media (max-width: 768px) {
  #assignModulesGrid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 480px) {
  #assignModulesGrid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Inline Status Toggle (notification, faq, digital-catalogue pages) ── */
.ntf-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}
.ntf-toggle-wrap input[type="checkbox"] {
  display: none;
}
.ntf-toggle-track {
  width: 38px;
  height: 20px;
  border-radius: 99px;
  background: var(--border);
  position: relative;
  transition: background 0.22s;
  flex-shrink: 0;
}
.ntf-toggle-wrap input[type="checkbox"]:checked ~ .ntf-toggle-track {
  background: var(--primary, #127ec2);
}
.ntf-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s;
  pointer-events: none;
}
.ntf-toggle-wrap
  input[type="checkbox"]:checked
  ~ .ntf-toggle-track
  .ntf-toggle-thumb {
  transform: translateX(18px);
}
.ntf-status-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 44px;
}
/* ============================================================
   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: 600;
  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: 700;
  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: 600;
  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: 600;
  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: 700;
}
.hc-day.holiday {
  background: #fee2e2;
  color: #dc2626;
  font-weight: 600;
  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: 600;
  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: 700;
  color: var(--primary);
  line-height: 1;
}
.hi-date-mon {
  font-size: 9px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hi-info {
  flex: 1;
}
.hi-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.hi-type {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}
.hi-badge {
  font-size: 10px;
  font-weight: 600;
  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: 600;
  color: var(--text);
}
.holiday-type-btn .htb-desc {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ── Stats row ── */
.inv-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.inv-stat-card {
  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);
  transition: box-shadow 0.2s;
}
.inv-stat-card:hover {
  box-shadow: 0 4px 20px rgba(18, 126, 194, 0.1);
}
.inv-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}
.inv-stat-body {
}
.inv-stat-val {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}
.inv-stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Filter select ── */
.inv-filter-sel {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.inv-filter-sel:focus {
  border-color: var(--primary);
}

/* ── Code / badge elements ── */
.inv-code-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  font-family: monospace;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.inv-cat-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.inv-cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.inv-parent-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── Product name cell ── */
.prod-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.prod-thumb {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.prod-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.prod-sku-sm {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
  margin-top: 2px;
}

/* ── Stock badges ── */
.prod-stock-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.stock-in {
  background: #ecfdf5;
  color: #059669;
}
.stock-low {
  background: #fffbeb;
  color: #d97706;
}
.stock-out {
  background: #fee2e2;
  color: #dc2626;
}
[data-theme="dark"] .stock-in {
  background: #064e3b;
  color: #34d399;
}
[data-theme="dark"] .stock-low {
  background: #451a03;
  color: #fbbf24;
}
[data-theme="dark"] .stock-out {
  background: #450a0a;
  color: #f87171;
}

/* ── Pagination ── */
.inv-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}
.inv-page-info {
  font-size: 13px;
  color: var(--text-muted);
}
.inv-page-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}
.inv-page-btn {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}
.inv-page-btn:hover:not(:disabled) {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.inv-page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.inv-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.inv-page-ellipsis {
  font-size: 13px;
  color: var(--text-muted);
  padding: 0 4px;
}

/* ── Product view side-panel rows ── */
.pv-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.pv-row:last-child {
  border-bottom: none;
}
.pv-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 130px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.pv-val {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

/* ── Modal section title ── */
.prod-modal-section-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .inv-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .inv-stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .inv-stat-val {
    font-size: 18px;
  }
  .inv-stat-icon {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }
  .inv-stat-card {
    padding: 12px;
    gap: 10px;
  }
  .prod-name-cell {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .prod-thumb {
    display: none;
  }
  .inv-pagination {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 420px) {
  .inv-stats-row {
    grid-template-columns: 1fr;
  }
}

/* ── Product image upload widget ── */
.prod-img-upload-wrap:hover {
  border-color: var(--primary) !important;
  background: var(--hover-bg, #f0f7ff) !important;
}
.prod-img-upload-wrap {
  user-select: none;
}

.pimg-upload-section {
  margin-bottom: 18px;
}
.pimg-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.pimg-thumb-item {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 10px;
  overflow: visible;
  border: 2px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.pimg-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.pimg-thumb-item.pimg-thumb-primary {
  border-color: var(--primary);
}
.pimg-primary-badge {
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 0 0 6px 6px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.pimg-thumb-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  border: 2px solid var(--card-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  z-index: 10;
  transition:
    background 0.15s,
    transform 0.15s;
  padding: 0;
}
.pimg-thumb-remove:hover {
  background: #dc2626;
  transform: scale(1.15);
}
.pimg-drop-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 22px 16px;
  text-align: center;
  background: var(--bg);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  user-select: none;
}
.pimg-drop-zone:hover,
.pimg-drop-zone.pimg-drag-over {
  border-color: var(--primary);
  background: rgba(18, 126, 194, 0.04);
}
.pimg-upload-icon {
  font-size: 30px;
  color: var(--primary);
  margin-bottom: 8px;
  display: block;
}
.pimg-drop-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.pimg-browse-link {
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
}
.pimg-drop-hint {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}

.pd-wrap {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 900px) {
  .pd-wrap {
    grid-template-columns: 1fr;
  }
}
.pd-gallery-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}
.pd-main-img-wrap {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
}
.pd-main-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.2s;
}
.pd-thumb-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pd-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg);
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.pd-thumb.active,
.pd-thumb:hover {
  border-color: var(--primary);
}
.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
}
.pd-product-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.3;
}
.pd-sku-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.pd-price-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 18px;
}
.pd-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}
.pd-cost-price {
  font-size: 14px;
  color: var(--text-light);
  text-decoration: line-through;
}
.pd-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-light);
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.pd-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.pd-spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pd-spec-lbl {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.pd-spec-val {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
}
.pd-stock-bar-wrap {
  margin: 14px 0;
}
.pd-stock-bar-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.pd-stock-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--border);
  overflow: hidden;
}
.pd-stock-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.4s;
}
.pd-action-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.pd-btn-edit {
  flex: 1;
  min-width: 130px;
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.2s;
}
.pd-btn-edit:hover {
  background: #0e65a0;
}
.pd-btn-back {
  padding: 10px 18px;
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s;
}
.pd-btn-back:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pd-desc-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-top: 18px;
}
.pd-desc-text {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
}
/* editable fields on detail page */
.pd-editable {
  outline: none;
  border-radius: 6px;
  padding: 2px 6px;
  transition:
    background 0.2s,
    box-shadow 0.2s;
  cursor: text;
}
.pd-editable:hover {
  background: rgba(18, 126, 194, 0.06);
}
.pd-editable:focus {
  background: rgba(18, 126, 194, 0.1);
  box-shadow: 0 0 0 2px rgba(18, 126, 194, 0.18);
}
.pd-edit-hint {
  font-size: 11px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}

.desg-assign-btn {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
}
.desg-assign-btn:hover {
  background: rgba(16, 185, 129, 0.22) !important;
}
.damod-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: all 0.18s;
  gap: 10px;
}
.damod-item.assigned {
  border-color: var(--primary);
  background: rgba(18, 126, 194, 0.06);
}
.damod-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ------ digital-catelogue.php ------ */
/* ── Catalogue Grid ── */
.dc-catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 4px;
}
.dc-cat-card {
  background: var(--card, #fff);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition:
    box-shadow 0.22s,
    transform 0.18s;
}
.dc-cat-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}
.dc-cat-pdf-preview {
  height: 110px;
  background: linear-gradient(135deg, #127ec215, #127ec228);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.dc-cat-pdf-icon {
  font-size: 36px;
  color: #127ec2;
}
.dc-cat-pdf-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dc-cat-body {
  padding: 14px 16px 16px;
}
.dc-cat-user-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}
.dc-ut-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.dc-ut-sales {
  background: rgba(29, 79, 216, 0.1);
  color: #1d4fd8;
  border: 1px solid rgba(29, 79, 216, 0.2);
}
.dc-ut-system {
  background: rgba(90, 33, 182, 0.1);
  color: #5a21b6;
  border: 1px solid rgba(90, 33, 182, 0.2);
}
.dc-cat-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.35;
}
.dc-cat-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.dc-cat-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.dc-btn-view {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(18, 126, 194, 0.1);
  color: var(--primary);
  border: 1px solid rgba(18, 126, 194, 0.22);
  text-decoration: none;
  transition: background 0.18s;
}
.dc-btn-view:hover {
  background: rgba(18, 126, 194, 0.18);
}
.dc-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.22);
  text-decoration: none;
  transition: background 0.18s;
}
.dc-btn-download:hover {
  background: rgba(16, 185, 129, 0.2);
}
.dc-btn-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 12px;
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.22);
  cursor: pointer;
  transition: background 0.18s;
  margin-left: auto;
}
.dc-btn-edit:hover {
  background: rgba(100, 116, 139, 0.2);
}

/* ── Multi Select ── */
.dc-multi-select {
  position: relative;
}
.dc-ms-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: var(--card);
  min-height: 42px;
  transition: border-color 0.18s;
  flex-wrap: wrap;
  gap: 4px;
}
.dc-ms-selected:hover {
  border-color: var(--primary);
}
.dc-ms-placeholder {
  font-size: 13px;
  color: var(--text-muted);
}
.dc-ms-arrow {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.dc-ms-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(18, 126, 194, 0.12);
  color: var(--primary);
}
.dc-ms-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 200;
  overflow: hidden;
}
.dc-ms-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.dc-ms-option:hover {
  background: rgba(18, 126, 194, 0.06);
}
.dc-ms-option input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ── Upload Area ── */
.dc-upload-area {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.18s,
    background 0.18s;
  background: var(--card);
}
.dc-upload-area:hover {
  border-color: var(--primary);
  background: rgba(18, 126, 194, 0.04);
}
.dc-upload-icon {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 6px;
}
.dc-upload-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.dc-upload-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ── PDF Preview Box ── */
.dc-pdf-preview-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  border: 1.5px solid #ef444430;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.04);
}
.dc-pdf-prev-icon {
  font-size: 26px;
  color: #ef4444;
  flex-shrink: 0;
}
.dc-pdf-prev-info {
  flex: 1;
  min-width: 0;
}
.dc-pdf-prev-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dc-pdf-prev-size {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.dc-pdf-prev-remove {
  width: 28px;
  height: 28px;
  border-radius: 99px;
  border: none;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.dc-pdf-prev-remove:hover {
  background: rgba(239, 68, 68, 0.22);
}

@media (max-width: 640px) {
  .dc-catalogue-grid {
    grid-template-columns: 1fr;
  }
}

/* ------ faq.php ------ */
.faq-ans-cell {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
  color: var(--text-muted);
}

.faq-bp {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.faq-general {
  background: #127ec215;
  color: #127ec2;
  border: 1px solid #127ec230;
}

.faq-account {
  background: #8b5cf615;
  color: #8b5cf6;
  border: 1px solid #8b5cf630;
}

.faq-sales {
  background: #f59e0b15;
  color: #d97706;
  border: 1px solid #f59e0b30;
}

.faq-attendance {
  background: #10b98115;
  color: #10b981;
  border: 1px solid #10b98130;
}

.faq-leave {
  background: #ef444415;
  color: #ef4444;
  border: 1px solid #ef444430;
}

.faq-system {
  background: #64748b15;
  color: #64748b;
  border: 1px solid #64748b30;
}

/* Inline toggle — reused from notification page */
.ntf-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.ntf-toggle-wrap input {
  display: none;
}

.ntf-toggle-track {
  width: 38px;
  height: 20px;
  border-radius: 99px;
  background: var(--border);
  position: relative;
  transition: background 0.22s;
  flex-shrink: 0;
}

.ntf-toggle-wrap input:checked ~ .ntf-toggle-track {
  background: var(--primary, #127ec2);
}

.ntf-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s;
}

.ntf-toggle-wrap input:checked ~ .ntf-toggle-track .ntf-toggle-thumb {
  transform: translateX(18px);
}

.ntf-status-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 44px;
}

@media (max-width: 900px) {
  .faq-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .faq-stats-row {
    grid-template-columns: 1fr;
  }
}

/* ------ master-modal-script.php ------ */
/* ── Enquiry Color Picker ── */
.enq-color-picker-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.enq-preset-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.enq-preset-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition:
    transform 0.15s,
    border-color 0.15s;
  flex-shrink: 0;
}

.enq-preset-swatch:hover {
  transform: scale(1.18);
}

.enq-preset-swatch.active {
  border-color: var(--text) !important;
  transform: scale(1.15);
}

.enq-custom-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.enq-color-input {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  padding: 2px;
  cursor: pointer;
  background: none;
}

.enq-color-preview {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.enq-color-hex {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: monospace;
}

/* ── Color dot in table ── */
.enq-color-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.08);
  vertical-align: middle;
}

/* ------ notification.php ------ */
.ntf-msg-cell {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
  color: var(--text-muted);
}

.ntf-bp {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.ntf-system {
  background: #127ec215;
  color: #127ec2;
  border: 1px solid #127ec230;
}

.ntf-announcement {
  background: #8b5cf615;
  color: #8b5cf6;
  border: 1px solid #8b5cf630;
}

.ntf-reminder {
  background: #f59e0b15;
  color: #d97706;
  border: 1px solid #f59e0b30;
}

.ntf-alert {
  background: #ef444415;
  color: #ef4444;
  border: 1px solid #ef444430;
}

/* Thumbnail */
.ntf-thumb-wrap {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.ntf-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.ntf-thumb-icon {
  font-size: 15px;
}

/* Inline status toggle */
.ntf-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.ntf-toggle-wrap input {
  display: none;
}

.ntf-toggle-track {
  width: 38px;
  height: 20px;
  border-radius: 99px;
  background: var(--border);
  position: relative;
  transition: background 0.22s;
  flex-shrink: 0;
}

.ntf-toggle-wrap input:checked ~ .ntf-toggle-track {
  background: var(--primary, #127ec2);
}

.ntf-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s;
}

.ntf-toggle-wrap input:checked ~ .ntf-toggle-track .ntf-toggle-thumb {
  transform: translateX(18px);
}

.ntf-status-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 44px;
}

.ntf-toggle-wrap input:checked ~ .ntf-status-lbl,
.ntf-toggle-wrap input:checked + .ntf-toggle-track + .ntf-status-lbl {
  color: var(--primary, #127ec2);
}

/* Image upload area */
.ntf-img-upload-area {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ntf-img-upload-area:hover {
  border-color: var(--primary);
}

.ntf-img-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ------ projects.php ------ */
/* ── Project card ── */
.proj-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition:
    box-shadow 0.18s,
    transform 0.18s;
}

.proj-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.proj-card-header {
  padding: 16px 18px 14px;
  position: relative;
}

.proj-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  margin-bottom: 10px;
  font-weight: 700;
  font-family: "Sora", sans-serif;
}

.proj-card-name {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.proj-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.proj-card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
}

.proj-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
}

.proj-status-badge.active {
  background: #d1fae5;
  color: #059669;
}

.proj-status-badge.onhold {
  background: #fef3c7;
  color: #d97706;
}

.proj-status-badge.completed {
  background: #dbeafe;
  color: #2563eb;
}

.proj-card-dates {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.proj-card-actions {
  display: flex;
  gap: 6px;
}

.proj-act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.proj-act-btn:hover.edit {
  border-color: #127ec2;
  color: #127ec2;
  background: var(--primary-light);
}

.proj-act-btn:hover.del {
  border-color: #ef4444;
  color: #ef4444;
  background: #fee2e2;
}

/* ── Color picker ── */
.proj-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.proj-color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  flex-shrink: 0;
}

.proj-color-swatch:hover {
  transform: scale(1.2);
}

.proj-color-swatch.selected {
  border-color: #1e293b;
  transform: scale(1.2);
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3px #1e293b;
}

/* ── Form section (shared with tasks) ── */
.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: 700;
  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;
}

.prod-name-link:hover {
  color: var(--primary, #127ec2) !important;
  text-decoration: underline !important;
  cursor: pointer;
}

@media (max-width: 768px) {
  .inv-stats-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .inv-stat-card {
    padding: 12px !important;
  }
}
@media (max-width: 480px) {
  .inv-stats-row {
    grid-template-columns: 1fr 1fr !important;
  }
  .inv-stat-val {
    font-size: 20px !important;
  }
}

/* Products toolbar filters wrap on mobile */
@media (max-width: 768px) {
  .mp-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .mp-toolbar .mp-search,
  .mp-toolbar .csel-wrap {
    max-width: 100% !important;
  }
  .mp-toolbar .csel-wrap .csel {
    width: 100% !important;
  }
  .enq-toolbar-right {
    display: flex;
    justify-content: flex-end;
  }
}

/* Horizontal scroll for all tables on mobile */
@media (max-width: 900px) {
  .mp-tbl-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .mp-table {
    min-width: 700px !important;
  }
}

/* page-hdr: stack on mobile */
@media (max-width: 600px) {
  .page-hdr {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .page-hdr > div:last-child {
    width: 100%;
  }
  .page-hdr .btn-primary-sm {
    width: 100%;
    justify-content: center;
  }
}

/* Modals — full width on small screens */
@media (max-width: 600px) {
  .crm-modal {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 8px !important;
    max-height: 95vh !important;
  }
  .crm-mbody {
    max-height: calc(95vh - 130px) !important;
  }
  .fgrid {
    grid-template-columns: 1fr !important;
  }
  .fc-full {
    grid-column: span 1 !important;
  }
}

/* Product name cell on small screens */
@media (max-width: 500px) {
  .prod-name-cell {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }
  .prod-thumb {
    width: 30px !important;
    height: 30px !important;
    font-size: 13px !important;
  }
}

/* Master pages (enqtype, enqsource, site-type, site-source, ticket-type) */
@media (max-width: 768px) {
  .mp-card {
    padding: 12px !important;
  }
  .mp-toolbar {
    gap: 8px !important;
  }
  .mp-search {
    width: 100% !important;
  }
  .mp-csel-wrap {
    width: 100% !important;
  }
  .mp-csel {
    width: 100% !important;
  }
  .mp-tbl-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .mp-table {
    min-width: 550px !important;
  }
}

/* UAM dropdown — ensure it doesn't overflow on mobile */
@media (max-width: 500px) {
  .uam-menu {
    right: 0 !important;
    left: auto !important;
    min-width: 160px !important;
  }
}

/* Enquiry / general table horizontal scroll */
@media (max-width: 900px) {
  .enq-tbl-wrap,
  .tbl-wrap,
  .usr-tbl-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .enq-table,
  .usr-table {
    min-width: 700px !important;
  }
}

/* Dashboard stats on mobile */
@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Designation, State, District, Category, Sub-category pages */
@media (max-width: 768px) {
  .desig-tbl-wrap,
  .state-tbl-wrap,
  .cat-tbl-wrap,
  .subcat-tbl-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* Color picker wrap on mobile */
@media (max-width: 500px) {
  .enq-color-picker-wrap {
    padding: 10px !important;
  }
  .enq-preset-colors {
    gap: 6px !important;
  }
  .enq-custom-color-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
}

/* product-details page responsive */
@media (max-width: 768px) {
  .prod-det-grid {
    grid-template-columns: 1fr !important;
  }
  .prod-det-gallery {
    max-height: 220px !important;
  }
}

.welcome-section {
  background: linear-gradient(135deg, #0f5fa3 0%, #127ec2 45%, #1aa3e8 100%);
  border-radius: 16px;
  padding: 26px 32px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  /* box-shadow: 0 8px 32px rgba(18, 126, 194, 0.28); */
  position: relative;
  overflow: hidden;
}
.welcome-section::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}
.welcome-section::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: 60px;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}
.welcome-text h1 {
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #fff;
  margin: 0;
}
.welcome-text p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 5px;
}

.dash-module-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  z-index: 1;
}
.dash-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 50px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  font-family: "Nunito Sans", sans-serif;
  backdrop-filter: blur(6px);
}
.dash-tab i {
  font-size: 12px;
}
.dash-tab:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  transform: translateY(-2px);
}
.dash-tab.active {
  background: #fff;
  border-color: #fff;
  color: #0f5fa3;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

/* ── KPI / Stat Cards — Premium gradient style ─────────────── */
.crm-stats .stat-card {
  border-left: none;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.22s,
    box-shadow 0.22s;
}
.crm-stats .stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

/* Enquiry module card accents */
.sc-enq1 {
  --card-accent: #127ec2;
  border-left: 3px solid #127ec2 !important;
}
.sc-enq2 {
  --card-accent: #f97316;
  border-left: 3px solid #f97316 !important;
}
.sc-enq3 {
  --card-accent: #10b981;
  border-left: 3px solid #10b981 !important;
}
.sc-enq3 {
  --card-accent: #3b82f6;
  border-left: 3px solid #3b82f6 !important;
}
.sc-enq5 {
  --card-accent: #10b981;
  border-left: 3px solid #10b981 !important;
}
.sc-enq4 {
  --card-accent: #8b5cf6;
  border-left: 3px solid #8b5cf6 !important;
}

.sc-enq1 .stat-icon {
  background: rgba(18, 126, 194, 0.12);
  color: #127ec2;
}
.sc-enq2 .stat-icon {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
}
.sc-enq3 .stat-icon {
  background: rgb(236 245 250);
  color: #3b82f6;
}
.sc-enq5 .stat-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.sc-enq4 .stat-icon {
  background: #e8e5fa;
  color: #8b5cf6;
}
.sc-enq5 .stat-icon {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.sc-enq6 .stat-icon {
  background: #fef2f2;
  color: #ef4444;
}
.sc-enq6 {
  border-left: 3px solid #ef4444 !important;
}
.sc-enq1::after {
  background: #127ec2;
}
.sc-enq2::after {
  background: #f97316;
}
.sc-enq3::after {
  background: #3b82f6;
}
.sc-enq4::after {
  background: #3b82f6;
}
.sc-enq5::after {
  background: #10b981;
}
.sc-enq4::after {
  background: #8b5cf6;
}
.sc-enq6::after {
  background: #ef4444;
}

.dash-charts-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr;
  gap: 15px;
  margin-bottom: 16px;
}
.dash-chart-card {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.dash-chart-card-title {
  font-family: "Sora", sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
.dash-chart-card-sub {
  font-size: 11.5px;
  color: var(--text-light);
  margin-bottom: 14px;
}
.dash-chart-canvas-wrap {
  position: relative;
  width: 100%;
}
.dash-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}
.dash-donut-canvas {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.dash-donut-canvas-report {
  width: 200px;
  height: 200px;
}
.dash-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.dash-donut-val {
  font-family: "Sora", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.dash-donut-lbl {
  font-size: 10px;
  color: var(--text-light);
  font-weight: 600;
}
.dash-legend-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  flex: 1;
  margin-top: 20px;
}
.dash-legend-list-report {
  justify-content: center;
  flex-wrap: wrap;
}
.dash-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}
.dash-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 7px;
  flex-shrink: 0;
}
.dash-legend-left {
  display: flex;
  align-items: center;
}
.dash-legend-val {
  font-weight: 600;
  color: var(--text);
  font-size: 12.5px;
  display: none;
}

.dash-progress-item {
  margin-bottom: 12px;
}
.dash-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 5px;
  font-weight: 600;
}
.dash-progress-bar-bg {
  height: 7px;
  background: var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.dash-progress-bar-fill {
  height: 100%;
  border-radius: 20px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-grid {
  grid-template-columns: 1.6fr 380px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-family: "Sora", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.card-sub {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.donut-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.dval {
  font-family: "Sora", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.dlbl {
  font-size: 10.5px;
  color: var(--text-light);
  font-weight: 600;
}

/* ── Responsive dashboard charts row ────────────────────────── */
@media (max-width: 1200px) {
  .dash-charts-row {
    grid-template-columns: 1fr 1fr;
  }
  .dash-charts-row .dash-chart-card:last-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 768px) {
  .dash-charts-row {
    grid-template-columns: 1fr;
  }
  .welcome-section {
    padding: 18px 20px;
  }
  .welcome-text h1 {
    font-size: 18px;
  }
  .dash-tab {
    padding: 7px 13px;
    font-size: 12px;
  }
}

.enq-top-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr) 340px;
  gap: 14px;
  margin-bottom: 20px;
}
.enq-stat-card {
  background: var(--card-bg);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.enq-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09);
}
.enq-stat-card .stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  margin-bottom: 10px;
}
.enq-stat-card .stat-count {
  font-size: 22px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  color: var(--text);
}
.enq-stat-card .stat-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
}
.enq-stat-card .stat-trend {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
}
.enq-chart-card {
  background: var(--card-bg);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 16px 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.enq-chart-title {
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.enq-chart-sub {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 12px;
}
.dash-chart-card.overflow-custom {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #9ca3af #f1f5f9;
}

.dash-chart-card.overflow-custom::-webkit-scrollbar {
  width: 2px;
  display: block;
}
@media (max-width: 1300px) {
  .enq-top-row {
    grid-template-columns: repeat(3, 1fr) 1fr;
  }
  .enq-top-row .enq-chart-card {
    grid-column: 1 / -1;
  }
}
@media (max-width: 768px) {
  .enq-top-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .enq-top-row .enq-chart-card {
    grid-column: 1 / -1;
  }
}

.enq-stat-card {
  position: relative;
}

.dash-chart-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.dash-donut-canvas canvas,
.enq-chart-card canvas {
  width: 100% !important;
  height: 100% !important;
}

.dash-progress-bar-fill {
  animation: growBar 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes growBar {
  from {
    width: 0 !important;
  }
}

.welcome-text h1 {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: -0.3px;
}

.stat-count {
  transition: color 0.3s;
}

.dash-chart-card {
  transition:
    box-shadow 0.22s,
    transform 0.22s;
}
.dash-chart-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}

.enq-chart-card {
  transition:
    box-shadow 0.22s,
    transform 0.22s;
}
.enq-chart-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}

@media (max-width: 1400px) {
  .enq-top-row[style*="repeat(5"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .enq-top-row[style*="repeat(5"] .enq-chart-card {
    grid-column: 1 / -1;
  }
}
@media (max-width: 1100px) {
  .enq-top-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .enq-top-row .enq-chart-card {
    grid-column: 1 / -1;
  }
  .dash-charts-row {
    grid-template-columns: 1fr 1fr !important;
  }
  .dash-charts-row .dash-chart-card:last-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 768px) {
  .enq-top-row {
    grid-template-columns: 1fr 1fr !important;
  }
  .dash-charts-row {
    grid-template-columns: 1fr !important;
  }
  .welcome-section {
    flex-direction: column;
    align-items: flex-start;
  }
  .dash-module-tabs {
    width: 100%;
  }
}

/* ── Better card shadows on hover ──────────────────────────── */
.stat-card {
  transition:
    transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Modern scrollbar for wrapped tab rows ──────────────────── */
.dash-module-tabs::-webkit-scrollbar {
  height: 0;
}

/* ── Analytics Row: Enquiry Analytics + Source-wise Leads side by side ── */
.dash-analytics-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 0;
}

.dash-analytics-row .card.chart-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
}

.dash-analytics-row .card.chart-card .card-header {
  grid-column: 1 / -1;
}

.dash-analytics-row .card.chart-card .csec {
  border-bottom: none;
  border-right: 1px solid var(--border);
}

.dash-analytics-row .card.chart-card .csec:last-child {
  border-right: none;
}

@media (max-width: 768px) {
  .dash-analytics-row .card.chart-card {
    grid-template-columns: 1fr;
  }
  .dash-analytics-row .card.chart-card .csec {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .dash-analytics-row .card.chart-card .csec:last-child {
    border-bottom: none;
  }
}

/* ══════════════════════════════════════════════════════════
   TABLE-CONTROLS: 75% search + 25% filter
══════════════════════════════════════════════════════════ */
.table-controls .srch {
  flex: 0 0 75% !important;
  max-width: 75%;
  min-width: 0;
}
.table-controls .fsel {
  flex: 0 0 calc(25% - 12px) !important;
  max-width: calc(25% - 12px);
  min-width: 0;
  width: 100%;
}

/* ══════════════════════════════════════════════════════════
   SALES panel stat-card accent colours (sc-enq design)
══════════════════════════════════════════════════════════ */
.sc-sales1 {
  --card-accent: #127ec2;
}
.sc-sales2 {
  --card-accent: #10b981;
}
.sc-sales3 {
  --card-accent: #f59e0b;
}
.sc-sales4 {
  --card-accent: #8b5cf6;
}
.sc-sales1 .stat-icon {
  background: rgba(18, 126, 194, 0.12);
  color: #127ec2;
}
.sc-sales2 .stat-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.sc-sales3 .stat-icon {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}
.sc-sales4 .stat-icon {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}
.sc-sales1::after {
  background: #127ec2;
}
.sc-sales2::after {
  background: #10b981;
}
.sc-sales3::after {
  background: #f59e0b;
}
.sc-sales4::after {
  background: #8b5cf6;
}

/* ══════════════════════════════════════════════════════════
   PAYMENTS panel stat-card accent colours
══════════════════════════════════════════════════════════ */
.sc-pay1 {
  --card-accent: #10b981;
}
.sc-pay2 {
  --card-accent: #f59e0b;
}
.sc-pay3 {
  --card-accent: #127ec2;
}
.sc-pay4 {
  --card-accent: #ef4444;
}
.sc-pay1 .stat-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.sc-pay2 .stat-icon {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}
.sc-pay3 .stat-icon {
  background: rgba(18, 126, 194, 0.12);
  color: #127ec2;
}
.sc-pay4 .stat-icon {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}
.sc-pay1::after {
  background: #10b981;
}
.sc-pay2::after {
  background: #f59e0b;
}
.sc-pay3::after {
  background: #127ec2;
}
.sc-pay4::after {
  background: #ef4444;
}

/* ══════════════════════════════════════════════════════════
   MEETINGS panel stat-card accent colours
══════════════════════════════════════════════════════════ */
.sc-meet1 {
  --card-accent: #127ec2;
}
.sc-meet2 {
  --card-accent: #10b981;
}
.sc-meet3 {
  --card-accent: #ef4444;
}
.sc-meet4 {
  --card-accent: #f59e0b;
}
.sc-meet1 .stat-icon {
  background: rgba(18, 126, 194, 0.12);
  color: #127ec2;
}
.sc-meet2 .stat-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.sc-meet3 .stat-icon {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}
.sc-meet4 .stat-icon {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}
.sc-meet1::after {
  background: #127ec2;
}
.sc-meet2::after {
  background: #10b981;
}
.sc-meet3::after {
  background: #ef4444;
}
.sc-meet4::after {
  background: #f59e0b;
}

/* ══════════════════════════════════════════════════════════
   ATTENDANCE panel stat-card accent colours
══════════════════════════════════════════════════════════ */
.sc-att1 {
  --card-accent: #127ec2;
}
.sc-att2 {
  --card-accent: #10b981;
}
.sc-att3 {
  --card-accent: #ef4444;
}
.sc-att4 {
  --card-accent: #f59e0b;
}
.sc-att5 {
  --card-accent: #8b5cf6;
}
.sc-att6 {
  --card-accent: #f97316;
}
.sc-att1 .stat-icon {
  background: rgba(18, 126, 194, 0.12);
  color: #127ec2;
}
.sc-att2 .stat-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.sc-att3 .stat-icon {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}
.sc-att4 .stat-icon {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}
.sc-att5 .stat-icon {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}
.sc-att6 .stat-icon {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
}
.sc-att1::after {
  background: #127ec2;
}
.sc-att2::after {
  background: #10b981;
}
.sc-att3::after {
  background: #ef4444;
}
.sc-att4::after {
  background: #f59e0b;
}
.sc-att5::after {
  background: #8b5cf6;
}
.sc-att6::after {
  background: #f97316;
}

/* All new panel cards use same border-left design as sc-enq */
.crm-stats .stat-card[class*="sc-sales"],
.crm-stats .stat-card[class*="sc-pay"],
.crm-stats .stat-card[class*="sc-meet"],
.crm-stats .stat-card[class*="sc-att"] {
  border-left: 3px solid var(--card-accent, var(--primary));
}

/* Remove dash-analytics-row stale rules (safe to nullify) */
.dash-analytics-row {
  display: none !important;
}
/* ── Month picker: native visible input ── */
.mtg-month-inp {
  min-width: 150px;
  cursor: pointer;
  font-family: inherit;
}

.mtg-month-inp::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
}

/* ── Date input ── */
.mtg-finp {
  padding: 0 10px;
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.18s;
}

.mtg-finp:focus {
  border-color: var(--primary);
}

/* ── Table ── */
.mtg-table th,
.mtg-table td {
  white-space: nowrap;
}

.mtg-table td {
  vertical-align: middle;
}

/* ── Check buttons ── */
.mtg-check-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.mtg-check-btn.checkin {
  background: #e0f2fe;
  color: #0369a1;
}

.mtg-check-btn.checkout {
  background: #dcfce7;
  color: #166534;
}

.mtg-check-btn:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

/* ── RSM chips ── */
.mtg-rsm {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.mtg-rsm-approved {
  background: #d1fae5;
  color: #065f46;
}

.mtg-rsm-pending {
  background: #fff7ed;
  color: #c2410c;
}

.mtg-rsm-rejected {
  background: #fee2e2;
  color: #991b1b;
}

/* ── Misc ── */
.mtg-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.mtg-act-btn:hover {
  border-color: #8b5cf6;
  color: #8b5cf6;
  background: #f5f3ff;
}

.mtg-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--primary-light);
  transition: opacity 0.15s;
  cursor: pointer;
  border: none;
}

.mtg-doc-link:hover {
  opacity: 0.75;
}

.mtg-no-doc {
  font-size: 11.5px;
  color: var(--text-light);
}
.up-msg-success {
  margin-bottom: 10px;
}
.mtg-time-chip {
  display: inline-block;
  background: #f0fdf4;
  color: #166534;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 700;
}

.mtg-sno {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════
     MONTH WISE STYLES
  ══════════════════════════════════════════ */
.mw-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 16px 0;
}

.mw-stat-card {
  flex: 1;
  min-width: 140px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mw-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.mw-si-blue {
  background: #e0f2fe;
  color: #0369a1;
}

.mw-si-green {
  background: #d1fae5;
  color: #065f46;
}

.mw-si-purple {
  background: #ede9fe;
  color: #5b21b6;
}

.mw-si-amber {
  background: #fef3c7;
  color: #92400e;
}

.mw-stat-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.mw-stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* progress bar in total column */
.mw-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.mw-bar-bg {
  width: 60px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.mw-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s;
}

/* count chips */
.mw-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 0 8px;
}

.mw-chip-blue {
  background: #e0f2fe;
  color: #0369a1;
}

.mw-chip-green {
  background: #d1fae5;
  color: #065f46;
}

.mw-chip-purple {
  background: #ede9fe;
  color: #5b21b6;
}

.mw-chip-zero {
  background: var(--bg);
  color: var(--text-muted);
}

/* day name badge */
.mw-day-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
}

.mw-day-sun {
  background: #fee2e2;
  color: #991b1b;
}

.mw-day-sat {
  background: #fef3c7;
  color: #92400e;
}

.mw-day-wkd {
  background: var(--bg);
  color: var(--text-muted);
}

/* view button */
.mw-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.mw-view-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.mw-view-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* ── Modals ── */
.mtg-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  z-index: 500;
}

.mtg-overlay.active {
  display: block;
}

.mtg-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  width: min(520px, 94vw);
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 501;
  flex-direction: column;
  overflow: hidden;
  animation: mtgMIn 0.22s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

.mtg-modal.active {
  display: flex;
}

.mtg-modal-sm {
  width: min(400px, 94vw);
}

@keyframes mtgMIn {
  from {
    opacity: 0;
    transform: translate(-50%, -58%) scale(0.93);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -52%) scale(1);
  }
}

.mtg-modal-hdr {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.mtg-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #127ec2, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
}

.mtg-modal-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.mtg-modal-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.mtg-modal-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.mtg-modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.mtg-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  max-height: 60vh;
}

.mtg-dg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.mtg-di-full {
  grid-column: 1/-1;
}

.mtg-dl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.mtg-dv {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 12px;
}

.mtg-check-photo {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--border);
}

.mtg-bat {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mtg-bat-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.mtg-bat-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s;
}

/* upload */
.mtg-sample-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 7px;
  padding: 6px 12px;
  text-decoration: none;
  margin-top: 10px;
  transition: opacity 0.15s;
}

.mtg-sample-link:hover {
  opacity: 0.75;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
  background: var(--card-bg);
  margin-top: 8px;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
/* ══ Meeting Reports page styles ══ */
.mr-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.mr-filter-item {
  flex: 1;
  min-width: 150px;
}

.mr-filter-item label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}



.timer-div {
  z-index: 1000;
  padding: 5px;
  background-color: rgb(233, 233, 233);
  width: 250px;
  height: 300px;
  display: none;
  justify-items: center;
  align-items: center;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  border-radius: 10px;
}
.timer-div * {
  user-select: none;
}
.timer-div.fisttime {
  display: grid;
}
.timer-div.active {
  display: grid;
}

.timer-div .timer-numberbtn {
  border-radius: 50%;
  display: grid;
  align-content: center;
  border: none;
  width: 30px;
  height: 30px;
  color: black;

  background-color: white;
  box-shadow:
    0px 0px 0px #00000000,
    inset 1px 1px 5px rgba(0, 0, 0, 0.212);
  cursor: pointer;
  position: absolute;
  text-align: center;
}
.timer-div .timer-ampmbtn {
  border-radius: 0px;
  display: grid;
  align-content: center;
  border: none;
  width: 50%;
  height: 100%;
  color: black;

  background-color: white;

  cursor: pointer;
  position: absolute;
  text-align: center;
}
.timer-div .timer-ampmbtn:active {
  background-color: var(--theme-color);
  color: white;
}
.timer-div .timer-ampmbtn:focus {
  background-color: var(--theme-color);
  color: white;
}
#timer-div .timer-numberbtn:hover {
  background-color: var(--theme-color);
  color: white;
}
#timer-div .timer-numberbtn:focus {
  background-color: var(--theme-color);
  color: white;
}
#timer-div #timer-hourclock {
  box-shadow:
    1px 1px 5px #00000063,
    inset 1px 1px 5px rgba(0, 0, 0, 0.212);
  position: relative;
  border: 5px solid #ffffff;

  display: grid;
  justify-content: center;
  width: 200px;
  height: 200px;
  border-radius: 100%;
}
#timer-div #timer-minclock {
  position: relative;
  border: 5px solid #ffffff;
  box-shadow:
    1px 1px 5px #00000063,
    inset 1px 1px 5px rgba(0, 0, 0, 0.212);
  display: none;
  justify-content: center;
  width: 200px;
  height: 200px;
  border-radius: 100%;
}
#timer-ampmclock {
  display: none;
  position: relative;
  border: 5px solid #ffffff;
  box-shadow:
    1px 1px 5px #00000063,
    inset 1px 1px 5px rgba(0, 0, 0, 0.212);
  display: none;
  justify-content: center;
  width: 200px;
  height: 200px;
  border-radius: 100%;
  overflow: hidden;
}

.timer-input-div {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr 1fr;
  justify-items: center;
}
.timer-input-div input {
  width: 100%;
  padding: 5px;
  text-align: center;

  border-radius: 5px;
  border: none;
  width: 90%;
  cursor: pointer;
  background-color: white;
}
.timer-input-div select {
  cursor: pointer;
  width: 100%;
  padding: 5px;
  text-align: center;

  border-radius: 5px;
  border: none;
  width: 90%;
  margin: 0px;
  background-color: white;
}
.timer-footer-div {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-items: center;
}
.timer-footer-div a {
  padding: 4px;
  border: none;
  border-radius: 5px;
  width: 90%;
  cursor: pointer;
  text-align: center;
  background-color: white;
}

.timer-footer-div #setclocktimebtn:hover {
  background-color: var(--theme-color);
  color: white;
}
.timer-footer-div #clearclocktimebtn:hover {
  background-color: var(--theme-color);
  color: white;
}



/* KPI overrides for meeting colours */
.mr-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 1100px) {
  .mr-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .mr-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.mr-kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}

.mr-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.mr-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 4px;
}

.mr-kpi-val {
  font-size: 26px;
  font-weight: 700;
  font-family: "Sora", sans-serif;
  line-height: 1;
}

.mr-kpi-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.mr-kpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  margin-top: 2px;
  width: fit-content;
}

.mr-kpi-card::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  opacity: 0.08;
}

/* chart cards */
.mr-charts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
  align-items: stretch;
}

.mr-chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  flex: 1;
  min-width: 260px;
  transition: box-shadow 0.2s;
}

.mr-chart-card:hover {
  box-shadow: 0 4px 18px rgba(18, 126, 194, 0.12);
}

.mr-chart-card.wide {
  flex: 2;
  min-width: 300px;
}

.mr-chart-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.mr-chart-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* funnel */
.mr-funnel-wrap {
  padding: 4px 0;
}

.mr-funnel-row {
  margin-bottom: 13px;
}

.mr-funnel-lbl {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 12px;
}

.mr-funnel-outer {
  background: var(--border);
  border-radius: 6px;
  height: 22px;
  overflow: hidden;
}

.mr-funnel-inner {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 7px;
  transition: width 0.6s ease;
}

.mr-funnel-drop {
  text-align: center;
  font-size: 10px;
  color: var(--text-light);
  margin-top: 2px;
}

/* donut legend */
.mr-donut-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mr-donut-canvas-wrap {
  position: relative;
  height: 180px;
  margin-bottom: 14px;
}

.mr-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.mr-donut-val {
  font-size: 26px;
  font-weight: 700;
  font-family: "Sora", sans-serif;
  color: var(--text);
}

.mr-donut-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.mr-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.mr-legend-item:last-child {
  border: none;
}

.mr-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mr-legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-weight: 600;
}

.mr-legend-val {
  font-weight: 700;
  color: var(--text);
}

/* multi-select */
.er-ms-wrap {
  position: relative;
  width: 100%;
}

.er-ms-trigger {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 38px;
  padding: 5px 32px 5px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  cursor: pointer;
  transition: border-color 0.2s;
  position: relative;
  user-select: none;
}

.er-ms-trigger:hover,
.er-ms-trigger.open {
  border-color: var(--primary);
}

.er-ms-placeholder {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.er-ms-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.er-ms-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--primary);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.er-ms-tag i {
  cursor: pointer;
  font-size: 9px;
  opacity: 0.7;
  flex-shrink: 0;
}

.er-ms-tag i:hover {
  opacity: 1;
}

.er-ms-count {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.er-ms-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--text-muted);
  pointer-events: none;
  transition: transform 0.2s;
}

.er-ms-arrow.open {
  transform: translateY(-50%) rotate(180deg);
}

.er-ms-dropdown {
  position: fixed;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  z-index: 99999;
  overflow: hidden;
  display: none;
  min-width: 200px;
}

.er-ms-dropdown.open {
  display: block;
}

.er-ms-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.er-ms-search-row input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
}

.er-ms-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 5px;
}

.er-ms-select-all {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  user-select: none;
}

.er-ms-select-all:hover {
  background: var(--primary-light);
}

.er-ms-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background 0.12s;
  user-select: none;
}

.er-ms-item:hover {
  background: var(--primary-light);
}

.er-ms-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
}

.er-ms-item.selected span {
  color: var(--primary);
  font-weight: 600;
}

/* table */
.mr-tbl-wrap {
  overflow-x: auto;
}

.mr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mr-table thead th {
  background: linear-gradient(135deg, #f0f7ff, #e4f0fb);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.mr-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.mr-table tbody tr:hover td {
  background: #f8fbff;
}

.mr-table tbody tr:last-child td {
  border: none;
}

/* rsm badge */
.mr-rsm {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.mr-rsm-approved {
  background: #d1fae5;
  color: #065f46;
}

.mr-rsm-pending {
  background: #fef3c7;
  color: #92400e;
}

.mr-rsm-rejected {
  background: #fee2e2;
  color: #991b1b;
}

/* search box */
.mr-search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  height: 36px;
}

.mr-search-box i {
  color: var(--text-light);
  font-size: 12px;
  flex-shrink: 0;
}

.mr-search-box input {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  outline: none;
  width: 200px;
}
.rpt-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.rpt-filter-item {
  flex: 1;
  min-width: 150px;
}

.rpt-filter-item label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  gap: 4px;
}

.rpt-charts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}

.rpt-charts-row .dash-chart-card {
  flex: 1;
  min-width: 260px;
}

.rpt-charts-row .dash-chart-card.wide {
  flex: 2;
  min-width: 300px;
}

.rpt-table-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.rpt-table-header-left {
  flex: 1;
  min-width: 160px;
}

.rpt-table-header-right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.rpt-search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  height: 36px;
}

.rpt-search-box i {
  color: var(--text-light);
  font-size: 12px;
  flex-shrink: 0;
}

.rpt-search-box input {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  outline: none;
  width: 190px;
}

/* Multi-select */
.er-ms-wrap {
  position: relative;
  width: 100%;
}

.er-ms-trigger {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 38px;
  padding: 5px 32px 5px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  cursor: pointer;
  transition: border-color 0.2s;
  position: relative;
  user-select: none;
}

.er-ms-trigger:hover,
.er-ms-trigger.open {
  border-color: var(--primary);
}

.er-ms-placeholder {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.er-ms-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.er-ms-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--primary);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.er-ms-tag i {
  cursor: pointer;
  font-size: 9px;
  opacity: 0.7;
  flex-shrink: 0;
}

.er-ms-tag i:hover {
  opacity: 1;
}

.er-ms-count {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.er-ms-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--text-muted);
  pointer-events: none;
  transition: transform 0.2s;
}

.er-ms-arrow.open {
  transform: translateY(-50%) rotate(180deg);
}

.er-ms-dropdown {
  position: fixed;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  z-index: 99999;
  overflow: hidden;
  display: none;
  min-width: 200px;
}

.er-ms-dropdown.open {
  display: block;
}

.er-ms-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.er-ms-search-row input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
}

.er-ms-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 5px;
}

.er-ms-select-all {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  user-select: none;
}

.er-ms-select-all:hover {
  background: var(--primary-light);
}

.er-ms-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background 0.12s;
  user-select: none;
}

.er-ms-item:hover {
  background: var(--primary-light);
}

.er-ms-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
}

.er-ms-item.selected span {
  color: var(--primary);
  font-weight: 600;
}

/* Funnel */
.er-funnel-bar-wrap {
  margin-bottom: 11px;
}

.er-funnel-label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 12px;
}

.er-funnel-bar-outer {
  background: var(--border);
  border-radius: 6px;
  height: 20px;
  overflow: hidden;
}

.er-funnel-bar-inner {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  transition: width 0.6s ease;
}

.er-funnel-drop {
  text-align: center;
  font-size: 10px;
  color: var(--text-light);
  margin-top: 2px;
}

@media (max-width: 992px) {
  .rpt-charts-row .dash-chart-card.wide {
    flex: 1 1 100%;
  }

  .rpt-charts-row .dash-chart-card {
    min-width: 240px;
  }
}

@media (max-width: 768px) {
  .rpt-charts-row .dash-chart-card,
  .rpt-charts-row .dash-chart-card.wide {
    flex: 1 1 100%;
    min-width: 0;
  }

  .rpt-table-header {
    flex-direction: column;
    align-items: stretch;
  }

  .rpt-table-header-right {
    flex-direction: column;
  }

  .rpt-search-box input {
    width: 100%;
  }

  .rpt-search-box {
    width: 100%;
  }

  .stats-grid.crm-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-hdr {
    flex-direction: row;
    gap: 10px;
    align-items: flex-start;
  }

  .phdr-btn-group {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .stats-grid.crm-stats {
    grid-template-columns: 1fr 1fr;
  }

  .rpt-filter-item {
    min-width: 100%;
  }
}

/* Reset button spin animation */
@keyframes er-spin-once {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.er-reset-spin i {
  display: inline-block;
  animation: er-spin-once 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
/* reset spin */
@keyframes mr-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.mr-reset-spin i {
  display: inline-block;
  animation: mr-spin 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@media (max-width: 768px) {
  .mr-charts-row .mr-chart-card,
  .mr-charts-row .mr-chart-card.wide {
    flex: 1 1 100%;
    min-width: 0;
  }

  .mr-search-box input {
    width: 100%;
  }

  .mr-search-box {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .mr-filter-item {
    min-width: 100%;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes mtgToastIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   FOLLOW-UP PAGE STYLES
═══════════════════════════════════════════════════════════ */

/* ── Page Loader ── */

/* ══════════════════════════════════════════════════════
   SKELETON / SHIMMER PAGE LOADER  (replaces fu-page-loader)
   ══════════════════════════════════════════════════════ */

/* shimmer keyframe */
@keyframes skShimmer {
  0% {
    background-position: -600px 0;
  }
  100% {
    background-position: 600px 0;
  }
}

/* base bone */
.sk-bone {
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--border, #e5e7eb) 25%,
    color-mix(in srgb, var(--border, #e5e7eb) 50%, var(--card-bg, #fff)) 50%,
    var(--border, #e5e7eb) 75%
  );
  background-size: 600px 100%;
  animation: skShimmer 1.4s ease-in-out infinite;
}

/* ── wrapper ─────────────────────────────────────────── */
.fu-page-loader {
  display: block;
  width: 100%;
}

/* ── skeleton card shell ─────────────────────────────── */
.sk-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 18px;
}

/* ── stat row (dashboard / designation / users) ──────── */
.sk-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.sk-stat-row.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.sk-stat-row.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.sk-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sk-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}
.sk-stat-num {
  width: 60%;
  height: 22px;
  border-radius: 5px;
  margin-top: 4px;
}
.sk-stat-label {
  width: 80%;
  height: 13px;
  border-radius: 4px;
}

/* ── toolbar (search bar + buttons) ─────────────────── */
.sk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.sk-toolbar-search {
  flex: 1;
  height: 34px;
  border-radius: 8px;
  max-width: 260px;
}
.sk-toolbar-btn {
  width: 90px;
  height: 34px;
  border-radius: 8px;
}
.sk-toolbar-btn.sm {
  width: 34px;
}

/* ── tab bar ─────────────────────────────────────────── */
.sk-tabbar {
  display: flex;
  gap: 6px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.sk-tab {
  height: 30px;
  border-radius: 7px;
}
.sk-tab:nth-child(1) {
  width: 90px;
}
.sk-tab:nth-child(2) {
  width: 80px;
}
.sk-tab:nth-child(3) {
  width: 100px;
}

/* ── table rows ──────────────────────────────────────── */
.sk-table {
  padding: 0 18px 18px;
}
.sk-table-head {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.sk-th {
  height: 12px;
  border-radius: 4px;
  flex: 1;
}
.sk-th.w20 {
  flex: 2;
}
.sk-th.w10 {
  flex: 0 0 60px;
}

.sk-tr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}
.sk-td {
  height: 13px;
  border-radius: 4px;
  flex: 1;
}
.sk-td.w20 {
  flex: 2;
}
.sk-td.w10 {
  flex: 0 0 60px;
}
.sk-td.badge {
  height: 22px;
  border-radius: 20px;
  flex: 0 0 72px;
}
.sk-td.avatar {
  height: 32px;
  width: 32px;
  flex: none;
  border-radius: 50%;
}

/* ── form fields (add/edit user, profile) ────────────── */
.sk-form-section {
  padding: 20px 24px;
}
.sk-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.sk-form-row.cols-1 {
  grid-template-columns: 1fr;
}
.sk-form-row.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.sk-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sk-label {
  height: 11px;
  width: 40%;
  border-radius: 4px;
}
.sk-input {
  height: 36px;
  border-radius: 8px;
  width: 100%;
}

/* ── hero card (user-details) ────────────────────────── */
.sk-hero {
  background: linear-gradient(
    135deg,
    var(--primary, #127ec2) 0%,
    var(--primary-dark, #0e65a0) 100%
  );
  border-radius: 14px;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
  opacity: 0.18;
}
.sk-hero-av {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  flex: none;
}
.sk-hero-line {
  height: 14px;
  border-radius: 5px;
  background: #fff;
}
.sk-hero-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── dashboard welcome bar ───────────────────────────── */
.sk-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}
.sk-welcome-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.sk-welcome-title {
  height: 24px;
  width: 220px;
  border-radius: 6px;
}
.sk-welcome-sub {
  height: 14px;
  width: 160px;
  border-radius: 4px;
}
.sk-welcome-right {
  display: flex;
  gap: 8px;
}
.sk-welcome-btn {
  height: 34px;
  width: 100px;
  border-radius: 8px;
}

/* ── chart placeholder ───────────────────────────────── */
.sk-chart-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.sk-chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.sk-chart-hdr {
  height: 48px;
  border-bottom: 1px solid var(--border);
}
.sk-chart-body {
  height: 180px;
}

/* ── enquiry detail layout ───────────────────────────── */
.sk-detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
}
.sk-detail-section {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sk-detail-label {
  height: 11px;
  width: 35%;
  border-radius: 4px;
}
.sk-detail-value {
  height: 15px;
  width: 75%;
  border-radius: 4px;
}
.sk-detail-value.full {
  width: 100%;
}

@media (max-width: 900px) {
  .sk-stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .sk-chart-row {
    grid-template-columns: 1fr;
  }
  .sk-detail-grid {
    grid-template-columns: 1fr;
  }
  .sk-form-row {
    grid-template-columns: 1fr;
  }
  .sk-form-row.cols-3 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .sk-stat-row {
    grid-template-columns: 1fr 1fr;
  }
  .sk-welcome-right {
    display: none;
  }
}

/* ── Inline Table Loader ── */
.fu-table-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 36px 20px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

/* ── Main Card Extension ── */

.fu-main-card {
  margin-top: 0;
}

/* ── Follow-up Table Specifics ── */
.fu-table th:nth-child(4),
.fu-table th:nth-child(5) {
  white-space: nowrap;
}

/* ── Date Badge ── */
.fu-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light, rgba(18, 126, 194, 0.08));
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.fu-date-badge i {
  font-size: 11px;
  opacity: 0.8;
}

/* ── Time Badge ── */
.fu-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.fu-time-badge i {
  font-size: 11px;
  opacity: 0.8;
}

/* ── Assigned To ── */
.fu-assigned {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.fu-assigned-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Remarks Cell ── */
.fu-remark-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  max-width: 240px;
  transition: color 0.15s;
}

.fu-remark-cell:hover {
  color: var(--primary);
}

.fu-remark-icon {
  font-size: 10px;
  opacity: 0.6;
  flex-shrink: 0;
}

/* ── Done Button ── */
.fu-done-btn {
  color: #10b981 !important;
  border-color: #10b981 !important;
}
.fu-done-btn:hover {
  background: #f0fdf4 !important;
}

/* ── Empty State ── */
.fu-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 10px;
}

.fu-empty-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.fu-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.fu-empty-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Pagination ── */
.fu-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.fu-page-info {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.fu-page-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fu-page-nums {
  display: flex;
  gap: 4px;
}

.fu-page-btn {
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  transition: all 0.2s;
}

.fu-page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light, rgba(18, 126, 194, 0.08));
}

.fu-page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.fu-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.cal-custom input {
  background-color: var(--bg);
  padding: 7px 30px 7px 11px;
}
/* ── Responsive ── */
@media (max-width: 768px) {
  .fu-date-badge,
  .fu-time-badge {
    font-size: 11px;
    padding: 2px 7px;
  }
  .fu-remark-cell {
    max-width: 140px;
    font-size: 11.5px;
  }
  .fu-pagination {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Follow-up Modal Overlay ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: fuModalIn 0.22s ease;
}

@keyframes fuModalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ── Follow-up Form Controls ── */
.fu-main-card .form-control,
.modal-box .fu-input,
.modal-box input[type="date"],
.modal-box input[type="time"],
.modal-box textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  box-sizing: border-box;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.modal-box input[type="date"]:focus,
.modal-box input[type="time"]:focus,
.modal-box textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.08);
  background: var(--card-bg);
}

/* ── Follow-up Date Range Picker ── */
.fu-toolbar {
  flex-wrap: wrap;
}

.fu-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--primary);
  border-radius: 10px;
  padding: 5px 10px;
  animation: fuRangeIn 0.18s ease;
}

@keyframes fuRangeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fu-date-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fu-date-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.fu-date-input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  cursor: pointer;
  width: 118px;
}

.fu-date-sep {
  color: var(--text-light);
  font-size: 11px;
  padding: 0 2px;
}

.fu-date-clear {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  flex-shrink: 0;
}

.fu-date-clear:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: #fef2f2;
}
.text-custom {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
  max-height: 50px;
}
#dateRange {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  cursor: pointer;
  outline: 0;
  color: var(--text);
}

/* Multi Select */
.multi-select {
  position: relative;
}

.select-box {
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.dropdown-multi-select {
  position: absolute;
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-top: 5px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 10;
}


.option-multi-select {
  display: block;
  padding: 8px 10px;
  cursor: pointer;
}

.option:hover {
  background: #f1f5ff;
}

/* Date Range */
.date-range {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-range input {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

/* Button */
.apply-btn {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.apply-btn:hover {
  background: var(--primary-dark);
}
.working-state {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.working-state label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.flatpickr-current-month
  .flatpickr-monthDropdown-months
  .flatpickr-monthDropdown-month {
  background-color: transparent;
  outline: none;
  padding: 0;
  font-size: 14px;
}
@media print {
  .no-print {
    display: none;
  }

  .printSection,
  .printSection * {
    display: block;
  }

  .card,
  .chart-container,
  .section,
  .box {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .page-break {
    page-break-before: always;
    break-before: page;
    margin-top: 20px;
  }
}
@media (max-width: 768px) {
  .fu-date-range {
    width: 100%;
    flex-wrap: wrap;
  }
  .fu-date-input {
    width: 100px;
  }
}

/* ── Sidebar & Layout ── */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    position: fixed !important;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0 !important;
  }
  .main-content {
    padding: 16px 12px !important;
  }
}

/* ── Topbar ── */
@media (max-width: 768px) {
  .topbar {
    padding: 0 12px !important;
  }
  .topbar-center {
    display: none !important;
  }
  .topbar-right .profile-info {
    display: none !important;
  }
  .topbar-right {
    gap: 6px !important;
  }
}

/* ── Page Header ── */
@media (max-width: 640px) {
  .page-hdr {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .page-hdr .btn-primary-sm {
    width: 100% !important;
    justify-content: center !important;
  }
  h2.page-title-main {
    font-size: 18px !important;
  }
  .breadcrumb-row {
    font-size: 11px !important;
  }
}

/* ── Data Tables (horizontal scroll on all devices) ── */
@media (max-width: 991px) {
  .mp-tbl-wrap,
  .enq-tbl-wrap,
  .tbl-wrap,
  .usr-tbl-wrap,
  .data-table-wrap,
  .rpt-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .mp-table {
    min-width: 650px !important;
  }
  .data-table {
    min-width: 700px !important;
  }
  .enq-table,
  .usr-table {
    min-width: 800px !important;
  }
}

/* ── Master Pages toolbar ── */
@media (max-width: 768px) {
  .mp-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .mp-search {
    width: 100% !important;
  }
  .mp-csel-wrap {
    width: 100% !important;
  }
  .mp-csel {
    width: 100% !important;
  }
  .mp-toolbar-right {
    display: flex;
    justify-content: flex-end;
  }
}

/* ── Enquiry Reports page ── */
@media (max-width: 991px) {
  .rpt-filter-bar {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .rpt-filter-item {
    width: 100% !important;
    min-width: unset !important;
  }
  .rpt-charts-row {
    flex-direction: column !important;
  }
  .rpt-charts-row .dash-chart-card,
  .rpt-charts-row .dash-chart-card.wide {
    min-width: unset !important;
    width: 100% !important;
  }
}
@media (max-width: 768px) {
  .rpt-table-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
  }
  .rpt-table-header-right {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .rpt-search-box {
    width: 100% !important;
  }
  .rpt-search-box input {
    width: 100% !important;
  }
  #rptPaginationBar {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  #rptPaginationBtns {
    flex-wrap: wrap !important;
  }
}

/* ── Modals (all CRM overlays) ── */
@media (max-width: 640px) {
  .crm-overlay,
  .modal-backdrop {
    padding: 10px !important;
    align-items: flex-end !important;
  }
  .crm-modal,
  .modal {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    max-height: 92vh !important;
  }
  .crm-mbody,
  .modal-body {
    overflow-y: auto !important;
    max-height: calc(92vh - 140px) !important;
  }
  .fgrid {
    grid-template-columns: 1fr !important;
  }
  .fc-full {
    grid-column: span 1 !important;
  }
}

/* ── Dashboard stats & cards ── */
@media (max-width: 991px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .bottom-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .welcome-section {
    padding: 18px 16px !important;
    flex-direction: column !important;
    gap: 14px !important;
  }
  .welcome-actions {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .welcome-actions .btn-outline {
    flex: 1 1 auto !important;
  }
}
@media (max-width: 400px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ── Users & grid cards ── */
@media (max-width: 768px) {
  .users-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
  }
  .user-stat-strip {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 480px) {
  .users-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .user-stat-strip {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ── Profile page ── */
@media (max-width: 768px) {
  .profile-layout,
  .grid-custom {
    grid-template-columns: 1fr !important;
  }
  .form-row {
    grid-template-columns: 1fr !important;
  }
  .perm-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Enquiry form & details ── */
@media (max-width: 768px) {
  .enq-form-grid,
  .enq-det-grid {
    grid-template-columns: 1fr !important;
  }
  .enq-det-sidebar {
    width: 100% !important;
    margin-top: 16px;
  }
  .enq-timeline-wrap {
    padding: 12px !important;
  }
}

/* ── Designation page ── */
@media (max-width: 768px) {
  .desig-form-row {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .desig-form-row input,
  .desig-form-row select,
  .desig-form-row button {
    width: 100% !important;
  }
}

/* ── Follow-up page ── */
@media (max-width: 768px) {
  .fu-filter-row {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .fu-filter-row > * {
    width: 100% !important;
  }
  .fu-date-range {
    width: 100% !important;
    flex-wrap: wrap !important;
  }
  .fu-date-input {
    flex: 1 !important;
    min-width: 100px !important;
  }
}

/* ── Chart cards ── */
@media (max-width: 768px) {
  .dash-chart-card {
    min-width: unset !important;
    width: 100% !important;
  }
  .dash-chart-title {
    font-size: 13px !important;
  }
}

/* ── Add/Edit User form ── */
@media (max-width: 768px) {
  .add-user-grid,
  .edit-user-grid {
    grid-template-columns: 1fr !important;
  }
  .user-avatar-upload {
    margin: 0 auto 16px !important;
  }
}

/* ── General utility ── */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
  .btn-primary-sm,
  .btn-ghost-sm {
    font-size: 12px !important;
    padding: 7px 14px !important;
  }
  .badge-pill {
    font-size: 10px !important;
    padding: 3px 8px !important;
  }
  /* Ensure all action button groups wrap on small screens */
  .mp-acts,
  .enq-acts,
  .tbl-acts {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  /* Table cells don't overflow */
  .mp-table td,
  .data-table td,
  .enq-table td {
    white-space: nowrap;
  }
}
@media (max-width: 480px) {
  .main-content {
    padding: 12px 8px !important;
  }
  h2.page-title-main {
    font-size: 16px !important;
  }
  .mp-card {
    border-radius: 10px !important;
    padding: 10px !important;
  }
  .crm-mhdr,
  .modal-header {
    padding: 12px 14px !important;
  }
  .crm-mbody,
  .modal-body {
    padding: 12px 14px !important;
  }
  .crm-mfoot,
  .modal-footer {
    padding: 10px 14px !important;
    gap: 8px !important;
  }
  .crm-mfoot button,
  .modal-footer button {
    flex: 1 !important;
    justify-content: center !important;
  }
}

/* ── Enquiry Reports — multi-select dropdowns on mobile ── */
@media (max-width: 640px) {
  .er-ms-dropdown {
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    min-width: unset !important;
    max-height: 50vh !important;
    overflow-y: auto !important;
  }
}

/* rajat 25-5-2026 */
.error-border {
    border: 1px solid red !important;
}

.ferr {
    color: red;
    font-size: 12px;
}

/* ── State master table — region badge alignment ── */
@media (max-width: 768px) {
  .mp-table td span[style*="border-radius:20px"] {
    white-space: nowrap;
  }
}

/* ── Prevent horizontal page scroll ── */
body {
  overflow-x: hidden;
}
.main-wrapper {
  overflow-x: hidden;
}
