:root {
  --primary: #334155;
  --primary-hover: #1e293b;
  --primary-light: #f1f5f9;
  --primary-dark: #1e293b;
  --secondary: #334155;
  --accent: #334155;
  --bg: #f5f7fb;
  --bg-main: #f5f7fb;
  --bg-card: #ffffff;
  --bg-sidebar: #f8fafc;
  --sidebar-bg: #f8fafc;
  --topbar-bg: #ffffff;
  --card-bg: #ffffff;
  --text: #111827;
  --text-heading: #111827;
  --text-normal: #6b7280;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --divider: #edf2f7;
  --success: #15803d;
  --success-bg: #dcfce7;
  --warning: #b45309;
  --warning-bg: #fef3c7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --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"] {
  --primary: #93c5fd;
  --primary-hover: #60a5fa;
  --primary-dark: #1e40af;
  --bg: #0f172a;
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-input: #1e293b;
  --sidebar-bg: #1a1f3a;
  --topbar-bg: #1a1f3a;
  --card-bg: #1e293b;
  --text: #f1f5f9;
  --text-heading: #f1f5f9;
  --text-normal: #cbd5e1;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border: #334155;
  --divider: #1e293b;
  --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: #1e3a5f;
  --success: #4ade80;
  --success-bg: #052e16;
  --warning: #fbbf24;
  --warning-bg: #1c1003;
  --danger: #f87171;
  --danger-bg: #1f0707;
}


*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.w-100 {
  width: 100%;
}
html {
  font-size: 14px;
  scroll-behavior: smooth;
}
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);
}
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;
}

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

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

.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 */

/* Only show simple tooltip when nav item has NO submenu */

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

/* Also flyout for nav items with NO submenu (shows just the name) */

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

/* 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"] .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-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: 5px 16px 48px;
  flex: 1;
}

.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(4, 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);
}

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

.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 */

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

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

/* PAGINATION */

/* CHART CARD */

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

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

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

/* OVERLAY (mobile) */

/* Page Header */

/* Stat Strip */

/* Users Card */

/* Bulk Action Bar */

/* Toolbar */

/* Users Table */

/* User Cell */

/* Role Badge */

/* Status Pill */

/* Action Buttons */

/* Checkbox */

/* Grid View */

/* Empty State */

/* 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-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 {
  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 {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.1);
}

/* Required field error highlight */
.form-input.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);
}

/* Avatar Upload */

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

/* Permissions */
/* Responsive */

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

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

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

  .main-content {
    padding: 18px 14px;
  }

  .welcome-section {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .profile-info {
    display: none;
  }
}

/* ============================================================
   SIDEBAR LOGO AREA
   ============================================================ */

/* When collapsed: hide full, show mini */

/* ============================================================
   NAV MINI LABEL (shown below icon when collapsed)
   ============================================================ */
.sidebar.collapsed .nav-link {
  margin-bottom: 4px;
  margin-top: 10px;
  flex-direction: column;
  gap: 2px;
  padding: 8px 4px;
  justify-content: center;
}

/* ============================================================
   ACTIVE STATE — auto-set via JS
   ============================================================ */
.nav-link.active {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}

.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)
   ============================================================ */

/* Modal wider for employee form */

/* Tab nav footer */

/* User View Details Panel */

/* Modal view wider */

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

/* Red ustat icon */

/* Calendar Grid */

/* Attendance Row Punch details */

/* ============================================================
   TASKS PAGE
   ============================================================ */

/* Task card */

/* Priority badge */

/* Task list view */

/* Task view/edit modal extras */

/* Assignee multi-select chips */

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

/* Report Sub-Nav Tabs */
/* Report Filter Bar */

/* Report KPI Row */

/* Report Chart Grid */

/* Report Data Table */

/* Progress ring */

/* Heatmap */

/* Legend row */

/* Report tab panels */

/* Summary insight box */

/* Inline percent badge */

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

/* Settings sidebar nav */

/* Settings content card */

/* Settings Section */

/* Settings Row */

/* Toggle Switch */

/* Settings Input */

/* Color Picker row */

/* Avatar upload row */

/* Permission table */

/* Notification pref cards */

/* Integration card */

/* Backup/Audit rows */

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

/* Dynamic lb-fill (override old static fills) */

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

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

/* HERO */

/* TABS */

/* SECTIONS */

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

/* GRIDS */

/* CARDS */

/* FIELDS */

/* LEAVE */

/* ATTENDANCE MINI */

/* HEATMAP */

/* TABLES */

/* BADGES */

/* DOCS */

/* ATTENDANCE SUMMARY */

/* LEAVE CHART */

/* EMPTY */

/* RESPONSIVE — User Details */

