* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  --dark-color: #1f2937;
  --light-bg: #f9fafb;
  --border-color: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  background: #f1f5f9;
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 14px;
  overflow: hidden;
  height: 100vh;
}

/* Global scrollbar styling - light and minimal */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(180, 170, 160, 0.12) rgba(180, 170, 160, 0.05);
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: rgba(180, 170, 160, 0.05);
}

*::-webkit-scrollbar-thumb {
  background: rgba(180, 170, 160, 0.12);
  border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 170, 160, 0.18);
}

/* Global form element font sizes */
input, select, textarea {
  font-size: 12px !important;
}

.auth-container {
  max-width: 420px;
  margin: 80px auto;
  padding: 48px;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  animation: fadeInUp 0.5s ease;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.auth-container h1 {
  margin-bottom: 32px;
  text-align: center;
  color: var(--primary-color);
  font-size: 28px;
  font-weight: 700;
}
.btn-login {
  width: 100% !important;
  padding: 14px 24px !important;
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 6px rgba(45, 55, 72, 0.2) !important;
  margin-top: 8px !important;
  display: block !important;
}
.btn-login:hover {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 20px rgba(45, 55, 72, 0.3) !important;
}
form input, form select, form textarea {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}
form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
form textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}
button {
  width: 100%;
  padding: 12px 24px;
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(45, 55, 72, 0.2);
}
button:hover {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(45, 55, 72, 0.3);
}
button:active {
  transform: translateY(0);
}
header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  padding: 0 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

header h1 {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin: 0;
  letter-spacing: 0.3px;
}

#user-info {
  font-size: 13px !important;
  color: white !important;
  font-weight: 500 !important;
  padding-right: 20px !important;
  border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

#my-profile-btn {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  color: white;
  padding: 0;
  width: 32px;
  height: 32px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#my-profile-btn:hover {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  transform: scale(1.08);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#my-profile-btn:active {
  transform: scale(0.98);
}

#logout-btn {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
  padding: 0 16px;
  height: 32px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#logout-btn:hover {
  background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#logout-btn:active {
  transform: translateY(0);
}
.container {
  display: flex;
  max-width: 1400px;
  margin: 24px auto;
  gap: 24px;
  padding: 0 24px;
}
.sidebar {
  width: 260px;
}
.btn-primary {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  margin-bottom: 20px;
  width: auto;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(45, 55, 72, 0.15);
  color: white;
  border: none;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(45, 55, 72, 0.3);
}
.stats {
  background: white;
  padding: 20px;
  border-radius: 8px;
}
.stat-card h3 {
  font-size: 30px;
  color: #007bff;
}
/* CRM Layout with Vertical Sidebar */
.crm-layout {
  display: flex;
  flex-direction: row;
  height: 100vh;
  overflow: hidden;
}
/* Horizontal Navigation */
.main-nav {
  width: 100%;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  padding: 0;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: row;
  gap: 0;
  position: sticky;
  top: 72px;
  z-index: 999;
}
.nav-btn {
  padding: 16px 24px;
  background: transparent;
  border: none;
  border-bottom: 4px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #475569;
  transition: all 0.3s ease;
  position: relative;
  width: auto;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.nav-icon {
  font-size: 16px;
}
.nav-text {
  white-space: nowrap;
}
.nav-btn:hover {
  color: #1e293b;
  background: rgba(0, 0, 0, 0.05);
  border-bottom-color: #94a3b8;
}
.nav-btn.active {
  color: #1e293b;
  border-bottom-color: #475569;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  font-weight: 700;
}
.main-content {
  flex: 1;
  overflow: hidden;
  min-width: 0;
  background: transparent;
  padding: 0;
  position: relative;
  height: 100vh;
  margin-left: 225px;
}
.view-container {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid #e5e7eb;
  margin: 0;
  margin-bottom: 0;
  animation: fadeIn 0.3s ease;
  min-height: calc(100vh - 80px) !important;
  width: 100%;
}
.view-container[style*="display: none"] {
  display: none !important;
}
.view-container[style*="display: block"] {
  display: block !important;
  position: relative !important;
}
.filters {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}
#search {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
#filter-status {
  width: 200px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 20px;
}
.pagination button {
  width: auto;
  padding: 8px 20px;
}
.contact-card {
  background: white;
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.contact-card h3 {
  margin-bottom: 10px;
}
.contact-card .status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}
.status.lead { background: #ffc107; color: #000; }
.status.prospect { background: #17a2b8; color: white; }
.status.customer { background: #28a745; color: white; }
.contact-actions {
  margin-top: 15px;
}
.contact-actions button {
  width: auto;
  padding: 6px 15px;
  margin-right: 10px;
  font-size: 12px;
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  overflow-y: auto;
  padding: 40px 20px;
  align-items: center;
  justify-content: center;
}
.modal[style*="display: block"] {
  display: flex !important;
}
.modal[style*="display: none"] {
  display: none !important;
}
.modal-content {
  background: white;
  margin: auto;
  padding: 20px;
  width: auto;
  min-width: 500px;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow-y: auto;
}
/* Smaller centered modals for settings forms */
#stage-modal .modal-content,
#priority-modal .modal-content,
#industry-modal .modal-content {
  max-width: 600px;
  width: auto;
}
/* Medium-sized modals */
#modal .modal-content {
  max-width: 900px;
  width: auto;
}
/* Employee modal */
#employee-modal .modal-content {
  max-width: 1000px;
  width: auto;
}
/* Lead modal - largest */
#lead-modal .modal-content {
  max-width: 1200px;
  width: auto;
}
/* Lead details modal */
#lead-details-modal .modal-content {
  max-width: 700px;
  width: auto;
}
#lead-details-modal h2 {
  font-size: 20px;
  margin-bottom: 15px;
  font-weight: 600;
}
.close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 32px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  z-index: 10;
  line-height: 1;
  font-weight: 300;
}
.close:hover {
  color: var(--primary-color);
  transform: rotate(90deg);
}
.user-card {
  background: #f8f9fa;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* Role badges - Professional colors */
.status.admin { 
  background: #6366f1;
  color: white;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.15);
}
.status.manager { 
  background: #f59e0b;
  color: white;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.15);
}
.status.user { 
  background: #06b6d4;
  color: white;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(6, 182, 212, 0.15);
}
#admin-section {
  margin-top: 20px;
  padding: 20px;
  background: white;
  border-radius: 8px;
}
#admin-section h3 {
  margin-bottom: 15px;
}
/* Navigation */
/* Vertical Sidebar Navigation */
.main-nav {
  background: #1e293b;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: none;
  width: 220px;
  height: calc(100vh - 20px);
  position: fixed;
  top: 10px;
  left: 5px;
  overflow-y: auto;
  z-index: 100;
  border-radius: 16px;
}

.nav-header {
  padding: 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  border-bottom: 2px solid #334155;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.nav-logo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: none;
}

.nav-title {
  font-size: 11px;
  font-weight: 600;
  color: white;
  margin: 0;
  text-align: center;
  white-space: nowrap;
}

.nav-user-section {
  padding: 0;
  border-bottom: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex: 0;
}

#user-info-nav {
  display: block;
  color: #cbd5e1;
  font-size: 13px !important;
  font-weight: 500;
  margin-bottom: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.nav-user-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin-bottom: 0;
}

#my-profile-btn {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  color: white;
  padding: 0;
  width: 28px;
  height: 28px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex: 0 0 auto;
}

#my-profile-btn:hover {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  transform: scale(1.08);
}

#logout-btn {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  color: white;
  padding: 0;
  width: 28px;
  height: 28px;
  font-size: 16px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex: 0 0 auto;
}

#logout-btn:hover {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  transform: scale(1.08);
}

.nav-section {
  margin-bottom: 0px;
}

.nav-section:first-child {
  margin-top: 0;
}

.nav-section-title {
  padding: 12px 20px 8px 20px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-btn {
  padding: 10px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #cbd5e1;
  transition: all 0.2s ease;
  position: relative;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid transparent;
}

.nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-left-color: #64748b;
}

.nav-btn.active {
  color: #ffffff;
  background: rgba(100, 116, 139, 0.25);
  border-left-color: #64748b;
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  display: inline-block;
}

.nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-arrow {
  font-size: 10px;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.nav-expandable.expanded .nav-arrow {
  transform: rotate(-180deg);
}

.nav-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(0, 0, 0, 0.2);
}

.nav-submenu.expanded {
  max-height: 500px;
}

.nav-btn.nav-sub {
  padding-left: 56px;
  font-size: 13px;
  font-weight: 400;
}

.nav-btn.nav-sub:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-btn.nav-sub.active {
  background: rgba(59, 130, 246, 0.15);
}
/* View Container */
.view-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  background: white !important;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  margin-top: 24px;
  margin-bottom: 24px;
  animation: fadeIn 0.3s ease;
  min-height: 500px !important;
  position: relative !important;
  z-index: 1 !important;
}
/* Full-width view for leads and post-sales */
#leads-view,
#post-sales-dashboard-view {
  max-width: none !important;
  margin: 0 !important;
  padding: 20px !important;
  min-height: calc(100vh - 100px) !important;
  background: white !important;
  border-radius: 12px !important;
  width: 100% !important;
}

/* Lead Management Page - Reduced Font Sizes */
#leads-view .view-header h2 {
  font-size: 16px !important;
}

#leads-view .column-header h3 {
  font-size: 12px !important;
}

#leads-view .lead-actions button {
  height: 36px !important;
  font-size: 12px !important;
  padding: 10px 20px !important;
  border-radius: 6px !important;
}

#leads-view .lead-card h4 {
  font-size: 13px !important;
  margin: 0 0 4px 0 !important;
}

#leads-view .lead-card p {
  font-size: 12px !important;
  margin: 3px 0 !important;
  line-height: 1.2 !important;
}

#leads-view .lead-priority {
  font-size: 11px !important;
  padding: 3px 6px !important;
  margin-top: 4px !important;
}

#leads-view .lead-value {
  font-size: 13px !important;
  margin-top: 4px !important;
}

#leads-view input[type="text"],
#leads-view input[type="search"] {
  font-size: 12px !important;
  padding: 8px 12px !important;
}

#leads-view button {
  font-size: 11px !important;
  padding: 8px 12px !important;
}

#leads-view .btn-icon {
  font-size: 14px !important;
}

/* Constrained width for table-based views */
#contacts-view,
#employees-view,
#lost-leads-view,
#converted-leads-view,
#archived-leads-view,
#post-sales-view,
#settings-view {
  max-width: none !important;
  margin: 0 auto !important;
  padding: 20px !important;
  min-height: calc(100vh - 100px) !important;
  background: white !important;
  border-radius: 12px !important;
  width: auto !important;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}
.view-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.view-header button {
  width: auto;
  margin-bottom: 0;
}

.view-header .btn-primary {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(45, 55, 72, 0.15);
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  color: white;
}
.view-header .btn-secondary {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  background: #6c757d;
  color: white;
}
.view-header button:hover {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  box-shadow: 0 6px 12px rgba(45, 55, 72, 0.25);
}
/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  gap: 10px;
  width: 100%;
}



.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  width: 100%;
}
.stat-card {
  background: white;
  padding: 28px;
  border-radius: 20px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 24px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 3px solid transparent;
  position: relative;
  overflow: hidden;
  font-size: 14px;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  transition: width 0.3s ease;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-card:hover::before {
  width: 10px;
}

.stat-card:hover::after {
  opacity: 1;
}

/* Blue card - Total Customers */
.stat-card.blue {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
  border-color: #bae6fd;
}
.stat-card.blue::before {
  background: linear-gradient(180deg, #0ea5e9, #0284c7);
}
.stat-card.blue:hover {
  border-color: #7dd3fc;
  box-shadow: 0 20px 40px rgba(14, 165, 233, 0.25), 0 8px 16px rgba(14, 165, 233, 0.15);
}

/* Yellow card - Active Leads */
.stat-card.yellow {
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%) !important;
  border-color: #fef08a;
}
.stat-card.yellow::before {
  background: linear-gradient(180deg, #f59e0b, #d97706);
}
.stat-card.yellow:hover {
  border-color: #fde047;
  box-shadow: 0 20px 40px rgba(245, 158, 11, 0.25), 0 8px 16px rgba(245, 158, 11, 0.15);
}

/* Green card - Converted Customers */
.stat-card.green {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
  border-color: #bbf7d0;
}
.stat-card.green::before {
  background: linear-gradient(180deg, #10b981, #059669);
}
.stat-card.green:hover {
  border-color: #86efac;
  box-shadow: 0 20px 40px rgba(16, 185, 129, 0.25), 0 8px 16px rgba(16, 185, 129, 0.15);
}

.stat-icon {
  font-size: 56px;
  opacity: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
  transition: all 0.4s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.15) rotate(8deg);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.2));
}

