@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   CRM PRO — ULTRA MODERN SAAS STYLESHEET (80% APPLICATION SCALE AT 100% ZOOM)
   ========================================================================== */

/* Base 80% Application Scaling */
html {
  font-size: 13px !important; /* 16px * 0.8125 = 13px: gives 80% compact enterprise scale */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

:root {
  /* Layout Dimensions */
  --sidebar-width: 224px;
  --sidebar-collapsed-width: 62px;
  --navbar-height: 50px;

  /* Vibrant Modern Brand Palette */
  --primary: #4f46e5;
  --primary-rgb: 79, 70, 229;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  --primary-glow: rgba(79, 70, 229, 0.25);

  --success: #10b981;
  --success-rgb: 16, 185, 129;
  --success-dark: #059669;
  --success-light: #ecfdf5;

  --warning: #f59e0b;
  --warning-rgb: 245, 158, 11;
  --warning-dark: #d97706;
  --warning-light: #fffbeb;

  --danger: #f43f5e;
  --danger-rgb: 244, 63, 94;
  --danger-dark: #e11d48;
  --danger-light: #fff1f2;

  --info: #0ea5e9;
  --info-rgb: 14, 165, 233;
  --info-dark: #0284c7;
  --info-light: #f0f9ff;

  --purple: #8b5cf6;
  --purple-rgb: 139, 92, 246;
  --purple-dark: #7c3aed;
  --purple-light: #f5f3ff;

  /* Surfaces & Clean Slate Canvas */
  --body-bg: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --border-color: #e2e8f0;

  /* Typography */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  /* Sidebar: Modern Obsidian Navy */
  --sidebar-bg: #090d16;
  --sidebar-surface: rgba(255, 255, 255, 0.03);
  --sidebar-text: #94a3b8;
  --sidebar-text-muted: #475569;
  --sidebar-active: #4f46e5;
  --sidebar-hover-bg: rgba(255, 255, 255, 0.06);
  --sidebar-border: rgba(255, 255, 255, 0.06);

  /* Navbar: Frosted Glass */
  --navbar-bg: rgba(255, 255, 255, 0.92);
  --navbar-border: #e2e8f0;

  /* Radius & Shadows */
  --border-radius: 9px;
  --border-radius-sm: 6px;
  --border-radius-lg: 12px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Theme */
[data-bs-theme="dark"] {
  --body-bg: #090d16;
  --card-bg: #111827;
  --card-border: #1f2937;
  --border-color: #1f2937;

  --navbar-bg: rgba(17, 24, 39, 0.92);
  --navbar-border: #1f2937;

  --sidebar-bg: #060911;
  --sidebar-surface: rgba(255, 255, 255, 0.02);
  --sidebar-border: rgba(255, 255, 255, 0.05);
  --sidebar-text: #94a3b8;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --primary-light: rgba(79, 70, 229, 0.15);
  --success-light: rgba(16, 185, 129, 0.15);
  --warning-light: rgba(245, 158, 11, 0.15);
  --danger-light: rgba(244, 63, 94, 0.15);
  --info-light: rgba(14, 165, 233, 0.15);
  --purple-light: rgba(139, 92, 246, 0.15);

  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
}

/* General Reset & Body */
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--body-bg);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-size: 0.93rem;
  line-height: 1.45;
  letter-spacing: -0.01em;
  transition: background-color var(--transition), color var(--transition);
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* Headings scale */
h1, .h1 { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; }
h2, .h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
h3, .h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; }
h4, .h4 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
h5, .h5 { font-size: 0.95rem; font-weight: 600; }
h6, .h6 { font-size: 0.85rem; font-weight: 600; }

/* Custom Sleek Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.45);
}

/* Auth Pages */
.auth-body {
  background: radial-gradient(circle at 50% -10%, rgba(79, 70, 229, 0.12) 0%, rgba(248, 250, 252, 0.98) 60%),
              linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
  min-height: 100vh;
}

@media (min-width: 992px) {
  body.auth-body {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
  }
}