@media print {
  .sidebar,
  .topbar {
    display: none !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;
}
.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-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 ===================== */

.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 ---- */

/* ---- Employee chip (used in edit attendance to show selected employee) ---- */

/* Base overrides for login page only */

/* Page wrapper */

/* ---- LEFT PANEL (65%) ---- */

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

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

/* ---- RIGHT PANEL (35%) ---- */

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

/* ---- Responsive ---- */

/* ================================================================
   LEAVE PAGE — TAB COUNTS
   Extracted from leave.php
================================================================ */

/* ================================================================
   REFRESH ICON BUTTON (shared — leave + attendance)
================================================================ */
@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)
================================================================ */

/* ================================================================
   PENDING BUTTON in page header
================================================================ */

/* ================================================================
   PENDING APPROVALS MODAL — items
================================================================ */

/* ================================================================
   EMPLOYEE LEAVE SUMMARY MODAL
================================================================ */
/* ── Total Leave Balance Bar ── */

/* ================================================================
   MONTHLY ATTENDANCE MODAL (MAM)
   Extracted from attendance.php
================================================================ */

/* ================================================================
   ATTENDANCE DATE PICKER
   Extracted from attendance.php
================================================================ */
@keyframes attCalIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ================================================================
   CELEBRATIONS PAGE
   Extracted from celebrations.php
================================================================ */

/* ================================================================
   USERS PAGE — Exit button
   Extracted from users.php
================================================================ */

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

/* Stat Cards */

/* Payroll Run Bar — enhanced */

/* Main layout grid */

/* Table card */

/* Tabs row */

/* Tab counts */

/* Pay status pills */

/* Pay chips in table */

/* Right Sidebar */

/* Payslip preview empty state */

/* Dept split rows */

/* Status summary */

/* Mini payslip preview */

/* Full payslip in modal */

/* Generate payslip modal */

/* Form sections in modal */

/* Gross field */

/* Net Pay Banner */

/* ============================================================
   HOLIDAY VIEW TOGGLE (inside gradient bar)
   ============================================================ */

/* ============================================================
   CHANGE PASSWORD MODAL STYLES
   ============================================================ */

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

/* Holiday page responsiveness */

/* Page header responsiveness */

/* Profile page responsiveness */

/* Users/table page responsiveness */

/* Payroll responsiveness */

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

/* Stat strip / ustat responsiveness */

/* Payslip print area */

/* Leave / attendance table */

/* Topbar responsive */
@media (max-width: 400px) {
  .topbar-right {
    gap: 6px;
  }
}

/* ============================================================
   PAYROLL PAGE — MAIN GRID + RUN BAR RESPONSIVENESS
   ============================================================ */

@media (max-width: 768px) {
  /* Payroll run bar */
}

@media (max-width: 640px) {
  /* payslip modal: emp grid stacks */
}

/* ============================================================
   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 */
  /* Leave balance grid in sidebar */
}

@media (max-width: 600px) {
  /* Pending modal body max-height */
  /* Pend item actions */
  /* ELS modal balance row */
  /* ELS stats row */
  /* Leave type badge in table - truncate */
  /* Leave tabs */
  .tab {
    font-size: 11px;
    padding: 6px 8px;
  }
  .tab i {
    display: none;
  }
}

@media (max-width: 480px) {
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .tab {
    flex-shrink: 0;
  }
}

/* Toolbar wrapping behavior */
@media (max-width: 600px) {
  /* icon refresh btn alignment */
}

/* ============================================================
   PAGINATION RESPONSIVENESS
   ============================================================ */

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

/* ============================================================
   LEAVE BALANCE GRID ON LEAVE PAGE (leaveBalanceGrid)
   ============================================================ */

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

/* Attendance table */

/* Leave table */

/* Payroll table */

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

@media (max-width: 900px) {
  /* Grid cards */
}

@media (max-width: 700px) {
  /* Page header stacks */
}

/* ============================================================
   USER DETAILS PAGE — FULL RESPONSIVE
   ============================================================ */

@media (max-width: 700px) {
  /* Hide some table columns */
  /* page header on details */
}

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

/* Exit users tabs responsive */

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

/* ---- Toolbar: wrapping flex layout ---- */

/* Ensure payroll users-toolbar always wraps */

/* Search stretches to fill available space */

/* Selects are equal width and flexible */

/* Refresh button stays on same row */

/* ---- Table: always scrollable on small screens ---- */

/* ---- Payroll stat strip ---- */

/* ---- Tablet: 1100px ---- */

/* ---- Medium: 900px ---- */