.stat-info {
  flex: 1;
}

.stat-info h3 {
  font-size: 36px;
  margin: 0 0 6px 0;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
  letter-spacing: -0.5px;
}

.stat-info p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Dashboard Charts */
.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 24px;
}
.chart-card {
  background: white;
  padding: 28px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}
.chart-card:hover {
  box-shadow: var(--shadow-lg);
}
.chart-card h3 {
  margin: 0 0 20px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
/* Pipeline */
.pipeline-stages {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.pipeline-stages::-webkit-scrollbar {
  height: 6px;
}
.pipeline-stages::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
}
.pipeline-stages::-webkit-scrollbar-thumb {
  background: rgba(200, 200, 200, 0.1);
  border-radius: 4px;
}
.pipeline-stages::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 200, 200, 0.1);
}
.pipeline-stage {
  flex: 0 0 auto;
  min-width: 120px;
  text-align: center;
  padding: 20px 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-top: 4px solid #007bff;
}
.stage-header {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
  font-weight: 600;
}
.stage-count {
  font-size: 26px;
  font-weight: bold;
  color: #007bff;
}
.pipeline-arrow {
  font-size: 22px;
  color: #ccc;
  flex-shrink: 0;
}
/* Activity List */
.activity-list {
  max-height: 300px;
  overflow-y: auto;
}

/* Override for Post Sales Dashboard - allow full height */
#post-sales-dashboard-view .activity-list {
  max-height: none !important;
}
.activity-item {
  padding: 12px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-time {
  color: #999;
  font-size: 12px;
}
/* Dashboard Lists */
.dashboard-lists {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.list-card {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.list-card h3 {
  margin: 0 0 15px 0;
}
/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 5px 0;
  width: 100%;
}
.kanban-column {
  min-width: 200px;
  max-width: 250px;
  flex: 1;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 8px;
}
.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #dee2e6;
}
.column-header h3 {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
}
.column-header .count {
  background: #d1fae5;
  color: #065f46;
  padding: 2px 5px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: bold;
}
.column-content {
  min-height: 300px;
}
/* Lead Card */
.lead-card {
  background: white;
  padding: 14px;
  margin-bottom: 8px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s;
}
.lead-card:hover {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
  transform: translateX(4px) !important;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.15) !important;
}

.lead-card h4 {
  margin: 0 0 6px 0;
  font-size: 13px;
  font-weight: 700;
}
.lead-card p {
  margin: 5px 0;
  font-size: 11px;
  color: #000;
  line-height: 1.3;
}
.lead-priority {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: bold;
  margin-top: 6px;
}
.lead-value {
  font-weight: normal;
  font-style: italic;
  color: #059669;
  margin-top: 6px;
  font-size: 14px;
}
/* Responsive */
@media (max-width: 768px) {
  .main-nav {
    flex-wrap: wrap;
  }
  
  .nav-btn {
    flex: 1 1 auto;
    min-width: 120px;
  }
  
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
  
  .dashboard-charts,
  .dashboard-lists {
    grid-template-columns: 1fr;
  }
  
  .kanban-board {
    flex-direction: column;
  }
  
  .lead-actions {
    flex-direction: column;
  }
  
  .lead-actions button {
    width: 100%;
    min-width: auto;
  }
  
  .kanban-column {
    min-width: 100%;
    flex: none;
  }
  
  #leads-view,
  #dashboard-view,
  #post-sales-dashboard-view,
  #contacts-view,
  #employees-view,
  #lost-leads-view,
  #converted-leads-view,
  #archived-leads-view,
  #settings-view {
    margin-left: 8px;
    margin-right: 8px;
    padding: 16px 8px;
  }
}
/* Large Modal */
.modal-content.large {
  max-width: 1200px;
  width: 95%;
  max-height: 95vh;
  overflow-y: auto;
}
#lead-details-modal .modal-content.large {
  width: 90%;
  max-width: 700px;
  height: 85vh !important;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#lead-details-modal h2 {
  font-size: 20px;
  margin-bottom: 20px;
  font-weight: 600;
  flex-shrink: 0;
}
.lead-details-container {
  display: grid;
  gap: 20px;
  flex: 1;
  overflow-y: auto;
  padding-right: 5px;
}
.lead-info-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  flex-shrink: 0;
}
.lead-info-section h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}
.lead-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: 15px;
  width: 100%;
  align-items: stretch;
}
.lead-actions button {
  flex: 1 1 0;
  min-width: 0;
  height: 36px;
  padding: 0 10px !important;
  margin: 0 !important;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s;
  text-align: center;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-actions .btn-secondary {
  background: #4a5568;
  color: white;
}
.lead-actions .btn-secondary:hover {
  background: #2d3748;
}
.lead-actions .btn-primary {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  color: white;
}
.lead-actions .btn-primary:hover {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}
.lead-actions .btn-primary:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}
.lead-actions .btn-danger {
  background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
  color: white;
  border: 1px solid #718096;
}
.lead-actions .btn-danger:hover {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  color: white;
  border-color: #4a5568;
}
.info-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
}
.info-label {
  font-weight: 600;
  width: 160px;
  color: #666;
  font-size: 13px;
}
.info-value {
  flex: 1;
  color: #333;
  font-size: 14px;
}
.history-item {
  padding: 12px;
  background: white;
  border-left: 3px solid #007bff;
  margin-bottom: 8px;
  border-radius: 4px;
  font-size: 13px;
}
.history-item.stage-change {
  border-left-color: #28a745;
}
.history-item.assignment-change {
  border-left-color: #ffc107;
}
.history-time {
  font-size: 12px;
  color: #999;
  margin-top: 5px;
}
.history-duration {
  display: inline-block;
  background: #e9ecef;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  margin-left: 10px;
}
.comment-item {
  padding: 15px;
  background: white;
  border-radius: 4px;
  margin-bottom: 10px;
}
.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.comment-author {
  font-weight: bold;
  color: #007bff;
}
.comment-time {
  font-size: 12px;
  color: #999;
}
.comment-text {
  color: #333;
  line-height: 1.5;
}
#comment-form {
  margin-bottom: 20px;
}
#comment-text {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 10px;
  resize: vertical;
}
.btn-secondary {
  background: #6c757d;
  color: white;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 500;
}
.btn-secondary:hover {
  background: #5a6268;
}
.lead-card-assigned {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}
.lead-followup {
  font-size: 12px;
  font-weight: 500;
  margin-top: 5px;
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.lead-card-overdue {
  border: 2px solid #dc3545 !important;
  background: #fff5f5 !important;
  box-shadow: 0 0 10px rgba(220, 53, 69, 0.2) !important;
  animation: pulse-border 2s infinite;
}
@keyframes pulse-border {
  0%, 100% {
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.2);
  }
  50% {
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.4);
  }
}
.overdue-badge {
  background: #dc3545;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: 0.5px;
}
/* Timeline Enhancements */
.timeline-description {
  font-size: 13px;
  color: #666;
  margin-bottom: 15px;
  font-style: italic;
}
.history-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: white;
  border-left: 4px solid #007bff;
  margin-bottom: 10px;
  border-radius: 4px;
  position: relative;
}
.timeline-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 50%;
}
.timeline-content {
  flex: 1;
}
.comment-item-timeline {
  border-left-color: #6f42c1;
}
.comment-item-timeline .timeline-icon {
  background: #f3e5f5;
}
.history-time {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
  font-weight: normal;
}
.history-duration {
  display: inline-block;
  background: #e7f3ff;
  color: #0066cc;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  margin-top: 8px;
  font-weight: 600;
}
.timeline-note {
  background: #fff3cd;
  border-left: 3px solid #ffc107;
  padding: 10px;
  margin: 10px 0;
  border-radius: 4px;
  font-style: italic;
  color: #856404;
}
.history-item.note-update {
  border-left-color: #ffc107;
}
.history-item.note-update .timeline-icon {
  background: #fff3cd;
}
/* Form Styling */
.form-group {
  margin-bottom: 8px;
}
.form-group label {
  display: block;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 4px;
  color: #000000;
  font-size: 11px;
}
.form-group label .required {
  color: #dc3545;
  font-weight: bold;
  font-style: normal;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 4px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 12px !important;
  transition: border-color 0.3s;
  box-sizing: border-box;
  color: #000000;
  font-weight: 500;
  background: #f9fafb;
  font-style: normal;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: white;
  color: #000000;
}
.form-group textarea {
  min-height: 40px;
  resize: vertical;
  font-family: inherit;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #999;
}
/* Checkbox alignment */
.form-group input[type="checkbox"] {
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle;
  cursor: pointer;
}
.form-group label:has(input[type="checkbox"]) {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 0 !important;
}
.btn-submit {
  width: 100%;
  padding: 14px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.3s;
  margin-top: 10px;
}
.btn-submit:hover {
  background: #0056b3;
}
/* Remove old form input styles that conflict */
form input:not(.form-group input),
form select:not(.form-group select),
form textarea:not(.form-group textarea) {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
/* Modal adjustments for better form display */
.modal-content form {
  max-height: calc(90vh - 120px);
  overflow-y: auto;
  padding-right: 10px;
}
.modal-content form::-webkit-scrollbar {
  width: 6px;
}
.modal-content form::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
}
.modal-content form::-webkit-scrollbar-thumb {
  background: rgba(200, 200, 200, 0.1);
  border-radius: 4px;
}
.modal-content form::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 200, 200, 0.1);
}
/* Employee Management */
.employees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding: 20px 0;
}
.employee-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.employee-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.employee-card.inactive {
  opacity: 0.6;
  background: #f8f9fa;
}
.employee-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}
.employee-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
}
.employee-info h3 {
  margin: 0 0 5px 0;
  font-size: 18px;
  color: #333;
}
.employee-info p {
  margin: 0;
  font-size: 14px;
  color: #666;
}
.employee-details {
  margin-bottom: 15px;
}
.employee-role {
  margin-bottom: 10px;
}
.employee-status {
  margin-bottom: 10px;
}
.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge.active {
  background: #10b981;
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.15);
}
.badge.inactive {
  background: #ef4444;
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.15);
}
.employee-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.employee-meta small {
  color: #999;
  font-size: 12px;
}
.employee-actions {
  display: flex;
  gap: 10px;
}
.employee-actions button {
  flex: 1;
  padding: 8px 12px;
  font-size: 14px;
}
/* Table Styles */
.table-container {
  background: white;
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
}
.customers-table {
  width: auto;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: auto;
  min-width: 100%;
}
.customers-table thead {
  background: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}
.customers-table th {
  padding: 15px 12px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  white-space: normal;
  vertical-align: middle;
  min-width: 100px;
}
/* Center Actions column header */
.customers-table th:last-child {
  text-align: center !important;
}
.customers-table tbody tr {
  border-bottom: 1px solid #dee2e6;
  transition: background-color 0.2s;
}
.customers-table tbody tr:hover {
  background-color: #f8f9fa;
}
.customers-table td {
  padding: 12px;
  color: #212529;
  vertical-align: middle;
}
.customers-table td strong {
  color: #007bff;
}
.table-actions {
  white-space: nowrap;
  text-align: center !important;
}
/* Center the Actions column header */
.customers-table th:last-child {
  text-align: center !important;
}
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 5px 8px;
  transition: transform 0.2s;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.btn-icon:hover {
  transform: scale(1.2);
}
.btn-icon.btn-danger:hover {
  filter: brightness(1.2);
}
.table-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: stretch;
}
.table-filters input,
.table-filters select,
.table-filters .btn-secondary,
.table-filters button {
  padding: 0 12px !important;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px !important;
  height: 38px !important;
  line-height: 38px !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.table-filters input {
  flex: 1;
  min-width: 200px;
  justify-content: flex-start !important;
}
.table-filters select {
  min-width: 120px;
  justify-content: flex-start !important;
  padding-right: 30px !important;
}
.table-filters .btn-secondary,
.table-filters button {
  background: #6c757d !important;
  color: white !important;
  border: 1px solid #6c757d !important;
  cursor: pointer;
  white-space: nowrap;
  width: auto;
  padding: 0 14px !important;
}
.table-filters .btn-secondary:hover {
  background: #5a6268;
}
/* Responsive table */
@media (max-width: 768px) {
  .table-container {
    overflow-x: scroll;
  }
  
  .customers-table {
    min-width: 800px;
  }
  
  .table-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .table-filters input,
  .table-filters select,
  .table-filters .btn-secondary {
    width: 100%;
  }
}
/* Status badges in table */
.customers-table .status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  text-transform: capitalize;
}
/* Inactive row styling */
.inactive-row {
  opacity: 0.6;
  background-color: #f8f9fa;
}
.inactive-row:hover {
  opacity: 0.8;
}
/* Badge styles for settings tables */
.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge.active {
  background: #10b981;
  color: white;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.15);
}
.badge.inactive {
  background: #ef4444;
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.15);
}
/* Settings Tabs */
.settings-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  transition: all 0.3s;
  width: auto;
}
.settings-tab:hover {
  color: #007bff;
  background: #f8f9fa;
}
.settings-tab.active {
  color: #007bff;
  border-bottom-color: #007bff;
  background: none;
}
.settings-section {
  animation: fadeIn 0.3s ease-in;
}