.max-w-1200 {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.auth-navbar {
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.35rem 1rem !important;
  flex-shrink: 0;
}

.auth-main {
  padding: 0.5rem 1rem !important;
  flex-grow: 1;
}

.auth-footer {
  padding: 0.35rem 1rem !important;
  font-size: 0.72rem;
  flex-shrink: 0;
}

.auth-wrapper {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.auth-wrapper-narrow {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.auth-split-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  max-width: 980px;
}

.auth-hero-side {
  background: linear-gradient(150deg, #0b0f19 0%, #1e1b4b 32%, #312e81 68%, #4338ca 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.auth-hero-side::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, rgba(99, 102, 241, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.auth-hero-side::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22) 0%, rgba(16, 185, 129, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.auth-feature-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.auth-feature-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.auth-feature-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.auth-form-side {
  background: #ffffff;
}

.auth-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-logo h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.auth-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  transition: all var(--transition);
}

.auth-card .card-body {
  padding: 1.75rem;
}

.auth-card .form-label, .auth-form-side .form-label {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.78rem;
}

.auth-card .form-control, .auth-form-side .form-control {
  color: var(--text-primary);
  border-color: var(--card-border);
  font-size: 0.84rem;
  padding: 8px 12px;
  transition: all 0.2s ease;
}

.auth-card .input-group-text, .auth-form-side .input-group-text {
  border-color: var(--card-border);
  color: var(--text-muted);
}

.auth-card .form-control:focus, .auth-form-side .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.hover-primary:hover {
  color: var(--primary) !important;
}

.auth-card .btn-primary, .auth-form-side .btn-primary {
  background: var(--primary-gradient);
  border: none;
  font-weight: 600;
  padding: 9px 16px;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
  transition: all 0.2s ease;
}

.auth-card .btn-primary:hover, .auth-form-side .btn-primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.38);
  transform: translateY(-1px);
}

/* ==========================================================================
   SIDEBAR NAVIGATION
   ========================================================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  z-index: 1030;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.12);
}

.sidebar-brand {
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  padding: 0 14px;
  background-color: var(--sidebar-surface);
  border-bottom: 1px solid var(--sidebar-border);
  color: #fff;
  justify-content: space-between;
}

.brand-link {
  color: #fff;
  display: flex;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-link:hover {
  color: #fff;
}

.brand-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
  margin-right: 8px;
}

.brand-logo {
  height: 28px;
  width: 28px;
  object-fit: contain;
  border-radius: 7px;
  background-color: #ffffff;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: inline-block;
  flex-shrink: 0;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  color: var(--sidebar-text);
  font-size: 1rem;
  cursor: pointer;
  display: none;
  padding: 4px;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.nav-section {
  padding: 12px 14px 4px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  font-weight: 700;
}

.sidebar .nav-item {
  margin: 2px 8px;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  color: var(--sidebar-text);
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
  font-size: 0.84rem;
  font-weight: 500;
  gap: 8px;
}

.sidebar .nav-link i {
  width: 20px;
  font-size: 0.92rem;
  text-align: center;
  color: #64748b;
  transition: var(--transition);
}

.sidebar .nav-link:hover {
  background-color: var(--sidebar-hover-bg);
  color: #f8fafc;
}

.sidebar .nav-link:hover i {
  color: #e2e8f0;
}

.sidebar .nav-link.active {
  background: var(--primary-gradient);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.35);
}

.sidebar .nav-link.active i {
  color: #ffffff;
}

/* Sidebar Collapsed State */
.sidebar-collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-collapsed .brand-name,
.sidebar-collapsed .nav-section span,
.sidebar-collapsed .nav-link span,
.sidebar-collapsed .badge {
  display: none;
}

.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding: 0;
}

.sidebar-collapsed .brand-icon,
.sidebar-collapsed .brand-logo {
  margin: 0;
}

.sidebar-collapsed .nav-item {
  margin: 3px 6px;
}

.sidebar-collapsed .nav-link {
  padding: 8px 0;
  justify-content: center;
}

.sidebar-collapsed .nav-link i {
  margin: 0;
  font-size: 1.05rem;
}