/* ---- Small mobile: 600px ---- */
@media (max-width: 600px) {
  /* Table — horizontal scroll with min-width for all cols */
  /* Pagination responsive */
  /* Payslip modal responsive */
  .modal-backdrop .modal {
    margin: 8px !important;
    max-width: calc(100% - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
  }
}

/* ---- Very small: 400px ---- */

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

/* ── LEFT panel ── */

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

/* ── RIGHT panel ── */

/* Splash */

/* Employee banner */

/* Missing docs alert */

/* Toolbar */

/* View switch */

/* ── Document Cards ── */

/* Top accent bar per category */

/* File type icon box */

/* Verify circle */

/* ── Category / verify pills ── */

/* ── View doc modal ── */

/* ── Drop zone ── */

/* Bulk file list */

/* ════════════ RESPONSIVE ════════════ */

.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 ── */

/* ── Selfie upload ── */

/* ── Location detect ── */

/* ── Salary increment history ── */

/* ── Responsive: attendance table ── */

/* ── Responsive: dashboard tabs ── */
@media (max-width: 768px) {
  .dash-module-tabs {
    gap: 4px;
  }
  .dash-tab span {
    display: none;
  }
  .dash-tab {
    padding: 8px 12px;
  }
  .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;
  }
}

/* ── General responsive improvements ── */
@media (max-width: 480px) {
  .modal {
    margin: 10px;
    max-height: calc(100vh - 20px);
  }
}

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

/* ================================================================
   EXIT USERS — Full detail modal (tabs like user-details)
   ================================================================ */

/* ================================================================
   DASHBOARD TASKS TAB
   ================================================================ */

/* ================================================================
   EPF / PF TOGGLE SECTION — in employee modal Tab 3
   ================================================================ */
/* Toggle switch */

/* EPF calc preview box */

/* ================================================================
   OFFICE SHIFTS PAGE
   ================================================================ */

/* Shift assign modal — employee list */
/* ============================================================
           RESPONSIVE OVERRIDES
        ============================================================ */

/* ---- Status badge ---- */

/* ---- Category cell ---- */

/* ---- Month chip ---- */

/* ---- Color picker ---- */

/* ===== COMPREHENSIVE RESPONSIVE ADDITIONS ===== */

/* Settings page responsive */

/* 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) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Page header responsive */

/* Users/table card responsive */

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

/* Bottom grid (card layout) responsive */

/* Projects grid responsive */

/* Topbar responsive */
@media (max-width: 600px) {
  .topbar-right {
    gap: 4px !important;
  }
}

/* Employee modal tabs responsive */

/* Dashboard KPI cards responsive */

/* 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 panel row */

/* ── Form sections ── */

/* ── Task list item card ── */

/* assignee avatars row */

/* date range chip */

/* status badge */

/* ── UAM ── */

/* ── Multi-select assignee dropdown ── */

/* ── Select All row ── */

/* ── Assign-to-Other Modal ── */

/* ── View task detail fields ── */

/* ── Task action buttons ── */

/* ── Tabs + Inline Toolbar Row ── */

/* ── Tasks page responsive ── */
@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;
  }
}
@media (max-width: 380px) {
  .tabs {
    gap: 2px;
  }
  .tab {
    padding: 5px 8px;
    font-size: 11px;
  }
}

/* =============================================================
   HOLIDAYS PAGE — extracted from holidays.php
   ============================================================= */
/* ── UAM Action Menu (matches users.php) ── */

/* ── Multi-select dropdown ── */

/* ── View Holiday Modal detail rows ── */

/* ── Regional State Row animation ── */

/* ── Date Range Trigger Input ── */

/* ── Calendar Wrapper ── */

/* ── Nav Header ── */

/* ── Day Headers ── */

/* ── Grid ── */

/* ── Footer with OK button ── */

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

/* Drop zone */

/* PDF chip */

/* Image preview */

/* =============================================================
   REPORT PAGES — RESPONSIVE CHART GRIDS
   ============================================================= */

/* Tablet: stack side-by-side cols */

/* Mobile: fully stack */
@media (max-width: 640px) {
  /* Reduce chart heights on mobile */
  /* Report page header stacking */
}

/* Very small screens */

/* ════════════════════════════════════════════════
   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: 00px;
  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;
  display: none;
}
.breadcrumb-row a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumb-row i {
  font-size: 9px;
}

/* Enquiry tabs */

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

/* Form grid */

/* Upload zone */

/* CRM Modals */
.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);
  }
}

/* Master pages table */