#settings-view .btn-primary {
  margin-bottom: 5px !important;
}

/* CRITICAL: Force settings tables to center actions */
#settings-view .settings-section table.customers-table tbody td.table-actions {
  text-align: center !important;
  vertical-align: middle !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
#settings-view .settings-section table.customers-table thead th:last-child {
  text-align: center !important;
}
/* Ensure settings tables have same alignment as other tables */
.settings-section .table-actions {
  text-align: center !important;
  vertical-align: middle !important;
}
.settings-section .customers-table th:last-child {
  text-align: center !important;
}
.settings-section .customers-table thead th:last-child {
  text-align: center !important;
}
.settings-section .btn-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
}
/* Archived Tabs (same style as settings tabs) */
.archived-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  transition: all 0.3s;
  width: auto;
}
.archived-tab:hover {
  color: #007bff;
  background: #f8f9fa;
}
.archived-tab.active {
  color: #007bff;
  border-bottom-color: #007bff;
  background: none;
}
.archived-section {
  animation: fadeIn 0.3s ease-in;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.lead-timeline-section,
.lead-notes-section,
.lead-activity-notes-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  max-height: 500px;
  overflow: hidden;
  flex-shrink: 0;
}
.lead-timeline-section h3,
.lead-notes-section h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
}
/* Lead Detail Tabs */
.lead-detail-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #666;
  transition: all 0.3s;
  width: auto;
  flex-shrink: 0;
}
.lead-detail-tab:hover {
  color: #2d3748;
  background: #f8f9fa;
}
.lead-detail-tab.active {
  color: #2d3748;
  border-bottom-color: #2d3748;
  background: none;
}
.lead-detail-tab-content {
  animation: fadeIn 0.3s ease-in;
  height: 420px;
  overflow-y: auto;
  flex: 1;
  padding-right: 5px;
}
.timeline-description {
  flex-shrink: 0;
  margin-bottom: 12px;
  font-size: 13px;
}
.timeline-description {
  font-size: 12px;
  color: #666;
  margin-bottom: 12px;
  font-style: italic;
}
.timeline-item {
  padding: 12px;
  margin-bottom: 10px;
  background: white;
  border-radius: 6px;
  border-left: 3px solid #007bff;
  font-size: 14px;
}
.timeline-item strong {
  font-size: 14px;
  color: #333;
}
.timeline-item small {
  font-size: 12px;
  color: #999;
}
#comment-form {
  margin-bottom: 8px;
  display: block;
}
#comment-form textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  display: block;
  box-sizing: border-box;
  margin-bottom: 10px;
}
.comment-form-actions {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px !important;
  margin-top: 8px !important;
  align-items: center !important;
  justify-content: flex-start !important;
}
#comment-form button[type="submit"],
#comment-form .btn-add-note,
button.btn-add-note {
  padding: 10px 20px !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  display: inline-block !important;
  transition: all 0.3s !important;
  white-space: nowrap !important;
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
  color: white !important;
  flex: 0 0 120px !important;
  max-width: 120px !important;
  width: 120px !important;
  visibility: visible !important;
  opacity: 1 !important;
}
#comment-form button[type="submit"]:hover,
#comment-form .btn-add-note:hover,
button.btn-add-note:hover {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
}
#comment-form button[type="button"],
#comment-form .btn-clear-note,
button.btn-clear-note {
  padding: 10px 20px !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  display: inline-block !important;
  transition: all 0.3s !important;
  white-space: nowrap !important;
  background: #6c757d !important;
  color: white !important;
  flex: 0 0 100px !important;
  max-width: 100px !important;
  width: 100px !important;
  visibility: visible !important;
  opacity: 1 !important;
}
#comment-form button[type="button"]:hover,
#comment-form .btn-clear-note:hover,
button.btn-clear-note:hover {
  background: #5a6268 !important;
}
.comment-item {
  padding: 12px;
  margin-bottom: 10px;
  background: white;
  border-radius: 6px;
  font-size: 14px;
  border-left: 3px solid #28a745;
}
.comment-item strong {
  font-size: 14px;
  color: #333;
}
.comment-item small {
  font-size: 12px;
  color: #999;
}
/* Company suggestions dropdown */
.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.suggestion-item {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}
.suggestion-item:hover {
  background: #f8f9fa;
}
.suggestion-item:last-child {
  border-bottom: none;
}
.suggestion-company {
  font-weight: 600;
  color: #333;
}
.suggestion-contact {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
}
.form-group {
  position: relative;
}
/* Dashboard Follow-up Items */
.followup-item {
  cursor: pointer;
  transition: all 0.2s;
}
.followup-item:hover {
  background: #f8f9fa;
  transform: translateX(5px);
}
.followup-item.followup-today {
  border-left: 3px solid #dc3545;
  background: #fff5f5;
}
.followup-item.followup-tomorrow {
  border-left: 3px solid #ff6b6b;
  background: #fff9f9;
}
.followup-item.followup-soon {
  border-left: 3px solid #ffa500;
  background: #fffaf0;
}
.followup-item.followup-overdue {
  border-left: 4px solid #fca5a5;
  background: #fff5f5;
  animation: pulse-overdue 2s infinite;
}
@keyframes pulse-overdue {
  0%, 100% {
    background: #fff5f5;
  }
  50% {
    background: #ffe6e6;
  }
}
.missed-followups-card {
}
.missed-followups-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Enhanced Button Styles */
.btn-secondary {
  background: var(--text-secondary) !important;
  color: white !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  box-shadow: var(--shadow-sm) !important;
}
.btn-secondary:hover {
  background: var(--dark-color) !important;
  transform: translateY(-1px) !important;
  box-shadow: var(--shadow-md) !important;
}
.btn-danger {
  background: linear-gradient(135deg, #718096 0%, #4a5568 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}
.btn-danger:hover {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
  color: white !important;
}
.btn-submit {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
  padding: 14px 24px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 6px rgba(45, 55, 72, 0.2) !important;
  border: none !important;
  color: white !important;
}
.btn-submit:hover {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 20px rgba(45, 55, 72, 0.3) !important;
}
/* Enhanced Table Styles */
.customers-table {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
}
.customers-table thead {
  background: linear-gradient(135deg, #2c3e50, #34495e);
}
.customers-table thead th {
  color: white !important;
  font-weight: 600 !important;
  padding: 12px 16px !important;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.8px;
  border-bottom: 3px solid #3498db;
}
/* Center Actions column header */
.customers-table thead th:last-child {
  text-align: center !important;
}
.customers-table tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid #ecf0f1;
  background: white;
}
.customers-table tbody tr:nth-child(even) {
  background: #f8f9fa;
}
.customers-table tbody tr:hover {
  background: linear-gradient(90deg, #e3f2fd 0%, #f5f5f5 100%);
  transform: translateX(2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.customers-table tbody td {
  padding: 10px 12px !important;
  color: #2c3e50;
  font-size: 11px;
}
/* Center Actions column cells */
.customers-table tbody td.table-actions {
  text-align: center !important;
  vertical-align: middle !important;
}
.customers-table tbody td strong {
  color: #2980b9;
  font-weight: 600;
}
/* Enhanced Modal Styles */
.modal-content {
  border-radius: 16px !important;
  box-shadow: var(--shadow-xl) !important;
  border: 1px solid var(--border-color) !important;
  animation: modalSlideIn 0.3s ease !important;
}
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.modal-content h2 {
  color: #2d3748 !important;
  font-weight: 700 !important;
  margin-bottom: 12px !important;
  padding-bottom: 8px !important;
  border-bottom: 2px solid #4a5568 !important;
  font-size: 20px !important;
  margin-top: 0 !important;
}
/* Enhanced Form Groups */
.form-group {
  margin-bottom: 12px !important;
}
.form-group label {
  font-weight: 500 !important;
  font-style: italic !important;
  color: #000000 !important;
  margin-bottom: 6px !important;
  display: block !important;
  font-size: 13px !important;
}
/* Enhanced Badges */
.badge {
  padding: 6px 16px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}
.badge.active {
  background: #10b981 !important;
  color: white !important;
  font-weight: 600 !important;
  padding: 6px 16px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.15) !important;
  text-transform: uppercase !important;
}
.badge.inactive {
  background: #ef4444 !important;
  color: white !important;
  font-weight: 600 !important;
  padding: 6px 16px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.15) !important;
  text-transform: uppercase !important;
}
/* Enhanced Status Badges */
.status {
  padding: 6px 12px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: capitalize !important;
}
/* Enhanced List Cards */
.list-card {
  background: white !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-md) !important;
  border: 1px solid var(--border-color) !important;
  transition: all 0.3s ease !important;
}
.list-card:hover {
  box-shadow: var(--shadow-lg) !important;
  transform: translateY(-2px) !important;
}
.list-card h3 {
  font-weight: 700 !important;
  font-size: 18px !important;
  color: var(--text-primary) !important;
}

/* Dashboard-specific overrides */
#dashboard-view .list-card h3 {
  font-size: 14px !important;
}

/* Enhanced Activity Items */
.activity-item {
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
  border: 1px solid var(--border-color) !important;
}
.activity-item:hover {
  background: var(--light-bg) !important;
  transform: translateX(4px) !important;
  box-shadow: var(--shadow-sm) !important;
}
/* Enhanced Kanban Board */
.kanban-column {
  background: var(--light-bg) !important;
  border-radius: 12px !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-sm) !important;
}
.kanban-column .column-header {
  background: white !important;
  border-radius: 12px 12px 0 0 !important;
  border-bottom: 2px solid var(--border-color) !important;
}
.lead-card {
  background: white !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid var(--border-color) !important;
  transition: all 0.2s ease !important;
}
.lead-card:hover {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
  transform: translateX(4px) !important;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.15) !important;
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(200, 200, 200, 0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 200, 200, 0.1);
}
/* Horizontal Form Layout */
.modal-content form {
  display: flex;
  flex-direction: column;
  max-height: none;
  overflow: visible;
}
.form-fields-container {
  flex: 1;
  overflow-y: visible;
  padding-right: 0;
  margin-bottom: 0;
  max-height: none;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.form-row.two-col {
  grid-template-columns: repeat(2, 1fr);
}
.form-row.full-width {
  grid-template-columns: 1fr;
}
.form-row .form-group {
  margin-bottom: 0 !important;
}
.form-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid #e5e7eb;
  padding-bottom: 2px;
  position: relative;
  bottom: auto;
  background: white;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  border-radius: 0;
  flex-shrink: 0;
  z-index: 10;
}
.form-actions button {
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
  height: 34px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  flex: none !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  text-align: center !important;
  margin: 0 !important;
}
.form-actions .btn-submit,
.form-actions .btn-cancel,
.form-actions .btn-save {
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
  height: 34px !important;
  font-size: 12px !important;
  flex: none !important;
  padding: 0 !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
  text-align: center !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}
.form-actions .btn-submit {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
  color: white !important;
  border: 2px solid #4a5568 !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.form-actions .btn-submit:hover {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
  border-color: #2d3748 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 20px rgba(45, 55, 72, 0.3) !important;
}
.form-actions .btn-cancel {
  background: linear-gradient(135deg, #718096 0%, #4a5568 100%) !important;
  color: white !important;
  border: 2px solid #718096 !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.form-actions .btn-cancel:hover {
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
  border-color: #4a5568 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 20px rgba(74, 85, 104, 0.3) !important;
}
/* Show form action buttons, hide default submit (except login button) */
form button[type="submit"]:not(.form-actions button):not(.btn-login) {
  display: none !important;
}
.form-actions button[type="submit"] {
  display: block !important;
}

/* Product Modal Specific Spacing */
#product-modal .form-row {
  margin-bottom: 16px !important;
}
#product-modal .form-group {
  margin-bottom: 0 !important;
}
#product-modal .form-fields-container {
  margin-bottom: 0 !important;
}
#product-modal .form-actions {
  margin-top: 20px !important;
  padding-top: 20px !important;
}