/* ==========================================================================
   MAIN CONTENT & TOP NAVBAR
   ========================================================================== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.main-collapsed {
  margin-left: var(--sidebar-collapsed-width);
}

.top-navbar {
  height: var(--navbar-height);
  background-color: var(--navbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--navbar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 1020;
  transition: var(--transition);
}

.navbar-left, .navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.sidebar-toggle:hover {
  color: var(--primary);
  background-color: rgba(79, 70, 229, 0.08);
}

/* Global Search */
.global-search {
  position: relative;
  width: 240px;
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.78rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 32px;
  padding: 4px 12px 4px 30px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background-color: var(--body-bg);
  color: var(--text-primary);
  font-size: 0.82rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* Icon Buttons */
.icon-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  position: relative;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.icon-btn:hover {
  background-color: rgba(79, 70, 229, 0.06);
  border-color: rgba(79, 70, 229, 0.12);
  color: var(--primary);
}

.notif-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background-color: var(--danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 8px;
  border: 1.5px solid var(--navbar-bg);
}

/* Notifications Dropdown */
.notif-dropdown {
  width: 300px;
  padding: 0;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-hover);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.notif-dropdown .dropdown-header {
  padding: 10px 14px;
  background-color: var(--card-bg);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.82rem;
}

#notifList {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  padding: 9px 12px;
  border-bottom: 1px solid var(--card-border);
  white-space: normal;
  transition: background-color var(--transition);
  font-size: 0.78rem;
}

.notif-item:hover {
  background-color: var(--body-bg);
}

.notif-item.unread {
  background-color: rgba(79, 70, 229, 0.05);
  border-left: 3px solid var(--primary);
}

.notif-title {
  font-size: 0.8rem;
  color: var(--text-primary);
  margin-bottom: 3px;
  font-weight: 600;
}