@media (max-width: 640px) {
  .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 ── */

/* ── Top single-row bar: tabs + filters + refresh ── */

/* Segmented tabs inside bar */

/* Divider line between seg and filters */

/* Search in bar */

/* Compact custom select */

/* Push refresh to right end */

/* Refresh btn (icon only spins via JS) */

/* ── Table ── */
/* ── Toggle visibility fix for module permission table ── */
/* Module perm table - center toggle cells */

/* ── User cell ── */

/* ── Role + designation 2-line cell ── */

/* ── Badges ── */

/* ── Action btns ── */

/* ── Pane toggle ── */

/* ── Stats strip ── */

/* ── Empty row ── */

/* ── Add User modal full-screen creative ── */
@keyframes auIn {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* User type selector — creative cards */

/* Form body */

/* Footer */

/* ── User Details page ── */

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

/* ════════════════════════════════════════
   ENQUIRY PAGE STYLES
   ════════════════════════════════════════ */

/* ── ENQUIRY PAGE ──────────────────────────────────────── */

.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 {
  background: var(--primary) !important;
  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;
}

/* Empty */

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

/* ── 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 */

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

/* ── 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 */

/* Modal */

@keyframes enqModalIn {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(-12px);
  }

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

/* Header */

/* Body */

/* Section title */

/* Grid */

/* Label */

/* Input */

/* Select */

/* Error */

/* Footer */

/* 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;
}
#stFuFields .custom-calendar-picker {
  left: 0;
}

@media (max-width: 700px) {
  .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: 10px;
}

.ed-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ed-hdr-btns {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Grid */
.ed-grid {
  display: grid;
  grid-template-columns: 480px 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 */

/* 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-warm {
  background: #fef9c3;
  color: #92400e;
}

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

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

.ferr {
  font-size: 11px;
  color: #ef4444;
  min-height: 14px;
}

/* ===== users.php ===== */
/* ── Main card ── */

/* ── Segment tabs — primary highlighted ── */

/* ── Toolbar ── */

/* ── Table ── */

/* ── User cell ── */

/* ── Badges ── */

/* ── UAM trigger + menu ── */

/* ── Pagination ── */

/* Pane show/hide */

/* ── Reset Device Modal ── */

/* Upload modal */

/* ===== user-details.php ===== */

/* Perf stats */

/* ===== add-new-user.php ===== */

/* User type selector */

/* Form common */

/* ===== edit-user.php ===== */

/* ===== 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;
}
textarea.finp {
  resize: vertical;
  min-height: 70px;
}
.ferr {
  font-size: 11px;
  color: #ef4444;
  min-height: 14px;
}

/* ===== create-quotation.php ===== */
/* Items table */

/* ── 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);
  }
  .main-wrapper {
    margin-left: 0 !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 14px !important;
  }
}

@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: 768px) {
  /* .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-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: 700px) {
  .fu-tbl {
    min-width: 640px;
  }
  #edPanelFu > div {
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .btn-primary-sm,
  .btn-ghost-sm {
    font-size: 12px;
    padding: 7px 12px;
  }
  h2.page-title-main {
    font-size: 17px;
  }
}

/* ── 2. Profile Image Upload Card ── */

/* ── 3. Multi-select Assign Dropdown ── */

/* ── 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 */

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

/* ── Dark theme overrides ── */

[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"] {
  -webkit-appearance: none;
  appearance: none;
  background-image: none !important;
  padding-right: 10px;
}

/* ── Assign Module Modal Styles (users.php) ── */

/* ── Add District Modal (master-state.php) ── */

/* ── Change Credentials Popup (user-details-system.php) ── */

/* ── User Details System - Section styles ── */

/* ── Credentials overlay uses .open class ── */

/* ── 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) ── */

/* ── Inline Status Toggle (notification, faq, digital-catalogue pages) ── */
/* ============================================================
   HOLIDAYS PAGE
   ============================================================ */

/* Calendar Grid */

/* Holiday List Panel */

/* Holiday add modal specifics reuse existing modal classes */

/* ── Stats row ── */

/* ── Filter select ── */

/* ── Code / badge elements ── */

/* ── Product name cell ── */

/* ── Stock badges ── */

/* ── Pagination ── */

/* ── Product view side-panel rows ── */

/* ── Modal section title ── */

/* ── Responsive ── */

/* ── Product image upload widget ── */
/* editable fields on detail page */

/* ------ digital-catelogue.php ------ */
/* ── Catalogue Grid ── */

/* ── Multi Select ── */

/* ── Upload Area ── */

/* ── PDF Preview Box ── */

/* ------ faq.php ------ */

/* Inline toggle — reused from notification page */

/* ------ master-modal-script.php ------ */
/* ── Enquiry Color Picker ── */

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

/* ── 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 ------ */

/* Thumbnail */

/* Inline status toggle */

/* Image upload area */

/* ------ projects.php ------ */
/* ── Project card ── */

/* ── Color picker ── */

/* ── Form section (shared with tasks) ── */

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

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

/* Enquiry / general table horizontal scroll */
@media (max-width: 900px) {
  .tbl-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .enq-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 */

/* Color picker wrap on mobile */

/* product-details page responsive */

.welcome-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b 0%, #334155 60%, #475569 100%);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

/* ── Responsive dashboard charts row ────────────────────────── */
@media (max-width: 768px) {
  .welcome-section {
    padding: 18px 20px;
  }
  .dash-tab {
    padding: 7px 13px;
    font-size: 12px;
  }
}

.dash-chart-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.dash-donut-canvas canvas {
  width: 100% !important;
  height: 100% !important;
}
@keyframes growBar {
  from {
    width: 0 !important;
  }
}

.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);
}
@media (max-width: 768px) {
  .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 ── */

/* ══════════════════════════════════════════════════════════
   TABLE-CONTROLS: 75% search + 25% filter
══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════
   SALES panel stat-card accent colours (sc-enq design)
══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════
   PAYMENTS panel stat-card accent colours
══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════
   MEETINGS panel stat-card accent colours
══════════════════════════════════════════════════════════ */
.ed-act-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.12s;
  white-space: nowrap;
}

.ed-act-item:hover {
  background: rgba(18, 126, 194, 0.08);
  color: var(--primary, #127ec2);
}

.ed-act-item + .ed-act-item {
  border-top: 1px solid var(--border, #e5e7eb);
}

.ed-act-item i {
  width: 15px;
  text-align: center;
  font-size: 12px;
  flex-shrink: 0;
}

.mtg-assign-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.mtg-assign-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(18, 126, 194, 0.1);
  color: var(--primary, #127ec2);
  font-size: 12px;
  font-weight: 600;
}

.mtg-assign-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary, #127ec2);
  font-size: 11px;
  padding: 0;
  line-height: 1;
}
/* ══════════════════════════════════════════════════════════
   ATTENDANCE panel stat-card accent colours
══════════════════════════════════════════════════════════ */

/* All new panel cards use same border-left design as sc-enq */

/* Remove dash-analytics-row stale rules (safe to nullify) */
/* ── 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;
}
.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
  ══════════════════════════════════════════ */

/* progress bar in total column */

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

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

.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 ══ */

/* KPI overrides for meeting colours */

/* chart cards */

/* funnel */

/* donut legend */

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

/* rsm badge */

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

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

@media (max-width: 992px) {
  .rpt-charts-row .dash-chart-card {
    min-width: 240px;
  }
}

@media (max-width: 768px) {
  .rpt-charts-row .dash-chart-card {
    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);
  }
}
@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-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;
}

/* ── 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 ── */

/* ── 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 ── */

/* ── 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 ── */

@keyframes fuModalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ── Follow-up Form Controls ── */

/* ── Follow-up Date Range Picker ── */
.fu-toolbar {
  flex-wrap: wrap;
}

@keyframes fuRangeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.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;
}

