  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

    :root {
      --sidebar-bg: #0f1117;
      --sidebar-width: 250px;
      --sidebar-collapsed: 72px;
      --header-h: 64px;
      --accent: #6366f1;
      --accent-2: #8b5cf6;
      --accent-glow: rgba(99, 102, 241, 0.18);
      --success: #10b981;
      --warning: #f59e0b;
      --danger: #ef4444;
      --info: #3b82f6;
      --hot: #ff4757;
      --surface: #ffffff;
      --surface-2: #f8fafc;
      --surface-3: #f1f5f9;
      --border: #e2e8f0;
      --text-primary: #0f172a;
      --text-secondary: #64748b;
      --text-muted: #94a3b8;
      --sidebar-text: #94a3b8;
      --sidebar-hover: rgba(255, 255, 255, 0.06);
      --sidebar-active: rgba(99, 102, 241, 0.18);
      --sidebar-active-border: #6366f1;
      --radius: 12px;
      --radius-sm: 8px;
      --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
      --shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
      --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
      --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    }

    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html,
    body {
      height: 100%;
      font-family: 'Inter', sans-serif;
      background: var(--surface-2);
      color: var(--text-primary);
      overflow-x: hidden;
    }

    /* ─── SIDEBAR ─────────────────────────────── */
    .sidebar {
      position: fixed;
      top: 0;
      left: 0;
      width: var(--sidebar-width);
      height: 100vh;
      background: var(--sidebar-bg);
      z-index: 1050;
      display: flex;
      flex-direction: column;
      transition: var(--transition);
      overflow: hidden;
    }

    .sidebar.collapsed {
      width: var(--sidebar-collapsed);
    }

    .sidebar-logo {
      padding: 20px 20px 16px;
      display: flex;
      align-items: center;
      gap: 12px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      min-height: var(--header-h);
      flex-shrink: 0;
    }

    .logo-mark {
      width: 36px;
      height: 36px;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      color: #fff;
      font-weight: 800;
      flex-shrink: 0;
      box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    }

    .logo-text {
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-weight: 800;
      font-size: 18px;
      color: #fff;
      white-space: nowrap;
      overflow: hidden;
    }

    .logo-text span {
      color: var(--accent);
    }

    .sidebar.collapsed .logo-text,
    .sidebar.collapsed .nav-label,
    .sidebar.collapsed .nav-section-title,
    .sidebar.collapsed .sidebar-footer-text {
      display: none;
    }

    .sidebar.collapsed .sidebar-logo {
      justify-content: center;
      padding: 0;
    }

    .sidebar-nav {
      flex: 1;
      overflow-y: auto;
      padding: 12px 10px;
      scrollbar-width: thin;
      scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
    }

    .sidebar-nav::-webkit-scrollbar {
      width: 4px;
    }

    .sidebar-nav::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 2px;
    }

    .nav-section-title {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.08em;
      color: rgba(255, 255, 255, 0.25);
      text-transform: uppercase;
      padding: 14px 10px 6px;
      white-space: nowrap;
    }

    .nav-item {
      list-style: none;
    }

    .nav-link-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 10px;
      border-radius: 8px;
      color: var(--sidebar-text);
      text-decoration: none;
      font-size: 13.5px;
      font-weight: 500;
      transition: var(--transition);
      cursor: pointer;
      position: relative;
      white-space: nowrap;
    }

    .nav-link-item:hover {
      background: var(--sidebar-hover);
      color: #fff;
    }

    .nav-link-item.active {
      background: var(--sidebar-active);
      color: #fff;
      border-left: 3px solid var(--sidebar-active-border);
    }

    .nav-link-item .nav-icon {
      width: 18px;
      text-align: center;
      font-size: 14px;
      flex-shrink: 0;
    }

    .nav-badge {
      margin-left: auto;
      background: var(--accent);
      color: #fff;
      font-size: 10px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 20px;
      flex-shrink: 0;
    }

    .nav-badge.danger {
      background: var(--danger);
    }

    .nav-badge.warning {
      background: var(--warning);
    }

    .sub-nav {
      padding-left: 28px;
    }

    .sub-nav .nav-link-item {
      font-size: 13px;
      padding: 7px 10px;
    }

    .sub-nav .nav-link-item.active {
      border-left: 2px solid var(--accent);
    }

    .sub-nav-collapse {
      overflow: hidden;
      max-height: 0;
      transition: max-height 0.3s ease;
    }

    .sub-nav-collapse.open {
      max-height: 400px;
    }

    .sidebar-footer {
      padding: 14px 10px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      flex-shrink: 0;
    }

    .user-card {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 10px;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.04);
      cursor: pointer;
    }

    .user-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: linear-gradient(135deg, #6366f1, #8b5cf6);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      color: #fff;
      font-weight: 700;
      flex-shrink: 0;
    }

    .sidebar-footer-text {
      overflow: hidden;
    }

    .sidebar-footer-text .name {
      font-size: 13px;
      color: #fff;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .sidebar-footer-text .role {
      font-size: 11px;
      color: var(--sidebar-text);
      white-space: nowrap;
    }

    img,
    canvas,
    svg {
      max-width: 100%;
      height: auto;
    }

    .chart-wrap canvas {
      width: 100% !important;
      height: 100% !important;
    }

    .page-content {
      width: 100%;
      overflow-x: hidden;
    }

    .chart-card,
    .kpi-card,
    .table-card {
      min-width: 0;
    }

    /* ─── MAIN LAYOUT ──────────────────────────── */
    .main-wrapper {
      margin-left: var(--sidebar-width);
      transition: var(--transition);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    .main-wrapper.collapsed {
      margin-left: var(--sidebar-collapsed);
    }

    /* ─── HEADER ───────────────────────────────── */
    .top-header {
      position: sticky;
      top: 0;
      z-index: 900;
      height: var(--header-h);
      background: rgba(255, 255, 255, 0.92);
      backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      padding: 0 24px;
      gap: 16px;
      box-shadow: var(--shadow-sm);
    }

    .btn-toggle-sidebar {
      width: 36px;
      height: 36px;
      border: none;
      background: var(--surface-3);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--text-secondary);
      font-size: 15px;
      transition: var(--transition);
      flex-shrink: 0;
    }

    .btn-toggle-sidebar:hover {
      background: var(--accent);
      color: #fff;
    }

    .header-search {
      flex: 1;
      max-width: 420px;
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--surface-3);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 0 14px;
      height: 38px;
    }

    .header-search input {
      border: none;
      background: transparent;
      outline: none;
      flex: 1;
      font-size: 13.5px;
      color: var(--text-primary);
    }

    .header-search i {
      color: var(--text-muted);
      font-size: 13px;
    }

    .header-search input::placeholder {
      color: var(--text-muted);
    }

    .header-actions {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .header-btn {
      width: 38px;
      height: 38px;
      border: 1px solid var(--border);
      background: var(--surface);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--text-secondary);
      font-size: 15px;
      position: relative;
      transition: var(--transition);
    }

    .header-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .notif-dot {
      position: absolute;
      top: 6px;
      right: 6px;
      width: 8px;
      height: 8px;
      background: var(--danger);
      border-radius: 50%;
      border: 2px solid var(--surface);
    }

    .header-avatar {
      width: 38px;
      height: 38px;
      border-radius: 10px;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      border: 2px solid transparent;
      transition: var(--transition);
    }

    .header-avatar:hover {
      border-color: var(--accent);
    }

    .breadcrumb-bar {
      font-size: 13px;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .breadcrumb-bar .current {
      color: var(--text-primary);
      font-weight: 600;
    }

    /* ─── PAGE CONTENT ─────────────────────────── */
    .page-content {
      flex: 1;
      padding: 20px;
    }

    .page-title-bar {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 24px;
      gap: 16px;
      flex-wrap: wrap;
    }

    .page-title {
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: 22px;
      font-weight: 800;
      color: var(--text-primary);
    }

    .page-subtitle {
      font-size: 13px;
      color: var(--text-secondary);
      margin-top: 3px;
    }

    /* ─── KPI CARDS ────────────────────────────── */
    .kpi-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
      gap: 10px;
      margin-bottom: 28px;
    }

    .kpi-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 13px;
      position: relative;
      overflow: hidden;
      transition: var(--transition);
      box-shadow: var(--shadow-sm);
    }

    .kpi-card:hover {
      box-shadow: var(--shadow);
      transform: translateY(-2px);
      border-color: var(--accent);
    }

    .kpi-card::before {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      width: 80px;
      height: 80px;
      border-radius: 0 0 0 80px;
      opacity: 0.06;
    }

    .kpi-card.indigo::before {
      background: var(--accent);
    }

    .kpi-card.emerald::before {
      background: var(--success);
    }

    .kpi-card.amber::before {
      background: var(--warning);
    }

    .kpi-card.red::before {
      background: var(--danger);
    }

    .kpi-card.blue::before {
      background: var(--info);
    }

    .kpi-card.violet::before {
      background: var(--accent-2);
    }

    .kpi-icon {
      width: 42px;
      height: 42px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      margin-bottom: 14px;
    }

    .kpi-card.indigo .kpi-icon {
      background: rgba(99, 102, 241, 0.12);
      color: var(--accent);
    }

    .kpi-card.emerald .kpi-icon {
      background: rgba(16, 185, 129, 0.12);
      color: var(--success);
    }

    .kpi-card.amber .kpi-icon {
      background: rgba(245, 158, 11, 0.12);
      color: var(--warning);
    }

    .kpi-card.red .kpi-icon {
      background: rgba(239, 68, 68, 0.12);
      color: var(--danger);
    }

    .kpi-card.blue .kpi-icon {
      background: rgba(59, 130, 246, 0.12);
      color: var(--info);
    }

    .kpi-card.violet .kpi-icon {
      background: rgba(139, 92, 246, 0.12);
      color: var(--accent-2);
    }

    .kpi-card.hot .kpi-icon {
      background: rgba(255, 71, 87, 0.12);
      color: var(--hot);
    }

    .kpi-value {
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: 22px;
      font-weight: 600;
      line-height: 1;
      margin-bottom: 5px;
    }

    .kpi-label {
      font-size: 12.5px;
      color: var(--text-secondary);
      font-weight: 500;
    }

    .kpi-delta {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11.5px;
      font-weight: 600;
      margin-top: 10px;
      padding: 3px 8px;
      border-radius: 20px;
    }

    .kpi-delta.up {
      background: rgba(16, 185, 129, 0.1);
      color: var(--success);
    }

    .kpi-delta.down {
      background: rgba(239, 68, 68, 0.1);
      color: var(--danger);
    }

    /* ─── CHARTS ───────────────────────────────── */
    .charts-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      margin-bottom: 28px;
    }

    .charts-grid.three-col {
      grid-template-columns: 2fr 1fr 1fr;
    }

    .chart-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 22px;
      box-shadow: var(--shadow-sm);
    }

    .chart-card.span-2 {
      grid-column: span 2;
    }

    .chart-title {
      font-size: 14px;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 4px;
    }

    .chart-subtitle {
      font-size: 12px;
      color: var(--text-muted);
      margin-bottom: 18px;
    }

    .chart-wrap {
      position: relative;
      height: 220px;
    }

    .chart-wrap.tall {
      height: 250px;
    }

    /* ─── TABLES ───────────────────────────────── */
    .table-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: var(--shadow-sm);
    }

    .table-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 20px;
      border-bottom: 1px solid var(--border);
      flex-wrap: wrap;
      gap: 12px;
    }

    .table-title {
      font-size: 15px;
      font-weight: 700;
      color: var(--text-primary);
    }

    .table-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .data-table {
      width: 100%;
      border-collapse: collapse;
      padding-bottom: 10px;
    }

    .data-table thead th {
      background: var(--surface-2);
      padding: 11px 16px;
      text-align: left;
      font-size: 11.5px;
      font-weight: 600;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      white-space: nowrap;
      border-bottom: 1px solid var(--border);
    }

    .data-table tbody td {
      padding: 3px 8px;
      font-size: 12.5px;
      border-bottom: 1px solid var(--border);
      vertical-align: middle;
      white-space: nowrap;
    }

    .data-table tbody tr:last-child td {
      border-bottom: none;
    }

    .data-table tbody tr:hover {
      background: var(--surface-2);
    }

    .table-scroll {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }

    .data-table {
     width: 100%;
    }

    /* ─── BADGES ────────────────────────────────── */
    .badge-status {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 10px;
      border-radius: 20px;
      font-size: 11.5px;
      font-weight: 600;
      white-space: nowrap;
    }

    .badge-status::before {
      content: '';
      width: 6px;
      height: 6px;
      border-radius: 50%;
    }

    .badge-new {
      background: rgba(59, 130, 246, 0.1);
      color: var(--info);
    }

    .badge-new::before {
      background: var(--info);
    }

    .badge-assigned {
      background: rgba(139, 92, 246, 0.1);
      color: var(--accent-2);
    }

    .badge-assigned::before {
      background: var(--accent-2);
    }

    .badge-contacted {
      background: rgba(245, 158, 11, 0.1);
      color: var(--warning);
    }

    .badge-contacted::before {
      background: var(--warning);
    }

    .badge-follow {
      background: rgba(251, 146, 60, 0.1);
      color: #f97316;
    }

    .badge-follow::before {
      background: #f97316;
    }

    .badge-proposal {
      background: rgba(99, 102, 241, 0.1);
      color: var(--accent);
    }

    .badge-proposal::before {
      background: var(--accent);
    }

    .badge-won {
      background: rgba(16, 185, 129, 0.1);
      color: var(--success);
    }

    .badge-won::before {
      background: var(--success);
    }

    .badge-lost {
      background: rgba(239, 68, 68, 0.1);
      color: var(--danger);
    }

    .badge-lost::before {
      background: var(--danger);
    }

    .badge-inprogress {
      background: rgba(59, 130, 246, 0.1);
      color: var(--info);
    }

    .badge-inprogress::before {
      background: var(--info);
    }

    .badge-review {
      background: rgba(245, 158, 11, 0.1);
      color: var(--warning);
    }

    .badge-review::before {
      background: var(--warning);
    }

    .badge-completed {
      background: rgba(16, 185, 129, 0.1);
      color: var(--success);
    }

    .badge-completed::before {
      background: var(--success);
    }

    .badge-pending {
      background: rgba(148, 163, 184, 0.15);
      color: var(--text-secondary);
    }

    .badge-pending::before {
      background: var(--text-muted);
    }

    .priority-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 9px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .priority-hot {
      background: rgba(255, 71, 87, 0.12);
      color: var(--hot);
    }

    .priority-high {
      background: rgba(245, 158, 11, 0.12);
      color: var(--warning);
    }

    .priority-medium {
      background: rgba(59, 130, 246, 0.12);
      color: var(--info);
    }

    .priority-low {
      background: rgba(148, 163, 184, 0.12);
      color: var(--text-secondary);
    }

    /* ─── BUTTONS ───────────────────────────────── */
    .btn-primary-crm {
      background: var(--accent);
      color: #fff;
      border: none;
      padding: 5px 18px;
      border-radius: 5px;
      font-size: 13.5px;
      font-weight: 600;
      cursor: pointer;
      transition: var(--transition);
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }

    .btn-primary-crm:hover {
      background: #4f46e5;
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    }

    .btn-outline-crm {
      background: transparent;
      color: var(--text-secondary);
      border: 1px solid var(--border);
      padding: 5px 16px;
      border-radius: 5px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: var(--transition);
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .btn-outline-crm:hover {
      border-color: var(--accent);
      color: var(--accent);
      background: var(--accent-glow);
    }

    .btn-icon {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: transparent;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--text-secondary);
      font-size: 13px;
      transition: var(--transition);
    }

    .btn-icon:hover {
      background: var(--accent-glow);
      color: var(--accent);
      border-color: var(--accent);
    }

    .btn-icon.danger:hover {
      background: rgba(239, 68, 68, 0.1);
      color: var(--danger);
      border-color: var(--danger);
    }

    .btn-icon.success:hover {
      background: rgba(16, 185, 129, 0.1);
      color: var(--success);
      border-color: var(--success);
    }

    /* ─── SCORE BADGE ───────────────────────────── */
    .score-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 38px;
      height: 22px;
      border-radius: 6px;
      font-size: 11.5px;
      font-weight: 700;
    }

    .score-high {
      background: rgba(16, 185, 129, 0.12);
      color: var(--success);
    }

    .score-med {
      background: rgba(245, 158, 11, 0.12);
      color: var(--warning);
    }

    .score-low {
      background: rgba(239, 68, 68, 0.12);
      color: var(--danger);
    }

    /* ─── PROGRESS BARS ─────────────────────────── */
    .progress-crm {
      height: 6px;
      background: var(--surface-3);
      border-radius: 3px;
      overflow: hidden;
    }

    .progress-fill {
      height: 100%;
      border-radius: 3px;
      transition: width 1s ease;
    }

    .progress-fill.indigo {
      background: linear-gradient(90deg, var(--accent), var(--accent-2));
    }

    .progress-fill.green {
      background: linear-gradient(90deg, #10b981, #059669);
    }

    .progress-fill.amber {
      background: linear-gradient(90deg, #f59e0b, #d97706);
    }

    /* ─── ACTIVITY / TIMELINE ───────────────────── */
    .activity-feed {
      display: flex;
      flex-direction: column;
      gap: 0;
    }

    .activity-item {
      display: flex;
      gap: 12px;
      padding: 14px 20px;
      border-bottom: 1px solid var(--border);
      transition: var(--transition);
    }

    .activity-item:last-child {
      border-bottom: none;
    }

    .activity-item:hover {
      background: var(--surface-2);
    }

    .activity-dot {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      margin-top: 1px;
    }

    .activity-content {
      flex: 1;
      min-width: 0;
    }

    .activity-text {
      font-size: 13.5px;
      color: var(--text-primary);
      line-height: 1.45;
    }

    .activity-text strong {
      font-weight: 600;
    }

    .activity-time {
      font-size: 11.5px;
      color: var(--text-muted);
      margin-top: 3px;
    }

    #projectViewModal .modal-body{
      font-size: 13px;
    }

    /* ─── KANBAN ────────────────────────────────── */
    .kanban-board {
      display: flex;
      gap: 16px;
      padding-bottom: 8px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
    }

    .kanban-col {
      scroll-snap-align: start;
    }

    .kanban-col {
      flex: 0 0 250px;
      background: var(--surface-3);
      border-radius: var(--radius);
      padding: 14px;
      min-height: 400px;
    }

    .kanban-col-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 14px;
    }

    .kanban-col-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .kanban-col-count {
      width: 22px;
      height: 22px;
      background: var(--surface);
      border-radius: 6px;
      font-size: 11px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-secondary);
    }

    .kanban-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 14px;
      margin-bottom: 10px;
      cursor: grab;
      transition: var(--transition);
      box-shadow: var(--shadow-sm);
    }

    .kanban-card:hover {
      box-shadow: var(--shadow);
      transform: translateY(-2px);
      border-color: var(--accent);
    }

    .kanban-card-title {
      font-size: 13.5px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 8px;
    }

    .kanban-card-meta {
      font-size: 12px;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 5px;
    }

    /* ─── STAT MINI CARDS ───────────────────────── */
    .mini-stats {
      display: flex;
      gap: 16px;
      flex-wrap: wrap;
    }

    .mini-stat {
      flex: 1;
      min-width: 120px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 14px;
      text-align: center;
    }

    .mini-stat-val {
      font-size: 22px;
      font-weight: 800;
      font-family: 'Plus Jakarta Sans', sans-serif;
    }

    .mini-stat-label {
      font-size: 11.5px;
      color: var(--text-muted);
      margin-top: 3px;
    }

    /* ─── STAFF CARD ─────────────────────────────── */
    .staff-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 10px;
    }

    .staff-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 15px 10px;
      text-align: center;
      transition: var(--transition);
      box-shadow: var(--shadow-sm);
    }

    .staff-card:hover {
      box-shadow: var(--shadow);
      transform: translateY(-2px);
      border-color: var(--accent);
    }

    .staff-avatar-lg {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      margin: 0 auto 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      font-weight: 800;
      color: #fff;
    }

    .staffViewModal .modal-body .table th{
      font-size: 13px;
      color: var(--text-muted);
      font-weight: 400;
    }
    .staffViewModal .modal-body .table td{
      font-size: 13px;
      font-weight: 400;
    }

    .staff-name {
      font-size: 14px;
      font-weight: 700;
    }

    .staff-role {
      font-size: 12px;
      color: var(--text-muted);
      margin-bottom: 14px;
    }

    .staff-stats {
      display: flex;
      gap: 0;
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
    }

    .staff-stat {
      flex: 1;
      padding: 8px 4px;
      text-align: center;
      border-right: 1px solid var(--border);
    }

    .staff-stat:last-child {
      border-right: none;
    }

    .staff-stat-val {
      font-size: 15px;
      font-weight: 800;
    }

    .staff-stat-lbl {
      font-size: 10px;
      color: var(--text-muted);
    }

    /* ─── NOTIFICATION ──────────────────────────── */
    .notif-item {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 14px 20px;
      border-bottom: 1px solid var(--border);
      transition: var(--transition);
      cursor: pointer;
    }

    .notif-item:hover {
      background: var(--surface-2);
    }

    .notif-item.unread {
      background: rgba(99, 102, 241, 0.03);
    }

    .notif-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
    }

    .notif-text {
      font-size: 13.5px;
      color: var(--text-primary);
      line-height: 1.45;
    }

    .notif-time {
      font-size: 11.5px;
      color: var(--text-muted);
      margin-top: 3px;
    }

    .notif-dot-unread {
      width: 8px;
      height: 8px;
      background: var(--accent);
      border-radius: 50%;
      margin-top: 6px;
      flex-shrink: 0;
    }

    /* ─── FILTER BAR ─────────────────────────────── */
    .filter-bar {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      padding: 14px 20px;
      background: var(--surface-2);
      border-bottom: 1px solid var(--border);
    }

    .filter-select {
      padding: 7px 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 13px;
      background: var(--surface);
      color: var(--text-primary);
      cursor: pointer;
      outline: none;
    }

    .filter-select:focus {
      border-color: var(--accent);
    }

    .filter-input {
      padding: 7px 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 13px;
      background: var(--surface);
      color: var(--text-primary);
      outline: none;
    }

    .filter-input:focus {
      border-color: var(--accent);
    }

    /* ─── REPORT CARD ────────────────────────────── */
    .report-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 16px;
    }

    /* ─── LEAD DETAIL PAGE ───────────────────────── */
    .lead-detail-grid {
      display: grid;
      grid-template-columns: 1fr 360px;
      gap: 20px;
    }

    @media(max-width:1200px) {

      .lead-detail-grid {
        grid-template-columns: 1fr;
      }
    }

    .detail-section {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 22px;
      margin-bottom: 16px;
    }

    .detail-section-title {
      font-size: 13px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-secondary);
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
    }

    .info-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-bottom: 12px;
    }

    .info-label {
      font-size: 12px;
      color: var(--text-muted);
      font-weight: 500;
      min-width: 130px;
    }

    .info-value {
      font-size: 13.5px;
      color: var(--text-primary);
      font-weight: 500;
    }

    .audit-score-circle {
      width: 90px;
      height: 90px;
      border-radius: 50%;
      background: conic-gradient(var(--accent) 0% 78%, var(--surface-3) 78% 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }

    .audit-score-inner {
      width: 70px;
      height: 70px;
      background: var(--surface);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
    }

    .audit-score-num {
      font-size: 20px;
      font-weight: 800;
      color: var(--accent);
    }

    .audit-score-lbl {
      font-size: 9px;
      color: var(--text-muted);
    }

    /* ─── TIMELINE ───────────────────────────────── */
    .timeline {
      position: relative;
      padding-left: 28px;
    }

    .timeline::before {
      content: '';
      position: absolute;
      left: 12px;
      top: 0;
      bottom: 0;
      width: 2px;
      background: var(--border);
    }

    .timeline-item {
      position: relative;
      margin-bottom: 20px;
    }

    .timeline-dot {
      position: absolute;
      left: -24px;
      top: 2px;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      border: 2px solid var(--surface);
      background: var(--accent);
      box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    }

    .timeline-content {
      font-size: 13.5px;
    }

    .timeline-title {
      font-weight: 600;
      color: var(--text-primary);
    }

    .timeline-meta {
      font-size: 12px;
      color: var(--text-muted);
      margin-top: 3px;
    }

    .timeline-body {
      font-size: 13px;
      color: var(--text-secondary);
      margin-top: 6px;
      background: var(--surface-2);
      padding: 10px 12px;
      border-radius: 8px;
    }

    /* ─── MODAL ──────────────────────────────────── */
    .modal-crm .modal-content {
      border-radius: var(--radius);
      border: 1px solid var(--border);
      box-shadow: var(--shadow-lg);
    }

    .modal-crm .modal-header {
      padding: 20px 24px;
      border-bottom: 1px solid var(--border);
    }

    .modal-crm .modal-title {
      font-size: 16px;
      font-weight: 700;
    }

    .modal-crm .modal-body {
      padding: 24px;
    }

    .modal-crm .modal-footer {
      padding: 8px 24px;
      border-top: 1px solid var(--border);
    }

    .form-group {
      margin-bottom: 6px;
    }

    .form-label-crm {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-secondary);
      margin-bottom: 6px;
      display: block;
    }

    .form-control-crm {
      width: 100%;
      padding: 7px 13px;
      border: 1px solid var(--border);
      border-radius: 6px;
      font-size: 13.5px;
      color: var(--text-primary);
      background: var(--surface);
      outline: none;
      transition: var(--transition);
    }

    .form-control-crm:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-glow);
    }

    /* ─── OVERLAY ────────────────────────────────── */
    .sidebar-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 1049;
      backdrop-filter: blur(2px);
    }

    /* ─── GLASSMORPHISM HERO ─────────────────────── */
    .glass-hero {
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
      border: 1px solid rgba(99, 102, 241, 0.15);
      border-radius: var(--radius);
      padding: 24px 28px;
      margin-bottom: 28px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      flex-wrap: wrap;
    }

    .glass-hero-left h2 {
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: 20px;
      font-weight: 800;
      color: var(--text-primary);
    }

    .glass-hero-left p {
      font-size: 13px;
      color: var(--text-secondary);
      margin-top: 4px;
    }

    .glass-hero-right {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }

    /* ─── TREND MINI ─────────────────────────────── */
    .trend-up {
      color: var(--success);
    }

    .trend-down {
      color: var(--danger);
    }

    /* ─── RESPONSIVE ─────────────────────────────── */
    @media (max-width: 992px) {
      .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
      }

      .sidebar.mobile-open {
        transform: translateX(0);
      }

      .sidebar-overlay.active {
        display: block;
      }

      .main-wrapper {
        margin-left: 0 !important;
      }

      .charts-grid {
        grid-template-columns: 1fr;
      }

      .charts-grid.three-col {
        grid-template-columns: 1fr;
      }

      .chart-card.span-2 {
        grid-column: span 1;
      }

      .lead-detail-grid {
        grid-template-columns: 1fr;
      }

      .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    @media(min-width:993px) {

      .sidebar {
        transform: none !important;
      }

      .sidebar.collapsed {
        width: 72px;
      }

      .main-wrapper.collapsed {
        margin-left: 72px;
      }
    }

    @media (max-width: 576px) {
      .page-content {
        padding: 10px;
      }

      .kpi-grid {
        grid-template-columns: 1fr 1fr;
      }

      .top-header {
        padding: 0 14px;
      }

      .header-search {
        display: none;
      }
    }

    @media(max-width:768px) {

      .top-header {
        flex-wrap: wrap;
        height: auto;
        padding: 12px;
        gap: 10px;
      }

      .breadcrumb-bar {
        width: 100%;
        order: 2;
      }

      .header-actions {
        margin-left: auto;
      }
    }

    /* ─── SCROLL ANIMATIONS ──────────────────────── */
    .fade-in {
      animation: fadeIn 0.4s ease forwards;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(12px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .count-up {
      transition: all 1.2s ease;
    }

    /* ─── CUSTOM SCROLLBAR ───────────────────────── */
    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }

    ::-webkit-scrollbar-track {
      background: transparent;
    }

    ::-webkit-scrollbar-thumb {
      background: var(--border);
      border-radius: 3px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: var(--text-muted);
    }

    /* ─── TABS ───────────────────────────────────── */
    .tab-bar {
      display: flex;
      gap: 4px;
      border-bottom: 1px solid var(--border);
      margin-bottom: 20px;
    }

    .tab-btn {
      padding: 10px 18px;
      border: none;
      background: transparent;
      font-size: 13.5px;
      font-weight: 500;
      color: var(--text-secondary);
      cursor: pointer;
      border-bottom: 2px solid transparent;
      margin-bottom: -1px;
      transition: var(--transition);
    }

    .tab-btn.active {
      color: var(--accent);
      border-bottom-color: var(--accent);
      font-weight: 600;
    }

    .tab-btn:hover {
      color: var(--text-primary);
    }

    /* ─── STATUS DOT INLINE ──────────────────────── */
    .status-online {
      color: var(--success);
    }

    .status-offline {
      color: var(--danger);
    }

    /* ─── PAGINATION ─────────────────────────────── */
    .pagination-crm {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 20px;
      border-top: 1px solid var(--border);
    }

    .pagination-info {
      font-size: 13px;
      color: var(--text-secondary);
    }

    .pagination-btns {
      display: flex;
      gap: 6px;
    }

    .page-btn {
      width: 32px;
      height: 32px;
      border: 1px solid var(--border);
      background: var(--surface);
      border-radius: 7px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12.5px;
      cursor: pointer;
      transition: var(--transition);
      font-weight: 500;
    }

    .page-btn.active {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
    }

    .page-btn:hover:not(.active) {
      border-color: var(--accent);
      color: var(--accent);
    }

    /* lead quick view panel */
    .quick-panel {
      position: fixed;
      right: -420px;
      top: 0;
      width: 420px;
      height: 100vh;
      background: var(--surface);
      border-left: 1px solid var(--border);
      z-index: 1100;
      transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    }

    .quick-panel.open {
      right: 0;
    }

    .quick-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 20px 24px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
      position: sticky;
      top: 0;
      background: var(--surface);
      z-index: 1;
    }

    .quick-panel-body {
      padding: 24px;
      flex: 1;
    }

    @media(max-width:576px) {

      .quick-panel {
        width: 100%;
        right: -100%;
      }

      .quick-panel.open {
        right: 0;
      }

      .filter-bar{
        padding: 14px 0px;
      }
    }

    /* ─── EMPTY STATE ────────────────────────────── */
    .empty-state {
      text-align: center;
      padding: 60px 20px;
      color: var(--text-muted);
    }

    .empty-state i {
      font-size: 48px;
      margin-bottom: 16px;
      opacity: 0.3;
    }

    .empty-state h4 {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-secondary);
    }

    .empty-state p {
      font-size: 13px;
    }


    .dashboard-chart-grid {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 20px;
    }

    @media(max-width:992px) {
      .dashboard-chart-grid {
        grid-template-columns: 1fr;
      }
    }