/* User Pill */
.user-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.user-btn:hover {
  background-color: rgba(79, 70, 229, 0.06);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  text-align: left;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-role {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Page Content */
.page-content {
  padding: 18px 22px;
  flex: 1;
}

.page-header {
  margin-bottom: 16px;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.page-breadcrumb {
  margin-bottom: 14px;
}

.breadcrumb {
  margin-bottom: 0;
  font-size: 0.78rem;
}

.breadcrumb-item a {
  color: var(--text-muted);
}

.breadcrumb-item.active {
  color: var(--text-primary);
  font-weight: 500;
}

/* ==========================================================================
   CARDS & DASHBOARD KPI ELEMENTS (COMPACT PRO SIZING)
   ========================================================================== */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  transition: var(--transition);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--card-border);
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body {
  padding: 12px 14px;
}

.card-footer {
  padding: 8px 14px;
  background-color: transparent;
  border-top: 1px solid var(--card-border);
}

/* Compact Stat Card */
.stat-card {
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  border-radius: var(--border-radius);
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(79, 70, 229, 0.25);
}

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.stat-trend {
  margin-top: 4px;
  font-size: 0.72rem;
}

.chart-card {
  height: 320px;
  position: relative;
}

/* Pastel Soft Backgrounds for Icons and Badges */
.bg-primary-soft { background-color: rgba(79, 70, 229, 0.1) !important; color: #4f46e5 !important; }
.bg-success-soft { background-color: rgba(16, 185, 129, 0.1) !important; color: #059669 !important; }
.bg-warning-soft { background-color: rgba(245, 158, 11, 0.1) !important; color: #d97706 !important; }
.bg-danger-soft  { background-color: rgba(244, 63, 94, 0.1) !important; color: #e11d48 !important; }
.bg-info-soft    { background-color: rgba(14, 165, 233, 0.1) !important; color: #0284c7 !important; }
.bg-purple-soft  { background-color: rgba(139, 92, 246, 0.1) !important; color: #7c3aed !important; }
.bg-orange-soft  { background-color: rgba(249, 115, 22, 0.1) !important; color: #ea580c !important; }

.text-purple { color: #7c3aed !important; }
.text-orange { color: #ea580c !important; }

.stat-card.card {
  padding: 0;
  border: 1px solid var(--card-border) !important;
}

.stat-card.card .card-body {
  padding: 11px 13px;
}

/* Activity Feed & Timeline */
.activity-feed {
  position: relative;
  padding-left: 1.25rem;
}

.activity-feed::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background-color: var(--card-border);
}

.activity-item {
  position: relative;
  padding-bottom: 1rem;
}

.activity-item:last-child {
  padding-bottom: 0;
}

.activity-icon {
  position: absolute;
  left: -1.2rem;
  top: 0.15rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  color: var(--primary);
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-content {
  margin-left: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.activity-time {
  margin-left: 0.35rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ==========================================================================
   TABLES & LISTS (COMPACT PRO DENSITY)
   ========================================================================== */
.table-responsive {
  border-radius: var(--border-radius);
}

.table {
  color: var(--text-primary);
  margin-bottom: 0;
  font-size: 0.83rem;
}

.table th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 7px 11px;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

[data-bs-theme="dark"] .table th {
  background-color: #111827;
  color: #94a3b8;
}

.table td {
  padding: 7px 11px;
  vertical-align: middle;
  border-bottom: 1px solid var(--card-border);
  background-color: var(--card-bg);
  color: var(--text-primary);
}

.table-hover tbody tr:hover td {
  background-color: rgba(79, 70, 229, 0.03);
}

[data-bs-theme="dark"] .table-hover tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Action Icon Buttons */
.action-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-icon {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  color: var(--text-muted);
  background: var(--body-bg);
  border: 1px solid var(--card-border);
  font-size: 0.75rem;
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: #fff;
  transform: translateY(-1px);
}

.btn-icon.delete:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* Badges */
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2.5px 7px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}

.badge-status {
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.72rem;
}

/* ==========================================================================
   FORMS & BUTTONS
   ========================================================================== */
.form-label {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.form-control, .form-select {
  font-size: 0.82rem;
  padding: 5px 9px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--card-border);
  background-color: var(--card-bg);
  color: var(--text-primary);
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  background-color: var(--card-bg);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  color: var(--text-primary);
}

.form-control-sm, .form-select-sm {
  font-size: 0.75rem;
  padding: 3px 7px;
  border-radius: 4px;
}

.input-group-text {
  font-size: 0.82rem;
  padding: 5px 9px;
  background-color: var(--body-bg);
  border-color: var(--card-border);
  color: var(--text-muted);
}

/* Buttons */
.btn {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-primary {
  background: var(--primary-gradient);
  border: 1px solid transparent;
  color: #fff;
  box-shadow: 0 2px 5px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

.btn-sm {
  font-size: 0.74rem;
  padding: 3px 8px;
  border-radius: 5px;
}

.btn-outline-secondary {
  border-color: var(--card-border);
  color: var(--text-secondary);
}

.btn-outline-secondary:hover {
  background-color: var(--body-bg);
  border-color: #cbd5e1;
  color: var(--text-primary);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  align-items: center;
  justify-content: space-between;
}

.filter-group {
  display: flex;
  gap: 8px;
  flex: 1;
}

/* ==========================================================================
   KANBAN & PIPELINE BOARDS (COMPACT PRO)
   ========================================================================== */
.kanban-board, .pipeline-board {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding-bottom: 12px;
  align-items: flex-start;
  min-height: calc(100vh - 180px);
}

.kanban-column, .pipeline-column {
  flex: 0 0 250px;
  background-color: var(--body-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 180px);
}

.kanban-col-header, .pipeline-col-header, .kanban-column-header {
  padding: 9px 12px;
  font-weight: 600;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}

.kanban-cards, .pipeline-cards {
  padding: 8px;
  flex: 1;
  overflow-y: auto;
  min-height: 120px;
}

.kanban-card, .pipeline-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  padding: 9px 11px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-xs);
  cursor: grab;
  font-size: 0.8rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.kanban-card:hover, .pipeline-card:hover {
  transform: translateY(-1.5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(79, 70, 229, 0.3);
}

.kanban-card:active, .pipeline-card:active {
  cursor: grabbing;
}

.kanban-card-title, .pipeline-card-title {
  font-weight: 600;
  font-size: 0.84rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.kanban-card-meta, .pipeline-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.kanban-card-body {
  padding: 0;
}

.task-priority-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 3.5px;
  height: 100%;
}

.kanban-ghost, .pipeline-ghost {
  opacity: 0.4;
  background: var(--body-bg) !important;
  border: 1px dashed var(--primary) !important;
}

.pipeline-card-value {
  font-weight: 700;
  color: var(--success);
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

/* ==========================================================================
   MODALS, DROPDOWNS & TOASTS
   ========================================================================== */
.modal-content {
  background-color: var(--card-bg);
  border-color: var(--card-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
  padding: 11px 16px;
  border-bottom-color: var(--card-border);
}

.modal-header .modal-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.modal-body {
  padding: 14px 16px;
}

.modal-footer {
  padding: 9px 16px;
  border-top-color: var(--card-border);
}

/* Dropdowns */
.dropdown-menu {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-hover);
  border-radius: var(--border-radius);
  font-size: 0.82rem;
  padding: 4px;
}

.dropdown-item {
  border-radius: 4px;
  padding: 5px 10px;
  color: var(--text-primary);
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: rgba(79, 70, 229, 0.08);
  color: var(--primary);
}

.dropdown-item.active, .dropdown-item:active {
  background: var(--primary-gradient);
  color: #fff;
}

/* Global Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 340px;
  max-width: 440px;
  z-index: 1060;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-hover);
  max-height: 380px;
  overflow-y: auto;
}

.search-result-item {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--card-border);
  transition: background 0.15s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(79, 70, 229, 0.06);
  color: inherit;
}

.search-result-type {
  font-size: 0.62rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.search-result-name {
  font-weight: 600;
  font-size: 0.82rem;
}

.search-result-ref {
  font-size: 0.74rem;
}

/* Activity Feed */
.activity-feed {
  position: relative;
  padding-left: 1.25rem;
}

.activity-feed::before {
  content: "";
  position: absolute;
  left: 0.6rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--card-border);
}

.activity-item {
  position: relative;
  padding-bottom: 1.1rem;
}

.activity-item:last-child {
  padding-bottom: 0;
}

.activity-icon {
  position: absolute;
  left: -1.5rem;
  top: 0.15rem;
  width: 0.85rem;
  height: 0.85rem;
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 0.7rem;
  text-align: center;
}

.activity-content {
  margin-left: 0.4rem;
  font-size: 0.82rem;
}

.activity-time {
  margin-left: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE & PRINT OVERRIDES
   ========================================================================== */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1025;
  display: none;
}

.sidebar-overlay.active {
  display: block;
}

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.sidebar-open {
    transform: translateX(0);
  }

  .sidebar-toggle-btn {
    display: block;
  }

  .main-wrapper, .main-collapsed {
    margin-left: 0;
  }

  .global-search {
    width: 160px;
  }
}

/* ==========================================================================
   PRICING PAGE & SAAS CARDS
   ========================================================================== */
.pricing-card {
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--card-border);
  background-color: var(--card-bg);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

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

.pricing-card.popular {
  border: 2px solid var(--primary) !important;
  box-shadow: 0 10px 28px -4px rgba(79, 70, 229, 0.22);
  position: relative;
  overflow: hidden;
}

.pricing-ribbon-top {
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 0.70rem;
  font-weight: 700;
  padding: 6px 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.4;
  border-top-left-radius: calc(var(--border-radius-lg) - 2px);
  border-top-right-radius: calc(var(--border-radius-lg) - 2px);
}

.pricing-badge-popular {
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-block;
}

.pricing-feature-item {
  display: flex;
  align-items: flex-start;
  font-size: 0.81rem;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
  line-height: 1.35;
}

.pricing-feature-item i {
  margin-right: 0.55rem;
  margin-top: 0.15rem;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.pricing-feature-item.disabled {
  color: var(--text-muted);
}

@media print {
  .sidebar, .top-navbar, .page-breadcrumb, .action-btns, .btn, .sidebar-overlay {
    display: none !important;
  }
  .main-wrapper {
    margin-left: 0 !important;
  }
  .page-content {
    padding: 0 !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
  }
}