.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:hover {
  background: #f1f5ff;
}

/* Date Range */

/* Button */
/* Custom Time Picker Stylesheet */
.timer-div {
  z-index: 1000;
  padding: 5px;
  background-color: #d7e3eb;
  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(--primary);
  color: white;
}

.timer-div .timer-ampmbtn:focus {
  background-color: var(--primary);
  color: white;
}

#timer-div .timer-numberbtn:hover {
  background-color: var(--primary);
  color: white;
}

#timer-div .timer-numberbtn:focus {
  background-color: var(--primary);
  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 var(--bg);

  display: grid;
  justify-content: center;
  width: 200px;
  height: 200px;
  border-radius: 100%;
}

#timer-div .timer-minclock {
  position: relative;
  border: 5px solid var(--bg);
  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 var(--bg);
  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: var(--primary);
}

.timer-footer-div .setclocktimebtn:hover {
  background-color: var(--primary-dark);
  color: white;
}

.timer-footer-div .clearclocktimebtn:hover {
  background-color: var(--primary);
  color: white;
}

@media print {
  .no-print {
    display: none;
  }

  .printSection,
  .printSection * {
    display: block;
  }

  .card,
  .section,
  .box {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .page-break {
    page-break-before: always;
    break-before: page;
    margin-top: 20px;
  }
}

/* ── 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-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,
  .tbl-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .mp-table {
    min-width: 650px !important;
  }
  .data-table {
    min-width: 700px !important;
  }
  .enq-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 {
    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;
  }
}
@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;
  }
}
@media (max-width: 400px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ── Users & grid cards ── */

/* ── Profile page ── */

/* ── Enquiry form & details ── */

/* ── Designation page ── */

/* ── Follow-up page ── */

/* ── Chart cards ── */
@media (max-width: 768px) {
  .dash-chart-card {
    min-width: unset !important;
    width: 100% !important;
  }
}

/* ── Add/Edit User form ── */

/* ── General utility ── */
@media (max-width: 768px) {
  .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 {
    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;
  }
}

/* ── State master table — region badge alignment ── */

/* ── Prevent horizontal page scroll ── */
body {
  overflow-x: hidden;
}
.main-wrapper {
  overflow-x: hidden;
}

/* ============================================================
   TOP HORIZONTAL NAVIGATION BAR
   ============================================================ */

/* Topbar: single clean row — logo left, right icons right */
.topbar {
  height: var(--topbar-height) !important;
  min-height: unset;
  flex-wrap: nowrap;
  padding: 0 22px;
  gap: 0;
}

.topbar-left {
  width: auto !important;
  padding: 0;
  margin-right: 0;
  flex-shrink: 0;
}

/* SUB-NAV BAR: fixed strip directly below topbar */
.sub-nav-bar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  right: 0;
  z-index: 190;
  height: 46px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: stretch;
  padding: 0 22px;
}