/* Responsive form layout */
@media (max-width: 1200px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-row.two-col {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .form-row,
  .form-row.two-col {
    grid-template-columns: 1fr;
  }
  
  .modal {
    padding: 20px 10px;
    align-items: flex-start;
  }
  
  .modal-content {
    width: 95%;
    min-width: auto;
    padding: 24px 16px;
    max-height: 90vh;
    margin-top: 20px;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .form-actions button {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
  }
}
/* Deleted Leads Table - Remove conflicting styles */
#deleted-leads-table {
  table-layout: auto !important;
  width: 100% !important;
}
#deleted-leads-table thead tr,
#deleted-leads-table tbody tr {
  display: table-row !important;
}
#deleted-leads-table th,
#deleted-leads-table td {
  display: table-cell !important;
  padding: 12px !important;
  vertical-align: middle !important;
}
/* Critical Leads Card */
.critical-leads-card {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
}
.critical-lead-item {
  transition: all 0.2s ease !important;
  padding: 12px !important;
  margin-bottom: 8px !important;
  border-radius: 8px !important;
  background: #f0fdf4 !important;
}
.critical-lead-item:nth-child(even) {
  background: #ffffff !important;
}
.critical-lead-item:hover {
  background: #dcfce7 !important;
  transform: translateX(4px) !important;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.15) !important;
}
/* FINAL OVERRIDE - Force center alignment for all action columns */
table.customers-table td.table-actions,
#stages-list td.table-actions,
#priorities-list td.table-actions,
#industries-list td.table-actions,
#employees-list td.table-actions,
#converted-leads-list td.table-actions,
#lost-leads-list td.table-actions,
#deleted-leads-list td.table-actions,
#contacts-list td.table-actions {
  text-align: center !important;
  vertical-align: middle !important;
}
/* Force ALL td elements with table-actions class to center */
td.table-actions {
  text-align: center !important;
  vertical-align: middle !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
/* Force center alignment for action column headers */
table.customers-table thead th:last-child,
#stages-list th:last-child,
#priorities-list th:last-child,
#industries-list th:last-child {
  text-align: center !important;
}
/* Force button alignment */
.table-actions .btn-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 2px !important;
}
/* Additional specificity for settings tables */
.settings-section table td.table-actions {
  text-align: center !important;
  vertical-align: middle !important;
}
.settings-section .table-actions {
  text-align: center !important;
}
/* Override any inherited text-align */
.customers-table tbody tr td.table-actions {
  text-align: center !important;
}
/* EMERGENCY FIX - Maximum specificity for settings tables */
#settings-view #stages-section table.customers-table tbody#stages-list tr td.table-actions,
#settings-view #priorities-section table.customers-table tbody#priorities-list tr td.table-actions,
#settings-view #industries-section table.customers-table tbody#industries-list tr td.table-actions {
  text-align: center !important;
  vertical-align: middle !important;
  background-color: transparent !important;
}
#settings-view #stages-section table.customers-table tbody#stages-list tr td.table-actions button,
#settings-view #priorities-section table.customers-table tbody#priorities-list tr td.table-actions button,
#settings-view #industries-section table.customers-table tbody#industries-list tr td.table-actions button {
  margin: 0 auto !important;
  display: inline-block !important;
}
/* FINAL FIX - Force buttons in settings tables to be inline-block */
#stages-list td[align="center"] button.btn-icon,
#priorities-list td[align="center"] button.btn-icon,
#industries-list td[align="center"] button.btn-icon {
  display: inline-block !important;
  float: none !important;
  position: static !important;
}
/* Settings tables - ensure consistent button alignment */
#stages-list td[style*="text-align:center"],
#priorities-list td[style*="text-align:center"],
#industries-list td[style*="text-align:center"] {
  text-align: center !important;
  padding: 12px !important;
}
#stages-list td[style*="text-align:center"] .btn-icon,
#priorities-list td[style*="text-align:center"] .btn-icon,
#industries-list td[style*="text-align:center"] .btn-icon {
  margin: 0 3px !important;
}
/* STANDARDIZE ALL PAGES - Consistent fonts and styling */
/* All view containers should have consistent styling */
.view-container {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: var(--text-primary) !important;
}
/* Standardize all table fonts */
.customers-table,
.customers-table td,
.customers-table th {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif !important;
  font-size: 13px !important;
}
/* Standardize all headings */
.view-header h2,
h2, h3, h4 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
}
.view-header h2 {
  font-size: 16px !important;
}

/* Dashboard specific header size */
#dashboard-view .view-header h2 {
  font-size: 16px !important;
}
h3 {
  font-size: 18px !important;
}
/* Standardize all buttons */
button, .btn-primary, .btn-secondary, .btn-icon {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif !important;
  font-size: 12px !important;
}
.btn-icon {
  font-size: 18px !important;
}
/* Standardize all inputs and forms */
input, select, textarea {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif !important;
  font-size: 14px !important;
}
/* Standardize table headers */
.customers-table thead th {
  font-size: 10px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
}

/* Post Sales table - smaller fonts for better fit */
#post-sales-view .customers-table thead th {
  font-size: 11px !important;
  padding: 10px 8px !important;
}

#post-sales-view .customers-table tbody td {
  font-size: 12px !important;
  padding: 10px 8px !important;
}
/* Standardize all cards and containers */
.stat-card, .chart-card, .list-card, .employee-card {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif !important;
}
/* Standardize dashboard stats */
.stat-info h3 {
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #475569 !important;
}

/* Dashboard-specific stat overrides */
#dashboard-view .stat-info h3 {
  font-size: 16px !important;
  color: #000 !important;
}

#dashboard-view .stat-icon {
  font-size: 22px !important;
}

#dashboard-view .stat-info p {
  font-size: 12px !important;
  color: #000 !important;
}

.stat-info p {
  font-size: 14px !important;
  font-weight: 500 !important;
}
/* Standardize modal content */
.modal-content {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif !important;
  font-size: 12px !important;
}
.modal-content h2 {
  font-size: 20px !important;
  font-weight: 700 !important;
  margin-bottom: 12px !important;
  padding-bottom: 8px !important;
  border-bottom: 2px solid #4a5568 !important;
  color: #2d3748 !important;
}
/* Standardize badges and labels */
.badge, .status, .lead-priority {
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}
/* Ensure consistent padding and spacing */
.view-container {
  padding: 24px !important;
}
.table-container {
  margin-top: 20px !important;
}
/* Consistent button styling across all pages */
.view-header button {
  font-size: 11px !important;
  padding: 6px 12px !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
  color: white !important;
}
.view-header button:hover {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%) !important;
}
/* Toast Notification System */
#toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  min-width: 300px;
  max-width: 500px;
  padding: 16px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: all;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid #4a5568;
  position: relative;
  overflow: hidden;
}
.toast::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #4a5568;
  animation: toastProgress 3s linear;
}
@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}
@keyframes toastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}
.toast.toast-success {
  border-left-color: #10b981;
}
.toast.toast-success::before {
  background: #10b981;
}
.toast.toast-error {
  border-left-color: #ef4444;
}
.toast.toast-error::before {
  background: #ef4444;
}
.toast.toast-warning {
  border-left-color: #f59e0b;
}
.toast.toast-warning::before {
  background: #f59e0b;
}
.toast.toast-info {
  border-left-color: #3b82f6;
}
.toast.toast-info::before {
  background: #3b82f6;
}
.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.toast-content {
  flex: 1;
}
.toast-title {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
  margin-bottom: 2px;
}
.toast-message {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}
.toast-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.toast-close:hover {
  background: #f3f4f6;
  color: #4b5563;
  transform: none;
  box-shadow: none;
}
.toast.removing {
  animation: slideOutRight 0.3s ease-out forwards;
}
/* Custom Confirmation Dialog */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}
.confirm-dialog {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  min-width: 400px;
  max-width: 500px;
  animation: scaleIn 0.3s ease-out;
  overflow: hidden;
}
@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.confirm-header {
  padding: 24px 24px 16px 24px;
  border-bottom: 2px solid #e5e7eb;
}
.confirm-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}
.confirm-body {
  padding: 24px;
}
.confirm-body p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #4b5563;
}
.confirm-footer {
  padding: 16px 24px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.confirm-btn {
  padding: 10px 24px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border: 2px solid transparent !important;
  min-width: 100px !important;
  width: auto !important;
}
.confirm-btn-cancel {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%) !important;
  color: #374151 !important;
  border: 2px solid #9ca3af !important;
}
.confirm-btn-cancel:hover {
  background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}
.confirm-btn-ok {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
  color: white !important;
  border: 2px solid #374151 !important;
}
.confirm-btn-ok:hover {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(75, 85, 99, 0.3) !important;
}
.confirm-btn-ok.danger {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
  border: 2px solid #374151 !important;
  color: white !important;
}
.confirm-btn-ok.danger:hover {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
  box-shadow: 0 4px 12px rgba(75, 85, 99, 0.3) !important;
}
/* Sortable Table Headers */
.customers-table thead th.sortable,
.leads-table thead th.sortable,
.employees-table thead th.sortable,
.post-sales-table thead th.sortable,
table thead th.sortable {
  cursor: pointer !important;
  user-select: none;
  position: relative !important;
  padding-right: 30px !important;
}
.customers-table thead th.sortable:hover,
.leads-table thead th.sortable:hover,
.employees-table thead th.sortable:hover,
.post-sales-table thead th.sortable:hover,
table thead th.sortable:hover {
  background: linear-gradient(135deg, #1a252f, #2c3e50) !important;
}
.customers-table thead th.sortable::after,
.leads-table thead th.sortable::after,
.employees-table thead th.sortable::after,
.post-sales-table thead th.sortable::after,
table thead th.sortable::after {
  content: '' !important;
  display: none !important;
}
.customers-table thead th.sortable.sort-asc::after,
.leads-table thead th.sortable.sort-asc::after,
.employees-table thead th.sortable.sort-asc::after,
.post-sales-table thead th.sortable.sort-asc::after,
table thead th.sortable.sort-asc::after {
  content: '' !important;
  display: none !important;
}
.customers-table thead th.sortable.sort-desc::after,
.leads-table thead th.sortable.sort-desc::after,
.employees-table thead th.sortable.sort-desc::after,
.post-sales-table thead th.sortable.sort-desc::after,
table thead th.sortable.sort-desc::after {
  content: '' !important;
  display: none !important;
}
/* Professional Action Buttons */
.btn-action {
  padding: 6px 12px !important;
  border-radius: 6px !important;

#employees-table td.table-actions {
  white-space: normal !important;
  overflow: visible !important;
}

#employees-list td.table-actions {
  white-space: normal !important;
  overflow: visible !important;
}

/* Force employees table action buttons to wrap */
#employees-list .btn-action {
  white-space: normal !important;
  word-wrap: break-word !important;
  min-width: 75px !important;
  max-width: 90px !important;
}

#employees-table .btn-action {
  white-space: normal !important;
  word-wrap: break-word !important;
  min-width: 75px !important;
  max-width: 90px !important;
}

/* Employees table column widths - use min-width for better control */
.employees-table {
  table-layout: auto;
  width: 100%;
  min-width: 1000px;
}

#employees-table {
  table-layout: auto;
  width: 100%;
  min-width: 1000px;
}

#employees-table th:nth-child(1),
#employees-table td:nth-child(1) { min-width: 100px; } /* Username */
#employees-table th:nth-child(2),
#employees-table td:nth-child(2) { min-width: 200px; } /* Email */
#employees-table th:nth-child(3),
#employees-table td:nth-child(3) { min-width: 110px; } /* Phone */
#employees-table th:nth-child(4),
#employees-table td:nth-child(4) { min-width: 80px; max-width: 100px; } /* Location */
#employees-table th:nth-child(5),
#employees-table td:nth-child(5) { min-width: 80px; } /* Role */
#employees-table th:nth-child(6),
#employees-table td:nth-child(6) { min-width: 70px; } /* Status */
#employees-table th:nth-child(7),
#employees-table td:nth-child(7) { min-width: 100px; text-align: center; } /* Edit */
#employees-table th:nth-child(8),
#employees-table td:nth-child(8) { min-width: 120px; text-align: center; } /* Action */

.employees-table th:nth-child(1),
.employees-table td:nth-child(1) { min-width: 100px; } /* Username */
.employees-table th:nth-child(2),
.employees-table td:nth-child(2) { min-width: 200px; } /* Email */
.employees-table th:nth-child(3),
.employees-table td:nth-child(3) { min-width: 110px; } /* Phone */
.employees-table th:nth-child(4),
.employees-table td:nth-child(4) { min-width: 80px; max-width: 100px; } /* Location */
.employees-table th:nth-child(5),
.employees-table td:nth-child(5) { min-width: 80px; } /* Role */
.employees-table th:nth-child(6),
.employees-table td:nth-child(6) { min-width: 70px; } /* Status */
.employees-table th:nth-child(7),
.employees-table td:nth-child(7) { min-width: 100px; text-align: center; } /* Edit */
.employees-table th:nth-child(8),
.employees-table td:nth-child(8) { min-width: 120px; text-align: center; } /* Action */

