/* ============================================
   Satkar - Centralized Master Stylesheet
   ============================================ */

:root {
  --primary: #4f46e5;
  --primary-light: #eef2ff;
  --primary-dark: #3730a3;
  --secondary: #0ea5e9;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #6366f1;
  --info-light: #e0e7ff;
  --dark: #1e293b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --sidebar-width: 280px;
  --header-height: 64px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);

  --transition-fast: all 0.15s ease;
  --transition: all 0.3s ease;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Dark Theme Support */
body.dark-theme {
  --gray-50: #1e293b;
  --gray-100: #0f172a;
  --gray-200: #334155;
  --gray-700: #e2e8f0;
  --gray-800: #f1f5f9;
  --gray-900: #ffffff;
}
body.dark-theme .card,
body.dark-theme .stat-card,
body.dark-theme .filter-section,
body.dark-theme .top-nav,
body.dark-theme .main-footer,
body.dark-theme .modal-content,
body.dark-theme .dropdown-menu-custom {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #334155;
}
body.dark-theme .table { color: #f1f5f9; }
body.dark-theme .table th { background: #0f172a; color: #94a3b8; border-color: #334155; }
body.dark-theme .table td { border-color: #334155; }
body.dark-theme .form-control,
body.dark-theme .form-select {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}

/* ========== SCROLLBARS ========== */
html { scrollbar-width: auto; scrollbar-color: #DAA520 #f1f1f1; }
html::-webkit-scrollbar { width: 14px; }
html::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FFD700, #DAA520, #B8860B);
  border-radius: 10px;
  border: 2px solid #f1f1f1;
}

/* ========== SIDEBAR ========== */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  z-index: 1050;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
  transform: translateX(0);
  scrollbar-width: auto;
  scrollbar-color: #9b59b6 #2c3e50;
}
.sidebar::-webkit-scrollbar { width: 10px; }
.sidebar::-webkit-scrollbar-track { background: #2c3e50; border-radius: 10px; }
.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #9b59b6, #8e44ad, #6c3483);
  border-radius: 10px;
  border: 2px solid #2c3e50;
}
.sidebar.collapsed { transform: translateX(-100%); }
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
}

.sidebar-header {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  background: #1e293b;
  z-index: 2;
}
.sidebar-logo {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: white; flex-shrink: 0;
}
.sidebar-brand { color: white; font-size: 19px; font-weight: 700; }
.sidebar-brand span { color: var(--secondary); }

.sidebar-nav { padding: 8px 0; }
.sidebar-section {
  padding: 14px 20px 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gray-400);
  font-weight: 700;
}
.sidebar-menu { list-style: none; padding: 0; margin: 0; }
.sidebar-menu li { margin: 2px 8px; }
.sidebar-menu li a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  color: var(--gray-400);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}
.sidebar-menu li a:hover {
  background: rgba(255,255,255,0.08);
  color: white;
  transform: translateX(3px);
}
.sidebar-menu li a.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.sidebar-menu li a i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }

.badge-count {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
}

/* ========== MAIN CONTENT & TOP NAV ========== */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left 0.3s ease, width 0.3s ease;
  width: calc(100% - var(--sidebar-width));
  display: flex;
  flex-direction: column;
}
.sidebar.collapsed ~ .main-content { margin-left: 0; width: 100%; }
@media (max-width: 991px) { .main-content { margin-left: 0; width: 100%; } }

.top-nav {
  background: white;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1030;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.top-nav-left { display: flex; align-items: center; gap: 16px; }
.page-title-wrapper { display: flex; flex-direction: column; }
.page-title { font-size: 18px; font-weight: 700; color: var(--gray-900); margin: 0; letter-spacing: -0.3px; }
.page-subtitle { font-size: 11px; color: var(--gray-500); font-weight: 500; }
.top-nav-right { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--gray-100);
  border: 1px solid transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--gray-600);
  cursor: pointer; position: relative;
  transition: var(--transition);
  text-decoration: none;
}
.icon-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.badge-num {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: white;
  font-size: 10px; padding: 2px 6px;
  border-radius: 12px; font-weight: 700; min-width: 18px; text-align: center;
}

.user-avatar-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: white; font-weight: 700; font-size: 14px;
  border: 2px solid var(--gray-200);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.user-avatar-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.user-dropdown-wrapper { position: relative; }