/* TOP NAV: fills the left portion of the sub-nav-bar */
.top-nav {
  display: flex;
  align-items: stretch;
  height: 46px;
  gap: 2px;
  flex-shrink: 0;
}

.top-nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.top-nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  height: 100%;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
  font-family: "Nunito Sans", sans-serif;
}

.top-nav-link i:first-child {
  font-size: 14px;
  color: var(--text-light);
  transition: color 0.2s;
}

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

.top-nav-link:hover i:first-child {
  color: var(--primary);
}

.top-nav-item.active > .top-nav-link {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--primary-light);
}

.top-nav-item.active > .top-nav-link i:first-child {
  color: var(--primary);
}

.tn-chevron {
  font-size: 10px !important;
  margin-left: 2px;
  transition: transform 0.25s;
}

.top-nav-item.open .tn-chevron {
  transform: rotate(180deg);
}

/* TOP DROPDOWN */
.top-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 180px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity 0.18s,
    transform 0.18s;
}

.top-nav-item.open .top-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.top-drop-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 7px;
  transition:
    background 0.15s,
    color 0.15s;
}

.top-drop-link i {
  width: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
}

.top-drop-link:hover,
.top-drop-link.active {
  background: var(--primary-light);
  color: var(--primary);
}

.top-drop-link:hover i,
.top-drop-link.active i {
  color: var(--primary);
}

/* Remove sidebar - main wrapper takes full width */
.sidebar {
  display: none !important;
}

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

/* Push content down below topbar + sub-nav-bar */
.main-content {
  margin-top: calc(var(--topbar-height) + 46px) !important;
}

/* page-hdr: floats on the right side of the sub-nav-bar row */
.page-hdr {
  /* position: fixed !important; */
  top: var(--topbar-height) !important;
  right: 22px !important;
  height: 46px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  z-index: 195 !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-wrap: nowrap !important;
  pointer-events: none;
}

.page-hdr > * {
  pointer-events: all;
}

/* Hide the page title/breadcrumb block — the nav handles page identity */
/* .page-hdr > div:first-child {
  display: none !important;
} */

/* Mobile hamburger - show only on mobile */
.mobile-only {
  display: none;
}

/* Mobile Menu Panel */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 400;
}

.mobile-menu-overlay.active {
  display: block;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  left: -280px;
  width: 270px;
  height: 100%;
  background: var(--card-bg);
  z-index: 500;
  overflow-y: auto;
  transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
  padding-bottom: 30px;
}

.mobile-menu-panel.open {
  left: 0;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--primary);
}

.mobile-menu-header button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: "Nunito Sans", sans-serif;
  border-bottom: 1px solid var(--border);
  transition:
    background 0.15s,
    color 0.15s;
}

.mobile-menu-link i:first-child {
  width: 18px;
  color: var(--primary);
}

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

.mobile-chevron {
  margin-left: auto;
  font-size: 11px !important;
  transition: transform 0.2s;
}

.mobile-menu-group.open .mobile-chevron {
  transform: rotate(180deg);
}

.mobile-submenu {
  display: none;
  background: var(--bg);
}

.mobile-menu-group.open .mobile-submenu {
  display: block;
}

.mobile-sub-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 46px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition:
    background 0.15s,
    color 0.15s;
}

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

/* Responsive */
@media (max-width: 900px) {
  .top-nav {
    display: none;
  }
  .mobile-only {
    display: flex;
  }
  .topbar-left {
    margin-right: auto;
  }
}

@media (max-width: 600px) {
  .topbar {
    padding: 0 12px;
  }
}

/* ============================================================
   ENQUIRY — STATUS PILLS & 3-ACTION BUTTONS
   ============================================================ */

/* Win / Lost toggle pills in status modal */
.st-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 22px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  transition: all 0.18s;
  flex: 1;
  justify-content: center;
}
.st-pill i {
  font-size: 13px;
}
#stPillWin.active {
  background: #d1fae5;
  border-color: #10b981;
  color: #065f46;
}
#stPillLost.active {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}
.st-pill:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

/* 3-button action group in pending rows */
.enq-actions {
  display: flex;
  gap: 5px;
  flex-wrap: nowrap;
}
.enq-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  border: 1.5px solid;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  font-family: "Nunito Sans", sans-serif;
}
.enq-act-status {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}
.enq-act-status:hover {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}
.enq-act-followup {
  border-color: #bbf7d0;
  color: #065f46;
  background: #f0fdf4;
}
.enq-act-followup:hover {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}
.enq-act-meeting {
  border-color: #e9d5ff;
  color: #6d28d9;
  background: #faf5ff;
}
.enq-act-meeting:hover {
  background: #8b5cf6;
  color: #fff;
  border-color: #8b5cf6;
}

/* ============================================================
   MEETINGS — Add Meeting modal redesign
   ============================================================ */