.employees-table th,
.employees-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employees-table th:nth-child(7),
.employees-table th:nth-child(8),
.employees-table td:nth-child(7),
.employees-table td:nth-child(8) {
  white-space: nowrap !important;
  overflow: visible !important;
}

#employees-table th,
#employees-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#employees-table th:nth-child(7),
#employees-table th:nth-child(8),
#employees-table td:nth-child(7),
#employees-table td:nth-child(8) {
  white-space: nowrap !important;
  overflow: visible !important;
}

/* Make employees table container scrollable if needed */
#employees-view .table-container {
  overflow-x: auto;
}

/* Pagination styles */
.pagination-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  margin-bottom: 0;
}

.pagination-left-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-right-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pagination-text {
  font-size: 13px;
  color: #64748b;
  font-weight: 400;
}

.pagination-dropdown {
  padding: 6px 28px 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.pagination-dropdown:hover {
  border-color: #94a3b8;
}

.pagination-dropdown:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pagination-arrow {
  padding: 4px 12px;
  border: 1px solid #cbd5e1;
  background: white;
  color: #475569;
  border-radius: 6px;
  font-size: 20px;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
}

.pagination-arrow:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #1e293b;
}

.pagination-arrow-disabled {
  padding: 4px 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #cbd5e1;
  border-radius: 6px;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
  cursor: not-allowed;
}


#employees-table td.table-actions {
  white-space: normal !important;
  overflow: visible !important;
}

#employees-list td.table-actions {
  white-space: normal !important;
  overflow: visible !important;
}

/* Professional Action Buttons */
.btn-action {
  padding: 6px 10px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border: 1px solid #e2e8f0 !important;
  min-width: 80px !important;
  width: auto !important;
  display: inline-block !important;
  text-transform: none !important;
  letter-spacing: 0px !important;
  white-space: nowrap !important;
  line-height: 1.4 !important;
}
.btn-action-edit {
  background: #f8fafc !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
}
.btn-action-edit:hover {
  background: #f1f5f9 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(148, 163, 184, 0.15) !important;
  border-color: #cbd5e1 !important;
}
.btn-action-delete {
  background: #f8fafc !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
}
.btn-action-delete:hover {
  background: #f1f5f9 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(148, 163, 184, 0.15) !important;
  border-color: #cbd5e1 !important;
}
.btn-action-activate {
  background: #f8fafc !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
}
.btn-action-activate:hover {
  background: #f1f5f9 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(148, 163, 184, 0.15) !important;
  border-color: #cbd5e1 !important;
}
.btn-action-deactivate {
  background: #f8fafc !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
}
.btn-action-deactivate:hover {
  background: #f1f5f9 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(148, 163, 184, 0.15) !important;
  border-color: #cbd5e1 !important;
}
.btn-action-view {
  background: #f8fafc !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0 !important;
}
.btn-action-view:hover {
  background: #f1f5f9 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(148, 163, 184, 0.15) !important;
  border-color: #cbd5e1 !important;
}
.btn-action-disabled {
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%) !important;
  color: #cbd5e1 !important;
  cursor: not-allowed !important;
  border-color: #f1f5f9 !important;
}
.btn-action-disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}


/* FORCE LIGHT GREY BUTTONS - HIGHEST PRIORITY */
table .btn-action.btn-action-edit,
.customers-table .btn-action.btn-action-edit,
.table-actions .btn-action.btn-action-edit {
  background: #ffffff !important;
  color: #94a3b8 !important;
  border: 1px solid #e2e8f0 !important;
}

table .btn-action.btn-action-edit:hover,
.customers-table .btn-action.btn-action-edit:hover,
.table-actions .btn-action.btn-action-edit:hover {
  background: #f8fafc !important;
  color: #64748b !important;
}

table .btn-action.btn-action-delete,
.customers-table .btn-action.btn-action-delete,
.table-actions .btn-action.btn-action-delete {
  background: #ffffff !important;
  color: #94a3b8 !important;
  border: 1px solid #e2e8f0 !important;
}

table .btn-action.btn-action-delete:hover,
.customers-table .btn-action.btn-action-delete:hover,
.table-actions .btn-action.btn-action-delete:hover {
  background: #f8fafc !important;
  color: #64748b !important;
}

table .btn-action.btn-action-activate,
.customers-table .btn-action.btn-action-activate,
.table-actions .btn-action.btn-action-activate {
  background: #ffffff !important;
  color: #94a3b8 !important;
  border: 1px solid #e2e8f0 !important;
}

table .btn-action.btn-action-activate:hover,
.customers-table .btn-action.btn-action-activate:hover,
.table-actions .btn-action.btn-action-activate:hover {
  background: #f8fafc !important;
  color: #64748b !important;
}

table .btn-action.btn-action-deactivate,
.customers-table .btn-action.btn-action-deactivate,
.table-actions .btn-action.btn-action-deactivate {
  background: #ffffff !important;
  color: #94a3b8 !important;
  border: 1px solid #e2e8f0 !important;
}

table .btn-action.btn-action-deactivate:hover,
.customers-table .btn-action.btn-action-deactivate:hover,
.table-actions .btn-action.btn-action-deactivate:hover {
  background: #f8fafc !important;
  color: #64748b !important;
}


/* Override Critical Leads Card with light green */
.critical-leads-card {
  border-left: 4px solid #10b981 !important;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%) !important;
}

/* View mode styling for lead details */
.form-group .view-value {
  padding: 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  font-size: 14px;
  color: #212529;
  font-weight: 500;
  min-height: 44px;
  display: flex;
  align-items: center;
}


/* Increase gap between lead items in dashboard */
.lead-item,
.critical-lead-item,
.missed-followup-item,
.upcoming-followup-item {
  margin-bottom: 16px !important;
}


/* Increase gap between all dashboard list items - OVERRIDE */
#critical-leads-list .activity-item,
#critical-leads-list .critical-lead-item,
#missed-followups-list .activity-item,
#upcoming-followups-list .activity-item,
.activity-item {
  margin-bottom: 16px !important;
}

/* Remove margin from last item */
#critical-leads-list .activity-item:last-child,
#critical-leads-list .critical-lead-item:last-child,
#missed-followups-list .activity-item:last-child,
#upcoming-followups-list .activity-item:last-child {
  margin-bottom: 0 !important;
}


/* Alternating colors for critical lead items - matching upcoming followups */
#critical-leads-list .critical-lead-item {
  cursor: pointer !important;
  transition: all 0.2s !important;
  padding: 12px !important;
  margin-bottom: 10px !important;
  border-radius: 8px !important;
  border-left: 3px solid #10b981 !important;
}

#critical-leads-list .critical-lead-item:nth-child(odd) {
  background: #f0fdf4 !important;
}

#critical-leads-list .critical-lead-item:nth-child(even) {
  background: #ffffff !important;
}

#critical-leads-list .critical-lead-item:hover {
  background: #dcfce7 !important;
  transform: translateX(5px) !important;
}


/* Apply blue theme to upcoming followups - matching critical leads style */
#followups-list .followup-item {
  cursor: pointer !important;
  transition: all 0.2s !important;
  padding: 12px !important;
  margin-bottom: 10px !important;
  border-radius: 8px !important;
  border-left: 3px solid #3b82f6 !important;
}

#followups-list .followup-item:nth-child(odd) {
  background: #eff6ff !important;
}

#followups-list .followup-item:nth-child(even) {
  background: #ffffff !important;
}

#followups-list .followup-item:hover {
  background: #dbeafe !important;
  transform: translateX(5px) !important;
}

/* Override specific followup classes to use blue theme */
#followups-list .followup-item.followup-today,
#followups-list .followup-item.followup-tomorrow,
#followups-list .followup-item.followup-soon {
  border-left: 3px solid #3b82f6 !important;
}


/* Apply pink/red theme to missed followups - matching other sections style */
#missed-followups-list .followup-item {
  cursor: pointer !important;
  transition: all 0.2s !important;
  padding: 12px !important;
  margin-bottom: 10px !important;
  border-radius: 8px !important;
  border-left: 3px solid #ef4444 !important;
}

#missed-followups-list .followup-item:nth-child(odd) {
  background: #fef2f2 !important;
}

#missed-followups-list .followup-item:nth-child(even) {
  background: #ffffff !important;
}

#missed-followups-list .followup-item:hover {
  background: #fee2e2 !important;
  transform: translateX(5px) !important;
}


/* FINAL OVERRIDE - Remove old followup-item backgrounds */
.followup-item.followup-today,
.followup-item.followup-tomorrow,
.followup-item.followup-soon,
.followup-item.followup-overdue {
  background: none !important;
}


/* Fix sticky navigation overlap - add padding to view containers */
.view-container {
  padding-top: 15px !important;
  margin-top: 0px !important;
}

/* Ensure first child elements don't get cut off */
.view-container > h2:first-child,
.view-container > .view-header:first-child,
.view-container > .dashboard-grid:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}


/* Post Sales Status Badges - Priority Badge Style */
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.3px;
  border: 1px solid;
}

/* Order Status Badges */
.status-ordered {
  background-color: #f59e0b20;
  color: #f59e0b;
  border-color: #f59e0b;
}

.status-partially_committed {
  background-color: #fb923c20;
  color: #fb923c;
  border-color: #fb923c;
}

.status-committed {
  background-color: #3b82f620;
  color: #3b82f6;
  border-color: #3b82f6;
}

.status-dispatched_from_factory {
  background-color: #06b6d420;
  color: #06b6d4;
  border-color: #06b6d4;
}

.status-in_transit {
  background-color: #8b5cf620;
  color: #8b5cf6;
  border-color: #8b5cf6;
}

.status-product_received {
  background-color: #10b98120;
  color: #10b981;
  border-color: #10b981;
}

.status-installation_scheduled {
  background-color: #14b8a620;
  color: #14b8a6;
  border-color: #14b8a6;
}

.status-installation_in_progress {
  background-color: #3b82f620;
  color: #3b82f6;
  border-color: #3b82f6;
}

.status-on_hold {
  background-color: #6b728020;
  color: #6b7280;
  border-color: #6b7280;
}

.status-damaged {
  background-color: #ef444420;
  color: #ef4444;
  border-color: #ef4444;
}

.status-return {
  background-color: #dc262620;
  color: #dc2626;
  border-color: #dc2626;
}

.status-completed_fully {
  background-color: #10b98120;
  color: #10b981;
  border-color: #10b981;
}

/* Payment Status Badges */
.status-paid {
  background-color: #10b98120;
  color: #10b981;
  border-color: #10b981;
}

.status-partially_paid {
  background-color: #f59e0b20;
  color: #f59e0b;
  border-color: #f59e0b;
}

.status-pending {
  background-color: #f59e0b20;
  color: #f59e0b;
  border-color: #f59e0b;
}

/* Legacy Status Badges */
.status-in_progress {
  background-color: #3b82f620;
  color: #3b82f6;
  border-color: #3b82f6;
}

.status-completed {
  background-color: #10b98120;
  color: #10b981;
  border-color: #10b981;
}

.status-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

/* Post Sales Info Section */
.info-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.info-section h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 10px;
}

.info-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  width: 180px;
  color: #666;
  font-size: 13px;
}

.info-value {
  flex: 1;
  color: #333;
  font-size: 14px;
}


/* Autocomplete Search Results */
.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: none;
}

.autocomplete-results.show {
  display: block;
}

.autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.autocomplete-item:hover {
  background: #f8f9fa;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item-name {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.autocomplete-item-details {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.autocomplete-no-results {
  padding: 10px 12px;
  color: #999;
  font-size: 13px;
  text-align: center;
}

.form-group {
  position: relative;
}

/* Post Sales Customer Search - Clean Design */
.customer-search-container {
  position: relative;
  width: 100%;
}

#post-sale-customer-search {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

#post-sale-customer-search:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

#post-sale-customer-search.has-selection {
  display: none;
}

.customer-results-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: white;
  border: 2px solid #3b82f6;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  z-index: 1000;
}

.customer-results-dropdown.show {
  display: block;
}

.customer-result-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #e5e7eb;
  transition: all 0.2s ease;
  background: white;
  position: relative;
}