.dropdown-menu-custom {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  min-width: 280px;
  z-index: 1060;
  display: none;
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.dropdown-menu-custom.show { display: block; }
.dropdown-header-custom {
  padding: 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; gap: 12px;
  background: var(--gray-50);
}
.dropdown-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.dropdown-header-custom h6 { margin: 0; font-weight: 600; color: var(--gray-900); }
.dropdown-header-custom small { color: var(--gray-500); font-size: 12px; }
.dropdown-divider-custom { height: 1px; background: var(--gray-100); }
.dropdown-item-custom {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  color: var(--gray-700);
  text-decoration: none;
  font-size: 13px; font-weight: 500;
  transition: var(--transition-fast);
}
.dropdown-item-custom:hover { background: var(--primary-light); color: var(--primary); }

.top-search { position: relative; margin-right: 6px; }
.top-search i {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--gray-400); font-size: 13px;
}
.top-search input {
  padding: 7px 12px 7px 34px;
  border-radius: 20px;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  font-size: 13px;
  width: 210px;
  transition: var(--transition);
}
.top-search input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  width: 260px;
  box-shadow: 0 0 0 3px var(--primary-light);
}
@media (max-width: 768px) { .top-search { display: none; } }

/* ========== SHARED DASHBOARD & MODULE STYLES ========== */
.dashboard-content { padding: 20px; flex: 1; }

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px 15px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  min-height: 110px;
  border: 1px solid var(--gray-200);
}
.stat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 10px;
}
.stat-value { font-size: 24px; font-weight: 800; color: var(--gray-900); line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 4px; }

.filter-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--gray-200);
  padding: 15px 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.card-header h5 { margin: 0; font-weight: 700; font-size: 15px; color: var(--gray-900); }
.card-body { padding: 20px; }

/* Tables */
.table-container { overflow-x: auto; border-radius: var(--radius); }
.table { margin-bottom: 0; white-space: nowrap; }
.table th {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--gray-500); font-weight: 700;
  border-bottom: 2px solid var(--gray-200);
  padding: 12px 14px; background: var(--gray-50);
}
.table td {
  padding: 11px 14px; vertical-align: middle;
  font-size: 13px; border-bottom: 1px solid var(--gray-100);
}
.table tbody tr:hover { background: var(--primary-light); }

/* Status Badges & Avatars */
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.status-active, .status-completed, .status-verified, .status-paid, .status-confirmed {
  background: #d1fae5; color: #065f46;
}
.status-pending, .status-in_progress, .status-under_review, .status-open {
  background: #fef3c7; color: #92400e;
}
.status-inactive, .status-suspended, .status-cancelled, .status-rejected, .status-blocked {
  background: #fee2e2; color: #991b1b;
}

.user-avatar, .client-avatar, .vendor-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}

/* Action Buttons */
.action-buttons { display: flex; gap: 5px; align-items: center; }
.action-btn {
  width: 30px; height: 30px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  transition: var(--transition-fast);
  font-size: 12px;
}
.action-btn:hover { transform: translateY(-1px); }
.action-btn.view:hover { background: #e0e7ff; color: var(--primary); border-color: var(--primary); }
.action-btn.edit:hover { background: #eef2ff; color: var(--primary); border-color: var(--primary); }
.action-btn.delete:hover { background: #fee2e2; color: var(--danger); border-color: var(--danger); }

/* Search & Pagination */
.search-box { position: relative; min-width: 220px; }
.search-box i, .search-box .search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--gray-400); font-size: 13px;
}
.search-box input {
  padding-left: 34px; border-radius: var(--radius);
  font-size: 13px; border: 1px solid var(--gray-300);
}
.page-size-select { width: 75px; display: inline-block; }
.info-text { font-size: 12px; color: var(--gray-500); }

.pagination .page-link {
  border-radius: var(--radius-sm); margin: 0 2px;
  font-size: 12px; color: var(--gray-700);
  border: 1px solid var(--gray-200);
}
.pagination .active .page-link { background: var(--primary); border-color: var(--primary); color: white; }

/* Validation Feedback */
.form-control.is-invalid, .form-select.is-invalid {
  border-color: var(--danger) !important;
}
.invalid-feedback {
  display: block; font-size: 11px; color: var(--danger); margin-top: 3px; font-weight: 500;
}

/* Role Checkboxes Card */
.role-check-group {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.role-check-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 8px 12px;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; background: var(--gray-50);
  transition: var(--transition-fast);
}
.role-check-item:hover { border-color: var(--primary); background: var(--primary-light); }
.role-check-item input:checked + span { font-weight: 700; color: var(--primary); }

/* Footer */
.main-footer {
  background: white;
  border-top: 1px solid var(--gray-200);
  padding: 14px 20px;
  margin-top: auto;
  font-size: 13px;
  color: var(--gray-500);
}
.footer-link { color: var(--gray-500); text-decoration: none; }
.footer-link:hover { color: var(--primary); text-decoration: underline; }

/* Event Templates & Card Grid Components */
.template-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.template-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.template-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.template-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
}
.template-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.template-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--gray-200);
  text-align: center;
}
.template-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}
.template-stat-label {
  font-size: 11px;
  color: var(--gray-500);
}
.service-item, .task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
  margin-bottom: 8px;
}