/* ============================================================
   FULL RESPONSIVE OVERHAUL — ALL PAGES
   ============================================================ */

/* ── Page header wraps on small screens ── */
.page-hdr {
  flex-wrap: wrap;
  gap: 10px;
}
.phdr-btn-group {
  flex-wrap: wrap;
}

/* ── Topbar ── */
@media (max-width: 900px) {
  .topbar {
    padding: 0 12px !important;
    height: var(--topbar-height) !important;
  }
}

/* ── Main content ── */
@media (max-width: 768px) {
  .main-content {
    padding: 14px 12px 40px !important;
  }
  .page-hdr {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 0 0 10px;
  }
  .phdr-btn-group {
    width: 100%;
  }
  .phdr-btn-group .btn-primary-sm,
  .phdr-btn-group .btn-ghost-sm,
  .phdr-btn-group .enq-download-btn {
    flex: 1;
    justify-content: center;
    text-align: center;
  }
}
@media (max-width: 480px) {
  .main-content {
    padding: 10px 8px 32px !important;
  }
}

/* ── Enquiry / Followup / Meetings tab bar ── */
@media (max-width: 768px) {
  .enq-tab-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: none;
    padding-bottom: 0;
  }
  .enq-tab-list {
    gap: 4px;
    padding: 10px 12px 0;
    min-width: max-content;
  }
  .enq-tab-btn {
    font-size: 12px !important;
    padding: 7px 12px !important;
    white-space: nowrap;
  }
  .enq-tab-pill {
    font-size: 10px !important;
    padding: 1px 6px !important;
  }
}

/* ── Toolbar ── */
@media (max-width: 900px) {
  .enq-toolbar,
  .fu-toolbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
  }
  .enq-search-box {
    flex: 1 1 180px;
    min-width: 0;
  }
  /*.csel-wrap {*/
  /*  flex: 1 1 130px;*/
  /*}*/
  .enq-toolbar-right {
    margin-left: auto;
  }
  .cal-custom {
    flex: 1 1 130px;
  }
}
@media (max-width: 600px) {
  .enq-search-box {
    flex: 1 1 100%;
    width: 100%;
  }
  .csel-wrap {
    flex: 1 1 calc(50% - 4px);
  }
  .enq-toolbar-right {
    flex: 0 0 auto;
  }
}

/* ── Enquiry table: horizontal scroll on mobile ── */
@media (max-width: 1024px) {
  .enq-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .enq-table,
  .fu-table {
    min-width: 700px;
  }
}
@media (max-width: 768px) {
  .enq-table,
  .fu-table {
    min-width: 650px;
    font-size: 12px;
  }
  .enq-table th,
  .enq-table td,
  .fu-table th,
  .fu-table td {
    padding: 9px 10px !important;
  }
  .row-avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 10px !important;
  }
  .row-name {
    font-size: 12px !important;
  }
  .row-sub {
    font-size: 10px !important;
  }
}

/* ── 3-action buttons: stack on very small table cells ── */
@media (max-width: 900px) {
  .enq-actions {
    flex-direction: column;
    gap: 4px;
  }
  .enq-act-btn {
    padding: 4px 8px;
    font-size: 10px;
    justify-content: center;
  }
  .fu-action-td {
    min-width: 90px;
  }
}

/* ── Pagination ── */
@media (max-width: 600px) {
  .fu-pagination,
  #enqPaginationBar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 10px 14px !important;
  }
}

/* ── Meetings page ── */

/* ── Meetings Add Popup: customer dropdown redesign ── */
/* The dropdown in the meetings Add Meeting modal */
#mtgCustDrop {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
  z-index: 9999 !important;
}
#mtgCustSearch {
  background: var(--bg) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 9px !important;
  font-size: 13px !important;
  height: 38px !important;
  padding-left: 32px !important;
  color: var(--text) !important;
  transition: border-color 0.18s !important;
}
#mtgCustSearch:focus {
  border-color: var(--primary) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(18, 126, 194, 0.12) !important;
}
/* Customer chip — match finp style */
#mtgCustChip {
  background: var(--primary-light) !important;
  border: 1.5px solid var(--primary) !important;
  border-radius: 9px !important;
  padding: 8px 12px !important;
}
#mtgChipName {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--primary) !important;
}
#mtgChipSub {
  font-size: 11px !important;
  color: var(--text-muted) !important;
}

/* ── Dashboard stat cards ── */

/* ── Customer page table ── */

/* ── Reports page ── */

/* ── Modal grids: single column on mobile ── */
@media (max-width: 540px) {
  /* Win status fields */
}
@media (max-width: 480px) {
  .crm-modal {
    max-height: 95vh !important;
  }
  .crm-mbody {
    padding: 12px 14px !important;
    max-height: calc(95vh - 130px);
    overflow-y: auto;
  }
  .crm-mfoot {
    flex-direction: row !important;
    gap: 8px !important;
  }
  .crm-mfoot .btn-primary-sm,
  .crm-mfoot .btn-ghost-sm {
    flex: 1 !important;
    justify-content: center !important;
  }
}