.customer-result-item:hover {
  background: linear-gradient(90deg, #dbeafe 0%, #bfdbfe 100%);
  border-left: 4px solid #3b82f6;
  padding-left: 12px;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.customer-result-item:last-child {
  border-bottom: none;
}

.customer-result-item:first-child {
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.customer-result-item:last-child {
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.customer-result-name {
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
  font-size: 14px;
}

.customer-result-item:hover .customer-result-name {
  color: #1e40af;
}

.customer-result-details {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

.customer-result-item:hover .customer-result-details {
  color: #3b82f6;
}

.customer-result-no-results {
  padding: 20px 16px;
  text-align: center;
  color: #9ca3af;
  font-style: italic;
  font-size: 13px;
}

.selected-customer-badge {
  display: none;
  margin-top: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 2px solid #10b981;
  border-radius: 8px;
  animation: slideDown 0.3s ease;
}

.selected-customer-badge.show {
  display: block;
}

.selected-customer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.selected-customer-name {
  font-weight: 600;
  color: #065f46;
  margin-bottom: 4px;
  font-size: 15px;
}

.selected-customer-details {
  font-size: 12px;
  color: #047857;
  line-height: 1.5;
}

.btn-clear-customer {
  padding: 8px 16px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-clear-customer:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.btn-new-customer {
  padding: 5px 12px !important;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2) !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  max-width: fit-content !important;
  min-width: auto !important;
  height: 26px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}

button.btn-new-customer {
  width: auto !important;
  max-width: fit-content !important;
  padding: 5px 12px !important;
}

.btn-new-customer:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3) !important;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Customer Details Display Box */
.customer-details-box {
  padding: 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #3b82f6;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.customer-detail-item {
  font-size: 14px;
  color: #1e40af;
}

.customer-detail-item strong {
  color: #1e3a8a;
  font-weight: 600;
  margin-right: 8px;
}

.customer-detail-item span {
  color: #1e40af;
}


.btn-create-customer {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-create-customer:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.btn-create-customer:active {
  transform: translateY(0);
}


/* Small Create Customer Button (Top Right) */
.btn-create-customer-small {
  padding: 6px 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-create-customer-small:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.btn-create-customer-small:active {
  transform: translateY(0);
}


.btn-add-new-small {
  padding: 4px 10px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-add-new-small:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

#post-sale-customer {
  height: 150px !important;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px;
}

#post-sale-customer option {
  padding: 8px;
  border-bottom: 1px solid #f3f4f6;
}

#post-sale-customer option:hover {
  background: #f9fafb;
}

#post-sale-customer option:first-child {
  color: #9ca3af;
  font-style: italic;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid #e5e7eb;
}

.btn-cancel {
  padding: 0 12px;
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  min-width: 100px;
  width: 100px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn-cancel:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.btn-save {
  padding: 0 12px;
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(45, 55, 72, 0.2);
  min-width: 100px;
  width: 100px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn-save:hover {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(45, 55, 72, 0.3);
}

/* Force override for new customer button - must be at end */
#post-sale-form .btn-new-customer,
button.btn-new-customer[type="button"],
.form-group .btn-new-customer,
.form-group button.btn-new-customer {
  width: auto !important;
  max-width: fit-content !important;
  min-width: auto !important;
  padding: 5px 12px !important;
  height: 26px !important;
  display: inline-flex !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  line-height: 1 !important;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 5px !important;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2) !important;
}


/* Post Sale Form - Italic Labels Style */
#post-sale-form .form-group label {
  font-style: italic;
  font-weight: 500;
  color: #000000;
  font-size: 11px !important;
  margin-bottom: 6px;
}

#post-sale-form .form-group input,
#post-sale-form .form-group select,
#post-sale-form .form-group textarea {
  color: #000000;
  font-weight: 500;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  font-style: normal;
  font-size: 12px !important;
}

#post-sale-form .form-group input:focus,
#post-sale-form .form-group select:focus,
#post-sale-form .form-group textarea:focus {
  background: white;
  border-color: #3b82f6;
  color: #000000;
}

#post-sale-form .customer-label-row label {
  font-style: italic;
  font-weight: 500;
  color: #000000;
  font-size: 11px !important;
}

#post-sale-form .customer-search-input {
  color: #000000;
  font-weight: 500;
  background: #f9fafb;
  font-style: normal;
}

#post-sale-form .customer-search-input:focus {
  background: white;
  color: #000000;
}


/* Readonly field styling - matches input fields */
.readonly-field {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  color: #000000;
  font-weight: 500;
  background: #f9fafb;
  font-style: normal;
  min-height: 46px;
  display: flex;
  align-items: center;
  line-height: 1.5;
}

/* Top Scrollbar for Kanban Board */
.top-scroll-wrapper {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  height: 6px !important;
  min-height: 6px !important;
  margin-bottom: 6px !important;
  background: transparent !important;
  border: none !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.top-scroll-wrapper::-webkit-scrollbar {
  height: 4px;
}

.top-scroll-wrapper::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

.top-scroll-wrapper::-webkit-scrollbar-thumb {
  background: rgba(200, 200, 200, 0.1);
  border-radius: 3px;
}

.top-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 200, 200, 0.1);
}

.top-scroll-content {
  height: 1px !important;
  background: transparent !important;
  display: block !important;
}

.kanban-board {
  overflow-x: auto;
}


/* CRITICAL: Force font size reduction on all form elements */
* input,
* select,
* textarea {
  font-size: 12px !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif !important;
}

.modal-content input,
.modal-content select,
.modal-content textarea,
.modal input,
.modal select,
.modal textarea,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="password"],
input[type="number"],
select,
textarea {
  font-size: 12px !important;
}

/* Force font size on disabled and readonly inputs */
input:disabled,
input[disabled],
input[readonly],
select:disabled,
select[disabled],
textarea:disabled,
textarea[readonly],
.modal input:disabled,
.modal input[disabled],
.modal input[readonly],
.modal select:disabled,
.modal select[disabled],
.modal textarea:disabled,
.modal textarea[readonly] {
  font-size: 12px !important;
}

/* Force label font size */
* label {
  font-size: 11px !important;
}

.modal-content label,
.modal label,
.form-group label,
label {
  font-size: 11px !important;
}

/* Force modal heading size */
.modal-content h2,
.modal h2,
#employee-modal h2,
#modal h2,
#post-sale-modal h2,
#modal-title,
#employee-modal-title,
#post-sale-modal-title,
#lead-modal-title,
#stage-modal-title,
#priority-modal-title,
#industry-modal-title,
#business-type-modal-title,
#post-sale-type-modal-title,
#post-sale-status-modal-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  margin-bottom: 16px !important;
  padding-bottom: 10px !important;
  border-bottom: 2px solid #4a5568 !important;
  color: #2d3748 !important;
  margin-top: 0 !important;
}


/* ULTIMATE OVERRIDE - Post Sale Form Font Sizes */
#post-sale-modal input,
#post-sale-modal select,
#post-sale-modal textarea,
#post-sale-modal .form-group input,
#post-sale-modal .form-group select,
#post-sale-modal .form-group textarea,
#post-sale-form input,
#post-sale-form select,
#post-sale-form textarea {
  font-size: 12px !important;
}

#post-sale-modal label,
#post-sale-modal .form-group label,
#post-sale-form label,
#post-sale-form .form-group label {
  font-size: 11px !important;
}

/* Customer modal font sizes */
#modal input,
#modal select,
#modal textarea,
#modal .form-group input,
#modal .form-group select,
#modal .form-group textarea {
  font-size: 12px !important;
}

#modal label,
#modal .form-group label {
  font-size: 11px !important;
}

/* Employee modal font sizes */
#employee-modal input,
#employee-modal select,
#employee-modal textarea,
#employee-modal .form-group input,
#employee-modal .form-group select,
#employee-modal .form-group textarea {
  font-size: 12px !important;
}

#employee-modal label,
#employee-modal .form-group label {
  font-size: 11px !important;
}


/* Dashboard page specific adjustments */
#dashboard-view .stat-card h3,
#dashboard-view .stat-info h3 {
  font-size: 36px !important;
  color: #1e293b !important;
}

#dashboard-view .stat-icon {
  font-size: 48px !important;
}

#dashboard-view .stat-info p {
  font-size: 14px !important;
  color: #64748b !important;
}

#dashboard-view .chart-card h3,
#dashboard-view .list-card h3 {
  font-size: 14px !important;
}

#dashboard-view {
  font-size: 12px !important;
}

#dashboard-view .stat-card {
  font-size: 14px !important;
  padding: 24px !important;
  gap: 20px !important;
}

/* Dashboard leads sections - reduced font sizes */
#dashboard-view .list-card p,
#dashboard-view .list-card .lead-card p,
#dashboard-view .list-card div {
  font-size: 14px !important;
}

#dashboard-view .list-card h4,
#dashboard-view .list-card .lead-card h4 {
  font-size: 14px !important;
}

#dashboard-view .list-card .lead-priority {
  font-size: 8px !important;
  padding: 2px 4px !important;
}

/* Post Sales Dashboard page specific font size reductions */
#post-sales-dashboard-view .stat-card h3,
#post-sales-dashboard-view .stat-info h3 {
  font-size: 14px !important;
}

#post-sales-dashboard-view .stat-icon {
  font-size: 18px !important;
}

#post-sales-dashboard-view .stat-info p {
  font-size: 9px !important;
}

#post-sales-dashboard-view .list-card h3 {
  font-size: 14px !important;
}

#post-sales-dashboard-view {
  font-size: 12px !important;
}

#post-sales-dashboard-view .view-header h2 {
  font-size: 16px !important;
  font-weight: 600 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

#post-sales-dashboard-view .list-card p,
#post-sales-dashboard-view .list-card div {
  font-size: 12px !important;
}

#post-sales-dashboard-view .activity-item strong {
  font-size: 13px !important;
}

#post-sales-dashboard-view .activity-item small {
  font-size: 11px !important;
}
}


/* Hide archived leads tabs when navigating from sidebar */
#archived-leads-view.hide-tabs .archived-tab {
  display: none !important;
}

#archived-leads-view.hide-tabs > div:nth-child(2) {
  display: none !important;
}

#post-sales-dashboard-view .view-header {
  padding: 15px 20px !important;
  margin-bottom: 10px !important;
  margin-top: 0 !important;
}

#post-sales-dashboard-view {
  padding-top: 0 !important;
}

/* Post Sales Dashboard hover effects */
.dashboard-item-hover:hover {
  background: #e0f2fe !important;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Clickable table rows */
.clickable-row:hover {
  background-color: #f0f9ff !important;
  transition: background-color 0.2s ease;
}

/* ========================================
   DASHBOARD FIXED HEIGHT LAYOUT
   ======================================== */

/* Dashboard container - fixed height matching navigation (only when visible) */
#dashboard-view:not([style*="display: none"]) {
  height: calc(100vh - 20px) !important;
  margin: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  background: white !important;
  border-radius: 12px !important;
  padding: 20px !important;
  max-width: none !important;
  width: calc(100% - 20px) !important;
}

/* Dashboard header - fixed at top */
#dashboard-view:not([style*="display: none"]) .view-header {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

#dashboard-view:not([style*="display: none"]) .view-header h2 {
  margin: 0 !important;
  font-size: 20px !important;
}

/* Dashboard grid - scrollable content area */
#dashboard-view:not([style*="display: none"]) .dashboard-grid {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 15px !important;
}

/* Dashboard stats - fixed at top of scrollable area */
#dashboard-view:not([style*="display: none"]) .dashboard-stats {
  flex-shrink: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 15px !important;
}

/* Dashboard lists - takes remaining space with minimum height */
#dashboard-view:not([style*="display: none"]) .dashboard-lists {
  flex: 1 !important;
  min-height: 500px !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 15px !important;
  align-items: stretch !important;
}

/* Priority Breakdown spans full width on second row */
#dashboard-view:not([style*="display: none"]) .lead-status-breakdown {
  grid-column: 1 / -1 !important;
}

/* List cards - each card is scrollable */
#dashboard-view:not([style*="display: none"]) .list-card {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 15px !important;
  min-height: 0 !important;
}

/* List card headers - fixed */
#dashboard-view:not([style*="display: none"]) .list-card h3 {
  flex-shrink: 0 !important;
  margin: 0 0 12px 0 !important;
  font-size: 14px !important;
}

/* List card content - scrollable */
#dashboard-view:not([style*="display: none"]) .list-card > div {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}


/* ========================================
   LEAD MANAGEMENT FIXED HEIGHT LAYOUT
   ======================================== */

/* Lead Management container - fixed height matching navigation (only when visible) */
#leads-view:not([style*="display: none"]) {
  height: calc(100vh - 20px) !important;
  margin: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  background: white !important;
  border-radius: 12px !important;
  padding: 20px !important;
  max-width: none !important;
  width: calc(100% - 20px) !important;
}

/* Lead Management header - fixed at top */
#leads-view:not([style*="display: none"]) .view-header {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

/* Table filters - fixed below header */
#leads-view:not([style*="display: none"]) .table-filters {
  flex-shrink: 0 !important;
  margin-bottom: 10px !important;
}

/* Top scroll wrapper - fixed */
#leads-view:not([style*="display: none"]) .top-scroll-wrapper {
  flex-shrink: 0 !important;
}

/* Kanban board - scrollable content area */
#leads-view:not([style*="display: none"]) .kanban-board {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  display: flex !important;
  gap: 15px !important;
}