/* Category Cards (event-categories.php) */
.category-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.category-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.category-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  margin-top: 14px;
  margin-bottom: 2px;
}
.category-slug {
  font-size: 12px;
  color: var(--gray-400);
  font-family: monospace;
}
.category-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--gray-200);
  text-align: center;
}
.category-stat {
  background: var(--gray-50);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}
.category-stat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
}
.category-stat-label {
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.category-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
}

/* SOP & Checklist Cards (checklist-sop.php) */
.sop-card, .document-card, .voice-note-card, .plan-card, .gateway-card, .currency-card, .item-card, .communication-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.sop-card:hover, .document-card:hover, .voice-note-card:hover, .plan-card:hover, .gateway-card:hover, .item-card:hover, .communication-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Room Availability & Room Booking Cards */
.room-info-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.room-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.room-stat {
  text-align: center;
  background: var(--gray-50);
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  min-width: 100px;
}
.room-stat-value, .store-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-800);
}
.room-stat-label, .store-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gray-500);
  font-weight: 600;
  margin-top: 2px;
}

/* Kanban Board & Cards (kanban-board.php) */
.kanban-board {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 20px;
  min-height: calc(100vh - 220px);
}
.kanban-column {
  flex: 0 0 320px;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 16px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
}
.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-weight: 700;
  color: var(--gray-800);
  font-size: 14px;
}
.kanban-tasks {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kanban-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: var(--transition-fast);
}
.kanban-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Timeline Components */
.timeline {
  position: relative;
  padding: 10px 0 10px 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}
.timeline-item {
  position: relative;
  margin-bottom: 20px;
}
.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid white;
  box-shadow: 0 0 0 1px var(--primary);
}
.timeline-content {
  background: white;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.timeline-date {
  font-size: 11px;
  color: var(--gray-400);
  margin-bottom: 4px;
}
.timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
}

/* Dark mode overrides for cards */
body.dark-theme .category-card,
body.dark-theme .template-card,
body.dark-theme .sop-card,
body.dark-theme .room-info-card,
body.dark-theme .kanban-card,
body.dark-theme .timeline-content,
body.dark-theme .document-card,
body.dark-theme .item-card,
body.dark-theme .service-item,
body.dark-theme .task-item,
body.dark-theme .service-card,
body.dark-theme .product-card,
body.dark-theme .status-card,
body.dark-theme .source-card,
body.dark-theme .type-card,
body.dark-theme .amenity-card,
body.dark-theme .age-group-card,
body.dark-theme .cuisine-card,
body.dark-theme .dietary-card,
body.dark-theme .theme-card,
body.dark-theme .package-card {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
body.dark-theme .category-stat,
body.dark-theme .room-stat,
body.dark-theme .kanban-column,
body.dark-theme .service-stat,
body.dark-theme .product-stat,
body.dark-theme .status-stat,
body.dark-theme .source-stat,
body.dark-theme .type-stat,
body.dark-theme .amenity-stat,
body.dark-theme .age-group-stat {
  background: #0f172a;
  border-color: #334155;
}
body.dark-theme .category-name,
body.dark-theme .category-stat-value,
body.dark-theme .room-stat-value,
body.dark-theme .timeline-title,
body.dark-theme .service-name,
body.dark-theme .product-name,
body.dark-theme .status-name,
body.dark-theme .source-name,
body.dark-theme .type-name,
body.dark-theme .amenity-name,
body.dark-theme .age-group-name,
body.dark-theme .cuisine-name,
body.dark-theme .dietary-name,
body.dark-theme .theme-name,
body.dark-theme .package-name {
  color: #f1f5f9;
}

/* Service Types Cards (event-service-types.php, vendor-service-catalog.php) */
.service-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.service-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.service-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  margin-top: 12px;
  margin-bottom: 4px;
}
.service-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  width: fit-content;
}
.service-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 4px;
}
.service-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--gray-200);
  text-align: center;
  font-size: 12px;
  color: var(--gray-600);
}
.service-stat {
  background: var(--gray-50);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}