/* ── Enquiry detail page ── */

/* ── Status pill buttons ── */
@media (max-width: 400px) {
  .st-pill {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }
}

/* ── General: tables never overflow their card ── */
.enq-main-card,
.fu-main-card {
  overflow: hidden;
}

/* ── Prevent body scroll behind modal ── */

/* ── Touch-friendly minimum tap targets ── */
@media (max-width: 768px) {
  .enq-tab-btn,
  .btn-primary-sm,
  .btn-ghost-sm,
  .enq-act-btn,
  .crm-mclose,
  .fu-page-btn,
  .enq-pg-btn {
    min-height: 36px;
  }
}

/* ── Scrollbar for table wrap on mobile ── */
.enq-table-wrap::-webkit-scrollbar {
  height: 4px;
}
.enq-table-wrap::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* Module tab buttons in welcome banner */
.dash-module-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dash-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 9px;
  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: 700;
  cursor: pointer;
  font-family: "Nunito Sans", sans-serif;
  transition: all 0.2s;
  white-space: nowrap;
}
.dash-tab i {
  font-size: 13px;
}
.dash-tab:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.dash-tab.active {
  background: #fff;
  border-color: #fff;
  color: #0e65a0;
}

/* Panel show/hide */
.dash-module-panel {
  display: none;
}
.dash-module-panel.active {
  display: block;
  animation: panelIn 0.25s ease;
}
@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── KPI row ── */
.db-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.db-kpi {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.db-kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--kc, #127ec2);
  border-radius: 3px 0 0 3px;
}
.db-kpi:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}
.db-kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.db-kpi-body {
  flex: 1;
  min-width: 0;
}
.db-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  font-family: "Sora", sans-serif;
}
.db-kpi-lbl {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}
.db-kpi-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}
.db-kpi-up {
  background: #d1fae5;
  color: #065f46;
}
.db-kpi-down {
  background: #fee2e2;
  color: #991b1b;
}

/* ── Charts row ── */
.db-charts-row {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.db-chart-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.db-chart-wide {
  grid-column: span 1;
}
.db-chart-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.db-chart-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.db-chart-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Donut */
.db-donut-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}
.db-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.db-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.db-leg-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.db-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.db-leg-val {
  margin-left: auto;
  font-weight: 800;
  color: var(--text);
  font-size: 13px;
}

/* Progress bars */
.db-progress-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.db-prog-item {
}
.db-prog-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}
.db-prog-bg {
  height: 6px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}
.db-prog-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* ── Table card ── */
.db-table-card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.db-table-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.db-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  padding: 6px 12px;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  transition: all 0.2s;
}
.db-view-all:hover {
  background: var(--primary);
  color: #fff;
}
.db-tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.db-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.db-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.db-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  white-space: nowrap;
  vertical-align: middle;
}
.db-table tr:last-child td {
  border-bottom: none;
}
.db-table tr:hover td {
  background: var(--primary-light);
}
.db-row-user {
  display: flex;
  align-items: center;
  gap: 9px;
}
.db-avatar {
  background: var(--primary) !important;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.db-row-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.db-row-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.db-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.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;
}
/* ── Responsive: dashboard ── */
@media (max-width: 1200px) {
  .db-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .db-charts-row {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 900px) {
  .db-kpi-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .db-charts-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .db-chart-wide {
    grid-column: span 1;
  }
}
@media (max-width: 600px) {
  .db-kpi-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .db-kpi {
    padding: 12px 10px;
    gap: 8px;
  }
  .db-kpi-val {
    font-size: 18px;
  }
  .db-kpi-icon {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .db-kpi-badge {
    display: none;
  }
  .dash-tab span {
    display: none;
  }
  .dash-tab {
    padding: 8px 12px;
  }
  .db-table {
    min-width: 600px;
  }
}
@media (max-width: 400px) {
  .db-kpi-row {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════
   UNIFIED CRM PAGINATION  (used on all pages)
   Replace: enq-pagination, fu-pagination, mp-pagination
   ═══════════════════════════════════════════════════ */
.crm-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;
}

.crm-page-info {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.crm-page-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.crm-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;
  line-height: 1;
}

.crm-pg-btn:hover:not(:disabled) {
  border-color: var(--primary, #127ec2);
  color: var(--primary, #127ec2);
  background: var(--primary-light, rgba(18, 126, 194, 0.08));
}

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

.crm-pg-btn.ellipsis {
  border-color: transparent;
  background: transparent;
  cursor: default;
  color: var(--text-muted);
  font-size: 15px;
  letter-spacing: 1px;
}

.crm-pg-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

@media (max-width: 540px) {
  .crm-pagination {
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
  }
  .crm-pg-btn {
    min-width: 30px;
    height: 30px;
    font-size: 12px;
  }
}