/* Kanban columns - full height with scrollable content */
#leads-view:not([style*="display: none"]) .kanban-column {
  flex: 0 0 280px !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  background: #f8fafc !important;
  border-radius: 8px !important;
  padding: 12px !important;
}

/* Column header - fixed at top of column */
#leads-view:not([style*="display: none"]) .kanban-column .column-header {
  flex-shrink: 0 !important;
  margin-bottom: 10px !important;
}

/* Column content - scrollable */
#leads-view:not([style*="display: none"]) .kanban-column .column-content {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}


/* ========================================
   ARCHIVED LEADS FIXED HEIGHT LAYOUT
   ======================================== */

/* Archived Leads container - fixed height matching navigation (only when visible) */
#archived-leads-view:not([style*="display: none"]) {
  height: calc(100vh - 20px) !important;
  margin: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  background: white !important;
  border-radius: 12px !important;
  padding: 20px !important;
  max-width: none !important;
  width: calc(100% - 20px) !important;
}

/* Archived Leads header - fixed at top */
#archived-leads-view:not([style*="display: none"]) .view-header {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

/* Tab buttons container - fixed below header */
#archived-leads-view:not([style*="display: none"]) > div:nth-child(2) {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

/* Archived sections - scrollable content area (only when visible) */
#archived-leads-view:not([style*="display: none"]) .archived-section:not([style*="display: none"]) {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Table filters - fixed at top of section */
#archived-leads-view:not([style*="display: none"]) .archived-section:not([style*="display: none"]) .table-filters {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

/* Table container - scrollable */
#archived-leads-view:not([style*="display: none"]) .archived-section:not([style*="display: none"]) .table-container {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  padding-bottom: 20px !important;
}

/* Ensure table takes full width and shows all columns */
#archived-leads-view:not([style*="display: none"]) .archived-section:not([style*="display: none"]) .table-container table {
  width: 100% !important;
  table-layout: fixed !important;
}

/* Optimized column widths for archived leads tables */
#archived-leads-view:not([style*="display: none"]) .archived-section:not([style*="display: none"]) .table-container table th,
#archived-leads-view:not([style*="display: none"]) .archived-section:not([style*="display: none"]) .table-container table td {
  padding: 8px 10px !important;
  font-size: 13px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Specific column widths for active leads (10 columns) */
#active-leads-table th:nth-child(1), #active-leads-table td:nth-child(1) { width: 12%; } /* Company */
#active-leads-table th:nth-child(2), #active-leads-table td:nth-child(2) { width: 10%; } /* Contact */
#active-leads-table th:nth-child(3), #active-leads-table td:nth-child(3) { width: 12%; } /* Email */
#active-leads-table th:nth-child(4), #active-leads-table td:nth-child(4) { width: 10%; } /* Phone */
#active-leads-table th:nth-child(5), #active-leads-table td:nth-child(5) { width: 8%; } /* Stage */
#active-leads-table th:nth-child(6), #active-leads-table td:nth-child(6) { width: 8%; } /* Priority */
#active-leads-table th:nth-child(7), #active-leads-table td:nth-child(7) { width: 10%; } /* Assigned */
#active-leads-table th:nth-child(8), #active-leads-table td:nth-child(8) { width: 9%; } /* Created Date */
#active-leads-table th:nth-child(9), #active-leads-table td:nth-child(9) { width: 9%; } /* Last Updated */
#active-leads-table th:nth-child(10), #active-leads-table td:nth-child(10) { width: 7%; text-align: center; } /* Actions */

/* Specific column widths for converted leads (10 columns) */
#converted-leads-table th:nth-child(1), #converted-leads-table td:nth-child(1) { width: 12%; } /* Company */
#converted-leads-table th:nth-child(2), #converted-leads-table td:nth-child(2) { width: 10%; } /* Contact */
#converted-leads-table th:nth-child(3), #converted-leads-table td:nth-child(3) { width: 12%; } /* Email */
#converted-leads-table th:nth-child(4), #converted-leads-table td:nth-child(4) { width: 10%; } /* Phone */
#converted-leads-table th:nth-child(5), #converted-leads-table td:nth-child(5) { width: 10%; } /* Value */
#converted-leads-table th:nth-child(6), #converted-leads-table td:nth-child(6) { width: 8%; } /* Priority */
#converted-leads-table th:nth-child(7), #converted-leads-table td:nth-child(7) { width: 10%; } /* Assigned */
#converted-leads-table th:nth-child(8), #converted-leads-table td:nth-child(8) { width: 9%; } /* Created Date */
#converted-leads-table th:nth-child(9), #converted-leads-table td:nth-child(9) { width: 9%; } /* Converted Date */
#converted-leads-table th:nth-child(10), #converted-leads-table td:nth-child(10) { width: 7%; text-align: center; } /* Actions */

/* Specific column widths for lost leads (10 columns) */
#lost-leads-table th:nth-child(1), #lost-leads-table td:nth-child(1) { width: 13%; } /* Company */
#lost-leads-table th:nth-child(2), #lost-leads-table td:nth-child(2) { width: 11%; } /* Contact */
#lost-leads-table th:nth-child(3), #lost-leads-table td:nth-child(3) { width: 13%; } /* Email */
#lost-leads-table th:nth-child(4), #lost-leads-table td:nth-child(4) { width: 10%; } /* Phone */
#lost-leads-table th:nth-child(5), #lost-leads-table td:nth-child(5) { width: 8%; } /* Priority */
#lost-leads-table th:nth-child(6), #lost-leads-table td:nth-child(6) { width: 10%; } /* Assigned */
#lost-leads-table th:nth-child(7), #lost-leads-table td:nth-child(7) { width: 9%; } /* Created Date */
#lost-leads-table th:nth-child(8), #lost-leads-table td:nth-child(8) { width: 9%; } /* Lost Date */
#lost-leads-table th:nth-child(9), #lost-leads-table td:nth-child(9) { width: 10%; } /* Notes */
#lost-leads-table th:nth-child(10), #lost-leads-table td:nth-child(10) { width: 7%; text-align: center; } /* Actions */

/* Specific column widths for deleted leads (10 columns) */
#deleted-leads-table th:nth-child(1), #deleted-leads-table td:nth-child(1) { width: 13%; } /* Company */
#deleted-leads-table th:nth-child(2), #deleted-leads-table td:nth-child(2) { width: 11%; } /* Contact */
#deleted-leads-table th:nth-child(3), #deleted-leads-table td:nth-child(3) { width: 13%; } /* Email */
#deleted-leads-table th:nth-child(4), #deleted-leads-table td:nth-child(4) { width: 10%; } /* Phone */
#deleted-leads-table th:nth-child(5), #deleted-leads-table td:nth-child(5) { width: 8%; } /* Stage */
#deleted-leads-table th:nth-child(6), #deleted-leads-table td:nth-child(6) { width: 8%; } /* Priority */
#deleted-leads-table th:nth-child(7), #deleted-leads-table td:nth-child(7) { width: 10%; } /* Assigned */
#deleted-leads-table th:nth-child(8), #deleted-leads-table td:nth-child(8) { width: 9%; } /* Created Date */
#deleted-leads-table th:nth-child(9), #deleted-leads-table td:nth-child(9) { width: 9%; } /* Deleted Date */
#deleted-leads-table th:nth-child(10), #deleted-leads-table td:nth-child(10) { width: 7%; text-align: center; } /* Actions */


/* ========================================
   CUSTOMERS FIXED HEIGHT LAYOUT
   ======================================== */

/* Customers container - fixed height matching navigation (only when visible) */
#contacts-view:not([style*="display: none"]) {
  height: calc(100vh - 20px) !important;
  margin: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  background: white !important;
  border-radius: 12px !important;
  padding: 20px !important;
  max-width: none !important;
  width: calc(100% - 20px) !important;
}

#contacts-view:not([style*="display: none"]) .view-header {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

#contacts-view:not([style*="display: none"]) .table-filters {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

#contacts-view:not([style*="display: none"]) .table-container {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding-bottom: 20px !important;
}


/* ========================================
   POST SALES DASHBOARD FIXED HEIGHT LAYOUT
   ======================================== */

#post-sales-dashboard-view:not([style*="display: none"]) {
  height: calc(100vh - 20px) !important;
  margin: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  background: white !important;
  border-radius: 12px !important;
  padding: 15px !important;
  max-width: 100% !important;
  width: calc(100% - 20px) !important;
}

#post-sales-dashboard-view:not([style*="display: none"]) .view-header {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

#post-sales-dashboard-view:not([style*="display: none"]) .dashboard-grid {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  grid-auto-rows: auto !important;
  gap: 15px !important;
  align-content: start !important;
  align-items: start !important;
  padding-bottom: 15px !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#post-sales-dashboard-view:not([style*="display: none"]) .list-card {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 18px !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

/* Status Breakdown spans only 1 column (half width) with smaller height */
#post-sales-dashboard-view:not([style*="display: none"]) .list-card.status-breakdown {
  grid-column: span 1 !important;
  max-height: 400px !important;
  height: 400px !important;
  margin-bottom: 40px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* Status Breakdown h3 */
#post-sales-dashboard-view:not([style*="display: none"]) .list-card.status-breakdown h3 {
  flex-shrink: 0 !important;
  margin: 0 0 15px 0 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* Status Breakdown activity list with constrained height */
#post-sales-dashboard-view:not([style*="display: none"]) .list-card.status-breakdown .activity-list {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Increase height for Upcoming Installations and Recent Sales to 600px */
#post-sales-dashboard-view:not([style*="display: none"]) .list-card.upcoming-installations {
  max-height: 600px !important;
  height: 600px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#post-sales-dashboard-view:not([style*="display: none"]) .list-card.recent-sales {
  max-height: 600px !important;
  height: 600px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#post-sales-dashboard-view:not([style*="display: none"]) .list-card.upcoming-installations h3,
#post-sales-dashboard-view:not([style*="display: none"]) .list-card.recent-sales h3 {
  flex-shrink: 0 !important;
  margin: 0 0 15px 0 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

#post-sales-dashboard-view:not([style*="display: none"]) .list-card h3 {
  flex-shrink: 0 !important;
  margin: 0 0 15px 0 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* Activity list for tall cards (Upcoming Installations and Recent Sales) */
#post-sales-dashboard-view:not([style*="display: none"]) .list-card.upcoming-installations .activity-list,
#post-sales-dashboard-view:not([style*="display: none"]) .list-card.recent-sales .activity-list {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Increase content size for all activity items */
#post-sales-dashboard-view:not([style*="display: none"]) .activity-item {
  font-size: 12px !important;
  line-height: 1.3 !important;
  padding: 8px !important;
  margin-bottom: 6px !important;
  overflow: hidden !important;
  word-wrap: break-word !important;
  margin-bottom: 6px !important;
}

#post-sales-dashboard-view:not([style*="display: none"]) .activity-item strong {
  font-size: 13px !important;
}

#post-sales-dashboard-view:not([style*="display: none"]) .activity-item small {
  font-size: 11px !important;
}

/* Make scrollbar very light for post sales dashboard grid */
#post-sales-dashboard-view:not([style*="display: none"]) .dashboard-grid::-webkit-scrollbar {
  width: 6px !important;
}

#post-sales-dashboard-view:not([style*="display: none"]) .dashboard-grid::-webkit-scrollbar-track {
  background: rgba(180, 170, 160, 0.05) !important;
}

#post-sales-dashboard-view:not([style*="display: none"]) .dashboard-grid::-webkit-scrollbar-thumb {
  background: rgba(180, 170, 160, 0.12) !important;
  border-radius: 3px !important;
}

#post-sales-dashboard-view:not([style*="display: none"]) .dashboard-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 170, 160, 0.18) !important;
}

/* Make scrollbar very light for post sales dashboard activity lists */
#post-sales-dashboard-view:not([style*="display: none"]) .list-card .activity-list::-webkit-scrollbar {
  width: 6px !important;
}

#post-sales-dashboard-view:not([style*="display: none"]) .list-card .activity-list::-webkit-scrollbar-track {
  background: rgba(180, 170, 160, 0.05) !important;
}

#post-sales-dashboard-view:not([style*="display: none"]) .list-card .activity-list::-webkit-scrollbar-thumb {
  background: rgba(180, 170, 160, 0.12) !important;
  border-radius: 3px !important;
}

#post-sales-dashboard-view:not([style*="display: none"]) .list-card .activity-list::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 170, 160, 0.18) !important;
}


/* ========================================
   POST SALES MANAGEMENT FIXED HEIGHT LAYOUT
   ======================================== */

#post-sales-view:not([style*="display: none"]) {
  height: calc(100vh - 20px) !important;
  margin: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  background: white !important;
  border-radius: 12px !important;
  padding: 20px !important;
  max-width: none !important;
  width: calc(100% - 20px) !important;
}