.service-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
}

/* Product Types Cards (event-product-types.php, vendor-product-catalog.php) */
.product-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.product-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.product-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.product-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  margin-top: 12px;
  margin-bottom: 4px;
}
.product-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: var(--radius-sm);
  width: fit-content;
}
.product-sku {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
  font-family: monospace;
}
.unit-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 12px;
  width: fit-content;
}
.product-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--gray-200);
  text-align: center;
  font-size: 12px;
  color: var(--gray-600);
}
.product-stat {
  background: var(--gray-50);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}
.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
}

/* Status Cards (event-status-master.php, lead-status-master.php) */
.status-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.status-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.status-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
}
.status-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
}
.default-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 12px;
}
.active-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.active-badge.active-yes {
  background: #d1fae5;
  color: #065f46;
}
.active-badge.active-no {
  background: #fee2e2;
  color: #991b1b;
}
.status-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
}
.status-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--gray-200);
  text-align: center;
  font-size: 12px;
  color: var(--gray-600);
}
.status-stat {
  background: var(--gray-50);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}
.status-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
}

/* Source, Type, Amenity, Age-Group Cards */
.source-card, .type-card, .amenity-card, .age-group-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.source-card:hover, .type-card:hover, .amenity-card:hover, .age-group-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.source-icon, .type-icon, .amenity-icon, .age-group-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.source-name, .type-name, .amenity-name, .age-group-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  margin-top: 12px;
  margin-bottom: 2px;
}
.source-slug, .type-slug, .amenity-slug {
  font-size: 12px;
  color: var(--gray-400);
  font-family: monospace;
}
.age-range {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2px;
}
.source-stats, .type-stats, .amenity-stats, .age-group-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--gray-200);
  text-align: center;
}
.source-stat, .type-stat, .amenity-stat, .age-group-stat {
  background: var(--gray-50);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}
.source-stat-value, .type-stat-value, .amenity-stat-value, .age-group-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}
.source-stat-label, .type-stat-label, .amenity-stat-label, .age-group-stat-label {
  font-size: 10px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cuisine & Dietary Cards */
.cuisine-card, .dietary-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.cuisine-card:hover, .dietary-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.cuisine-image {
  height: 140px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.cuisine-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cuisine-image i {
  font-size: 40px;
  color: var(--gray-400);
}
.cuisine-info, .dietary-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cuisine-name, .dietary-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 4px;
}
.cuisine-country {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 6px;
}
.cuisine-desc, .dietary-desc {
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 10px;
  flex: 1;
}
.cuisine-stats, .dietary-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
}
.dietary-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  margin-bottom: 12px;
}
.badge-allergen {
  background: #fee2e2;
  color: #991b1b;
  font-size: 10px;
}
.badge-medical {
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
}
.badge-popular, .popular-badge {
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
}
.popular-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Event Packages, Themes, Rooms, Venues & Vendors */
.package-card, .theme-card, .room-card, .venue-card, .vendor-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.package-card.popular {
  border-color: #f59e0b;
}
.package-card:hover, .theme-card:hover, .room-card:hover, .venue-card:hover, .vendor-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.package-image, .theme-image, .category-image, .room-image, .venue-image {
  height: 160px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.package-image img, .theme-image img, .category-image img, .room-image img, .venue-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.package-content, .theme-content, .category-info, .room-info, .venue-info, .vendor-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.package-name, .theme-name, .room-number, .venue-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
}
.package-category, .theme-category {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
}
.package-price {
  margin: 10px 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price-current {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}
.price-original {
  font-size: 13px;
  text-decoration: line-through;
  color: var(--gray-400);
}
.package-features {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: var(--gray-600);
}
.package-features li {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.package-features li i {
  color: var(--primary);
  width: 14px;
}
.theme-colors {
  display: flex;
  gap: 6px;
  margin: 10px 0;
}
.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 2px rgba(0,0,0,0.2);
}
.theme-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--gray-200);
  font-size: 12px;
  color: var(--gray-600);
}