#post-sales-view:not([style*="display: none"]) .view-header {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

#post-sales-view:not([style*="display: none"]) .table-filters {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

#post-sales-view:not([style*="display: none"]) .table-container {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  padding-bottom: 20px !important;
}

/* Post Sales table - optimize column widths */
#post-sales-table {
  width: 100% !important;
  table-layout: auto !important;
}

#post-sales-table thead {
  background: linear-gradient(135deg, #2c3e50, #34495e) !important;
}

#post-sales-table thead th {
  color: white !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
  letter-spacing: 0.8px !important;
  border-bottom: 3px solid #3498db !important;
  padding: 12px 10px !important;
  white-space: nowrap !important;
}

#post-sales-table th,
#post-sales-table td {
  padding: 10px 8px !important;
  font-size: 12px !important;
}

/* Specific column widths for better visibility */
#post-sales-table th:nth-child(1), /* Customer */
#post-sales-table td:nth-child(1) { 
  min-width: 150px !important;
  max-width: 200px !important;
}

#post-sales-table th:nth-child(2), /* Product/Service */
#post-sales-table td:nth-child(2) { 
  min-width: 180px !important;
  max-width: 250px !important;
}

#post-sales-table th:nth-child(3), /* Type */
#post-sales-table td:nth-child(3) { 
  min-width: 100px !important;
}

#post-sales-table th:nth-child(4), /* Status */
#post-sales-table td:nth-child(4) { 
  min-width: 130px !important;
}

#post-sales-table th:nth-child(5), /* Payment Status */
#post-sales-table td:nth-child(5) { 
  min-width: 140px !important;
}

#post-sales-table th:nth-child(6), /* Invoice Date */
#post-sales-table td:nth-child(6) { 
  min-width: 110px !important;
}

#post-sales-table th:nth-child(7), /* Assigned To */
#post-sales-table td:nth-child(7) { 
  min-width: 120px !important;
}

#post-sales-table th:nth-child(8), /* Created Date */
#post-sales-table td:nth-child(8) { 
  min-width: 110px !important;
}

#post-sales-table th:nth-child(9), /* Actions */
#post-sales-table td:nth-child(9) { 
  min-width: 120px !important;
  text-align: center !important;
}

#post-sales-table tbody tr {
  transition: all 0.2s ease !important;
  border-bottom: 1px solid #ecf0f1 !important;
  background: white !important;
}

#post-sales-table tbody tr:nth-child(even) {
  background: #f8f9fa !important;
}

#post-sales-table tbody tr:hover {
  background: linear-gradient(90deg, #e3f2fd 0%, #f5f5f5 100%) !important;
  transform: translateX(2px) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}


/* ========================================
   EMPLOYEES FIXED HEIGHT LAYOUT
   ======================================== */

#employees-view:not([style*="display: none"]) {
  height: calc(100vh - 20px) !important;
  margin: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  background: white !important;
  border-radius: 12px !important;
  padding: 20px !important;
  max-width: none !important;
  width: calc(100% - 20px) !important;
}

#employees-view:not([style*="display: none"]) .view-header {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

#employees-view:not([style*="display: none"]) .table-filters {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

#employees-view:not([style*="display: none"]) .table-container {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding-bottom: 20px !important;
}


/* ========================================
   SETTINGS FIXED HEIGHT LAYOUT
   ======================================== */

#settings-view:not([style*="display: none"]) {
  height: calc(100vh - 20px) !important;
  margin: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  background: white !important;
  border-radius: 12px !important;
  padding: 20px !important;
  max-width: none !important;
  width: calc(100% - 20px) !important;
}

#settings-view:not([style*="display: none"]) .view-header {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

/* Settings tabs - fixed below header */
#settings-view:not([style*="display: none"]) > div:nth-child(2) {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

/* Settings sections - scrollable content area (only when visible) */
#settings-view:not([style*="display: none"]) .settings-section:not([style*="display: none"]) {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Add button container - fixed at top of section */
#settings-view:not([style*="display: none"]) .settings-section:not([style*="display: none"]) > div:first-child {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

/* Table container - scrollable */
#settings-view:not([style*="display: none"]) .settings-section:not([style*="display: none"]) .table-container {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding-bottom: 20px !important;
}




#post-sales-dashboard-view:not([style*="display: none"]) .activity-time {
  font-size: 13px !important;
  margin-top: 6px !important;
}

/* Increase spacing for dashboard items */
#post-sales-dashboard-view:not([style*="display: none"]) .dashboard-item-hover {
  padding: 18px !important;
  margin-bottom: 12px !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
}









/* ========================================
   EXPENSES DASHBOARD FIXED HEIGHT LAYOUT
   ======================================== */

#expenses-dashboard-view:not([style*="display: none"]) {
  height: calc(100vh - 20px) !important;
  margin: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  background: white !important;
  border-radius: 12px !important;
  padding: 15px !important;
  max-width: 100% !important;
  width: calc(100% - 20px) !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .view-header {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .dashboard-grid {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  grid-auto-rows: auto !important;
  gap: 15px !important;
  align-content: start !important;
  align-items: start !important;
  padding-bottom: 15px !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .list-card {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 18px !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}

/* Expenses by Category and Monthly Trend with smaller height */
#expenses-dashboard-view:not([style*="display: none"]) .list-card.expenses-by-category {
  grid-column: span 1 !important;
  max-height: 400px !important;
  height: 400px !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .list-card.monthly-trend {
  grid-column: span 1 !important;
  max-height: 400px !important;
  height: 400px !important;
}

/* Recent Expenses and Pending Approvals with taller height */
#expenses-dashboard-view:not([style*="display: none"]) .list-card.recent-expenses {
  max-height: 600px !important;
  height: auto !important;
  min-height: 300px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .list-card.pending-approvals {
  max-height: 600px !important;
  height: auto !important;
  min-height: 300px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .list-card h3 {
  flex-shrink: 0 !important;
  margin: 0 0 15px 0 !important;
  padding: 0 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .list-card .activity-list {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  max-height: calc(600px - 60px) !important;
}

/* Make scrollbar very light for expenses dashboard grid */
#expenses-dashboard-view:not([style*="display: none"]) .dashboard-grid::-webkit-scrollbar {
  width: 6px !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .dashboard-grid::-webkit-scrollbar-track {
  background: rgba(180, 170, 160, 0.05) !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .dashboard-grid::-webkit-scrollbar-thumb {
  background: rgba(180, 170, 160, 0.12) !important;
  border-radius: 3px !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .dashboard-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 170, 160, 0.18) !important;
}

/* Make scrollbar very light for expenses dashboard */
#expenses-dashboard-view:not([style*="display: none"]) .list-card .activity-list::-webkit-scrollbar {
  width: 6px !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .list-card .activity-list::-webkit-scrollbar-track {
  background: rgba(200, 200, 200, 0.05) !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .list-card .activity-list::-webkit-scrollbar-thumb {
  background: rgba(200, 200, 200, 0.2) !important;
  border-radius: 3px !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .list-card .activity-list::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 200, 200, 0.4) !important;
}

/* Increase content size for all activity items */
#expenses-dashboard-view:not([style*="display: none"]) .activity-item {
  font-size: 12px !important;
  line-height: 1.3 !important;
  padding: 8px !important;
  margin-bottom: 6px !important;
  overflow: hidden !important;
  word-wrap: break-word !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .activity-item strong {
  font-size: 13px !important;
}

#expenses-dashboard-view:not([style*="display: none"]) .activity-item small {
  font-size: 11px !important;
}

/* Increase content size for all activity items */
#expenses-dashboard-view:not([style*="display: none"]) .activity-item {
  font-size: 12px !important;
  line-height: 1.3 !important;
  padding: 8px !important;
  margin-bottom: 6px !important;
  overflow: hidden !important;
  word-wrap: break-word !important;
}


/* ========================================
   EXPENSES MANAGEMENT FIXED HEIGHT LAYOUT
   ======================================== */

#expenses-view:not([style*="display: none"]) {
  height: calc(100vh - 20px) !important;
  margin: 10px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  background: white !important;
  border-radius: 12px !important;
  padding: 20px !important;
  max-width: none !important;
  width: calc(100% - 20px) !important;
}

#expenses-view:not([style*="display: none"]) .view-header {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

#expenses-view:not([style*="display: none"]) .table-filters {
  flex-shrink: 0 !important;
  margin-bottom: 15px !important;
}

#expenses-view:not([style*="display: none"]) .table-container {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  padding-bottom: 20px !important;
}

#expenses-view:not([style*="display: none"]) .customers-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: auto !important;
}

#expenses-view:not([style*="display: none"]) .customers-table th,
#expenses-view:not([style*="display: none"]) .customers-table td {
  padding: 12px 8px !important;
  white-space: nowrap !important;
}

/* Override for thead th specifically */
#expenses-view:not([style*="display: none"]) .customers-table thead th {
  padding: 12px !important;
}

/* Flexible column widths that adapt to content */
#expenses-view:not([style*="display: none"]) .customers-table th:nth-child(1),
#expenses-view:not([style*="display: none"]) .customers-table td:nth-child(1) { max-width: 200px; overflow: hidden; text-overflow: ellipsis; } /* Title */
#expenses-view:not([style*="display: none"]) .customers-table th:nth-child(2),
#expenses-view:not([style*="display: none"]) .customers-table td:nth-child(2) { max-width: 120px; overflow: hidden; text-overflow: ellipsis; } /* Category */
#expenses-view:not([style*="display: none"]) .customers-table th:nth-child(6),
#expenses-view:not([style*="display: none"]) .customers-table td:nth-child(6) { max-width: 150px; overflow: hidden; text-overflow: ellipsis; } /* Vendor */

/* Sortable column styles */
#expenses-view .sortable {
  cursor: pointer !important;
  user-select: none !important;
  position: relative !important;
}

#expenses-view .sortable:hover {
  background: linear-gradient(135deg, #1a252f, #2c3e50) !important;
}

#expenses-view .sortable .sort-icon {
  display: inline-block;
  margin-left: 5px;
  opacity: 0.3;
}

#expenses-view .sortable .sort-icon::after {
  content: '⇅';
  font-size: 12px;
}

#expenses-view .sortable.sort-asc .sort-icon {
  opacity: 1;
}

#expenses-view .sortable.sort-asc .sort-icon::after {
  content: '↑';
  color: #4ade80;
}

#expenses-view .sortable.sort-desc .sort-icon {
  opacity: 1;
}

#expenses-view .sortable.sort-desc .sort-icon::after {
  content: '↓';
  color: #4ade80;
}

/* Light scrollbar for expenses table */
#expenses-view:not([style*="display: none"]) .table-container::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}

#expenses-view:not([style*="display: none"]) .table-container::-webkit-scrollbar-track {
  background: rgba(180, 170, 160, 0.05) !important;
}

#expenses-view:not([style*="display: none"]) .table-container::-webkit-scrollbar-thumb {
  background: rgba(180, 170, 160, 0.12) !important;
  border-radius: 3px !important;
}

#expenses-view:not([style*="display: none"]) .table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(180, 170, 160, 0.18) !important;
}

/* Expenses table header - dark blue gradient like other tables */
#expenses-view .customers-table thead,
#expenses-view:not([style*="display: none"]) .customers-table thead {
  position: sticky !important;
  top: 0 !important;
  background: linear-gradient(135deg, #2c3e50, #34495e) !important;
  z-index: 10 !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

#expenses-view .customers-table thead th,
#expenses-view:not([style*="display: none"]) .customers-table thead th {
  background: transparent !important;
  padding: 12px !important;
  text-align: left !important;
  font-weight: 600 !important;
  color: white !important;
  border-bottom: 3px solid #3498db !important;
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
}


/* Pagination Styles */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  border-radius: 0 0 8px 8px;
  margin-top: -1px;
  flex-wrap: nowrap;
  gap: 15px;
}

.pagination-info {
  font-size: 13px;
  color: #495057;
  white-space: nowrap;
  flex-shrink: 0;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.pagination-controls button {
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid #dee2e6;
  background: white;
  color: #495057;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.pagination-controls button:hover:not(:disabled) {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.pagination-controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-controls span {
  font-size: 13px;
  color: #495057;
  padding: 0 8px;
  white-space: nowrap;
}

.pagination-size {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.pagination-size label {
  font-size: 13px !important;
  color: #495057;
  white-space: nowrap;
}

.pagination-size select {
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: white;
  color: #495057;
  cursor: pointer;
}

/* Responsive pagination */
@media (max-width: 768px) {
  .pagination-container {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .pagination-info {
    width: 100%;
    text-align: center;
  }
  
  .pagination-controls {
    flex: 1;
    justify-content: center;
  }
  
  .pagination-size {
    flex: 1;
    justify-content: center;
  }
}

/* Loading Spinner */
.table-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #6b7280;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
}