/* Stat Cards Login & Activity Aliases */
.stat-card-login, .stat-card-activity {
  background: white;
  border-radius: var(--radius-lg);
  padding: 18px 15px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  min-height: 110px;
  border: 1px solid var(--gray-200);
}
.stat-card-login:hover, .stat-card-activity:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary);
}
.stat-icon-login, .stat-icon-activity {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}
.stat-value-login, .stat-value-activity {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
}
.stat-label-login, .stat-label-activity {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 4px;
}

/* Subscription Plans (No Bullets & Modern Card/Table) */
.plan-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 2px solid var(--gray-200);
  padding: 24px 20px;
  position: relative;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.plan-card.popular {
  border-color: #6366f1;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}
.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}
.plan-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.plan-price {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 4px;
}
.plan-price span {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}
.plan-billing {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 16px;
  min-height: 18px;
}
.plan-features {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 20px 0 !important;
  flex-grow: 1;
}
.plan-features li {
  list-style: none !important;
  list-style-type: none !important;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-700);
  padding: 6px 0;
  border-bottom: 1px dashed var(--gray-100);
}
.plan-features li:last-child {
  border-bottom: none;
}
.plan-features li i {
  color: #10b981;
  font-size: 13px;
  flex-shrink: 0;
}
.current-plan-badge {
  background: var(--success-light);
  color: #059669;
  border: 1px solid #a7f3d0;
  text-align: center;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
}

/* Plan Comparison Table */
.plan-comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}
.plan-comparison-table th {
  background: var(--gray-50);
  padding: 14px 16px;
  font-weight: 700;
  font-size: 13px;
  color: var(--gray-800);
  border-bottom: 2px solid var(--gray-200);
}
.plan-comparison-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.plan-comparison-table tbody tr:hover {
  background: #f8fafc;
}

/* Entity Cards & Satkar Cards (Standardized Card View) */
.satkar-card, .entity-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
}
.satkar-card:hover, .entity-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.satkar-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 10px;
}
.satkar-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 2px;
}
.satkar-card-subtitle {
  font-size: 12px;
  color: var(--gray-500);
  word-break: break-all;
}
.satkar-card-meta {
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.satkar-card-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.satkar-card-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* Progress bar */
.progress-bar-custom {
  background: var(--gray-200);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin: 6px 0;
}
.progress-fill {
  background: linear-gradient(90deg, var(--primary), #818cf8);
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* View Toggle (Table View / Card View) */
.view-toggle-group {
  display: inline-flex;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 2px;
  background: var(--gray-50);
  gap: 2px;
}
.view-toggle-btn {
  border: none;
  background: transparent;
  color: var(--gray-500);
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.view-toggle-btn:hover {
  color: var(--gray-900);
}
.view-toggle-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  font-weight: 700;
}

/* Table Fit Enhancements */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  margin-bottom: 0;
}
.table-fit {
  width: 100%;
  table-layout: auto;
}
.table td, .table th {
  vertical-align: middle;
}
.table .text-nowrap {
  white-space: nowrap !important;
}
.table .action-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* Print Media Optimization */
@media print {
  @page {
    size: auto;
    margin: 10mm;
  }
  body, html {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10pt !important;
  }
  .sidebar, .navbar-custom, .filter-section, .pagination,
  .btn, .btn-group, .view-toggle-group, .modal, .toast,
  .card-header .btn, #sidebarCollapseToggle, .theme-toggle-btn,
  .no-print, [onclick*="Modal"], [data-bs-toggle="modal"],
  .stat-card-login .stat-icon-login, .stat-card-activity .stat-icon-activity {
    display: none !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  .container, .container-fluid, .dashboard-content {
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .card-header {
    border: none !important;
    padding: 10px 0 !important;
  }
  .card-body {
    padding: 0 !important;
  }
  /* Force Table View on Print */
  .card-view-container, .card-mode-view {
    display: none !important;
  }
  .table-view-container, .table-container, .table-responsive {
    display: block !important;
    overflow: visible !important;
    width: 100% !important;
  }
  table.table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 9pt !important;
    page-break-inside: auto !important;
  }
  table.table tr {
    page-break-inside: avoid !important;
    page-break-after: auto !important;
  }
  table.table th, table.table td {
    border: 1px solid #ccc !important;
    padding: 6px 8px !important;
    white-space: normal !important;
    word-break: break-word !important;
    color: #000000 !important;
    background: transparent !important;
  }
  table.table th {
    background-color: #f1f5f9 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    font-weight: 700 !important;
  }
  /* Hide action columns on print */
  .table th:last-child, .table td:last-child {
    display: none !important;
  }
}

/* ==========================================================================
   GLOBAL EVENT & DETAIL MODALS + CALENDAR UI
   ========================================================================== */

/* 1. Calendar Header, Navigation & Upcoming Events Sidebar */
.calendar-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.calendar-nav-buttons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-date-indicator {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.calendar-view-buttons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-wrapper {
  background: #ffffff;
  border-radius: 12px;
  padding: 6px;
}

.calendar-wrapper .fc-event {
  border-radius: 6px !important;
  padding: 2px 6px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  border: none !important;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.calendar-wrapper .fc-event:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

.upcoming-events-list {
  display: flex;
  flex-direction: column;
  max-height: 420px;
  overflow-y: auto;
}

.upcoming-event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

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

.upcoming-event-item:hover {
  background-color: #f8fafc;
}

.upcoming-event-date {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(99, 102, 241, 0.18));
  color: #4f46e5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.upcoming-event-day {
  font-size: 1rem;
  font-weight: 800;
}

.upcoming-event-month {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.upcoming-event-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.upcoming-event-time {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upcoming-event-badge {
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.05);
}

/* 2. Event Details Modal & Global .event-detail-item / .detail-item Pattern */
.event-modal .modal-content,
.detail-modal .modal-content,
.modal .modal-content {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.event-modal .modal-header,
.detail-modal .modal-header {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  padding: 16px 22px;
  border-bottom: none;
}

.event-modal .modal-header .modal-title,
.detail-modal .modal-header .modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-modal .modal-header .btn-close,
.detail-modal .modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.event-modal .modal-header .btn-close:hover,
.detail-modal .modal-header .btn-close:hover {
  opacity: 1;
}

.event-modal#eventModal .modal-body {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  background: #ffffff;
}

@media (max-width: 575.98px) {
  .event-modal#eventModal .modal-body {
    grid-template-columns: 1fr;
  }
}

.event-detail-item,
.detail-item,
.modal-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.event-detail-item:hover,
.detail-item:hover,
.modal-detail-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

/* Location & Description items span full width in the 2-column modal grid */
.event-modal#eventModal .event-detail-item:nth-child(5),
.event-modal#eventModal .event-detail-item:nth-child(6),
.event-detail-item.full-width,
.detail-item.full-width {
  grid-column: 1 / -1;
}

.event-detail-icon,
.detail-icon,
.modal-detail-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin-top: 1px;
}

.event-detail-item:nth-child(1) .event-detail-icon { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.event-detail-item:nth-child(2) .event-detail-icon { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.event-detail-item:nth-child(3) .event-detail-icon { background: rgba(16, 185, 129, 0.12); color: #059669; }
.event-detail-item:nth-child(4) .event-detail-icon { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }
.event-detail-item:nth-child(5) .event-detail-icon { background: rgba(236, 72, 153, 0.12); color: #db2777; }
.event-detail-item:nth-child(6) .event-detail-icon { background: rgba(100, 116, 139, 0.12); color: #475569; }

.event-detail-content,
.detail-content,
.modal-detail-content {
  flex: 1;
  min-width: 0;
}

.event-detail-label,
.detail-label,
.modal-detail-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 3px;
  line-height: 1.2;
}

.event-detail-value,
.detail-value,
.modal-detail-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.45;
  word-break: break-word;
}

/* Status Badges inside Event Modal & View Pages */
.event-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

.event-status-confirmed {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.event-status-pending {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.event-status-in_progress {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.event-status-completed {
  background: #e0e7ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.event-status-cancelled {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* 3. Universal View/Detail Modal Content Styling across all Admin Pages */
.modal-body[id^="view"][id$="Content"],
.modal-body[id$="DetailContent"],
.modal-body #viewEventContent,
.modal-body #viewLeadContent,
.modal-body #viewClientContent,
.modal-body #budgetDetailContent,
.modal-body #documentDetailContent,
.modal-body #onboardingDetailContent,
.modal-body #orderDetailContent {
  padding: 20px 22px;
}

.modal-body[id^="view"][id$="Content"] > .row,
.modal-body[id$="DetailContent"] > .row,
.modal-body [id^="view"][id$="Content"] > .row,
.modal-body [id$="DetailContent"] > .row {
  row-gap: 10px;
}

/* Style label-value columns in View Modals so stacked text looks separated and structured */
.modal-body[id^="view"][id$="Content"] .row > [class*="col-"]:has(> strong:first-child),
.modal-body[id$="DetailContent"] .row > [class*="col-"]:has(> strong:first-child),
.modal-body [id^="view"][id$="Content"] .row > [class*="col-"]:has(> strong:first-child),
.modal-body [id$="DetailContent"] .row > [class*="col-"]:has(> strong:first-child) {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 0 !important;
  font-size: 0.9rem;
  color: #1e293b;
  font-weight: 500;
}

.modal-body[id^="view"][id$="Content"] .row > [class*="col-"] > strong:first-child,
.modal-body[id$="DetailContent"] .row > [class*="col-"] > strong:first-child,
.modal-body [id^="view"][id$="Content"] .row > [class*="col-"] > strong:first-child,
.modal-body [id$="DetailContent"] .row > [class*="col-"] > strong:first-child {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 3px;
}

.modal-body[id^="view"][id$="Content"] .row > [class*="col-"] > .mb-3,
.modal-body[id$="DetailContent"] .row > [class*="col-"] > .mb-3,
.modal-body [id^="view"][id$="Content"] .row > [class*="col-"] > .mb-3,
.modal-body [id$="DetailContent"] .row > [class*="col-"] > .mb-3 {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 4px !important;
}

.modal-body[id^="view"][id$="Content"] .row > [class*="col-"] > .mb-3 > label.text-muted,
.modal-body[id$="DetailContent"] .row > [class*="col-"] > .mb-3 > label.text-muted,
.modal-body [id^="view"][id$="Content"] .row > [class*="col-"] > .mb-3 > label.text-muted,
.modal-body [id$="DetailContent"] .row > [class*="col-"] > .mb-3 > label.text-muted {
  display: block;
  font-size: 0.72rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b !important;
  margin-bottom: 3px;
}

/* ========================================================
   VENUE & ROOM AVAILABILITY CALENDAR STYLES
   ======================================================== */
.venue-select-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 18px;
}
.venue-thumb {
  width: 90px;
  height: 65px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gray-100);
}
.venue-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.venue-info h4 {
  margin: 0 0 4px 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
}
.venue-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-600);
}
.calendar-container {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 24px;
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.calendar-nav h5 {
  font-weight: 700;
  color: var(--gray-900);
  min-width: 170px;
  text-align: center;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.calendar-weekday {
  text-align: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 4px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}
.calendar-day {
  min-height: 95px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  background: white;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
}
.calendar-day:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
  transform: translateY(-2px);
}
.calendar-day.other-month {
  background: #f8fafc;
  color: var(--gray-400);
  opacity: 0.55;
}
.calendar-day.today {
  border: 2px solid var(--primary);
  background: rgba(79, 70, 229, 0.03);
}
.day-number {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gray-800);
}
.calendar-day.today .day-number {
  color: var(--primary);
}
.availability-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  width: 100%;
}
.availability-badge.badge-available {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.availability-badge.badge-booked {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.availability-badge.badge-maintenance {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-600);
}
.availability-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-available { background: #10b981; }
.dot-booked { background: #ef4444; }
.dot-maintenance { background: #f59e0b; }

/* ========================================================
   ATTRACTIVE FINANCE & SYSTEM STAT CARDS
   ======================================================== */
.stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 20px 18px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #818cf8);
  border-radius: 14px 14px 0 0;
  opacity: 0.95;
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.06) 0%, transparent 70%);
  pointer-events: none;
  transition: all 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  border-color: #cbd5e1;
}
.stat-card:hover::after {
  transform: scale(1.3);
}

.stat-card:has(.text-success)::before, .stat-card.stat-card-success::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}
.stat-card:has(.text-success)::after, .stat-card.stat-card-success::after {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
}

.stat-card:has(.text-danger)::before, .stat-card.stat-card-danger::before {
  background: linear-gradient(90deg, #ef4444, #f87171);
}
.stat-card:has(.text-danger)::after, .stat-card.stat-card-danger::after {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.08) 0%, transparent 70%);
}

.stat-card:has(.text-warning)::before, .stat-card.stat-card-warning::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.stat-card:has(.text-warning)::after, .stat-card.stat-card-warning::after {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
}

.stat-card:has(.text-info)::before, .stat-card.stat-card-info::before {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}
.stat-card:has(.text-info)::after, .stat-card.stat-card-info::after {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.08) 0%, transparent 70%);
}

.stat-card:has(.text-primary)::before, .stat-card.stat-card-primary::before {
  background: linear-gradient(90deg, #4f46e5, #6366f1);
}
.stat-card:has(.text-primary)::after, .stat-card.stat-card-primary::after {
  background: radial-gradient(circle, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-top: 6px;
}

/* ========== SATKAR MODAL & CARD STANDARDS ========== */
/* Ensure Insert/Edit Modals are wide and spacious, not narrow/lengthy */
.modal-dialog {
  max-width: 920px;
  margin: 1.75rem auto;
}
.modal-dialog.modal-xl, .modal-dialog.modal-wide {
  max-width: 1140px;
}
.modal-dialog.modal-sm {
  max-width: 380px;
}
.modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
.modal-body {
  max-height: calc(85vh - 140px);
  overflow-y: auto;
  padding: 1.5rem;
}

/* Responsive Cards Grid Standard - prevent vertical single column stacking */
.satkar-card-grid, .card-grid, .cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}
@media (min-width: 1200px) {
  .satkar-card-grid, .card-grid, .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }
}
@media (max-width: 576px) {
  .satkar-card-grid, .card-grid, .cards-grid {
    grid-template-columns: 1fr;
  }
  .modal-dialog {
    max-width: 96%;
    margin: 0.5rem auto;
  }
}

/* ========================================================
   GLOBAL PRINT STYLES FOR CLEAN DATA TABLE FIT
   ======================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10pt !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .sidebar, .main-navbar, .filter-section, .pagination,
  .btn, .btn-group, .modal, .toast-container, .main-footer,
  .view-toggle-group, .btn-close, #pageSizeSelect, .page-size-select,
  .stat-card button, nav {
    display: none !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .dashboard-content {
    padding: 0 !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .card-header {
    background: none !important;
    border-bottom: 2px solid #333 !important;
    padding: 10px 0 !important;
  }
  .card-body {
    padding: 0 !important;
  }
  .table-responsive {
    overflow: visible !important;
    display: block !important;
    width: 100% !important;
  }
  table, .table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 9pt !important;
  }
  table th, table td {
    padding: 6px 8px !important;
    border: 1px solid #ddd !important;
    color: #000 !important;
  }
  table th {
    background-color: #f1f5f9 !important;
    font-weight: 700 !important;
  }
  /* Force Table view to show on print even if in Cards-only mode */
  [id$="TableWrapper"], .table-view-container, #tableView {
    display: block !important;
    visibility: visible !important;
  }
  /* Hide cards on print so table fits cleanly */
  [id$="CardsWrapper"], .card-view-container, #cardView, .room-card, .vendor-card, .booking-card, .task-card {
    display: none !important;
  }
}

/* Activity Log Badges & Styles */
.module-badge {
  display: inline-block;
  padding: 3px 8px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.activity-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.activity-badge.activity-create { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.activity-badge.activity-update { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.activity-badge.activity-delete { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.activity-badge.activity-login  { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.activity-badge.activity-export { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.activity-badge.activity-other  { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.activity-detail {
  max-width: 380px;
  white-space: normal;
  word-break: break-word;
  font-size: 0.85rem;
  line-height: 1.4;
}