/* ============================================================
   WorkForce CRM ERP Suite — Custom CSS
   Design: OmniCore Enterprise Design System
   Primary: #6161FF | Font: Inter | MDBootstrap 5
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons+Round');

/* ── CSS Variables ── */
:root {
  --primary: #4744e5;
  --primary-container: #6161ff;
  --on-primary: #ffffff;
  --secondary: #515f74;
  --surface: #faf9fe;
  --surface-container: #f1effc;
  --surface-low: #f5f4fd;
  --on-surface: #131b2e;
  --on-surface-variant: #464555;
  --outline: #e3e1f0;
  --surface-card: #ffffff;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #6366F1;
  --sidebar-width: 280px;
  --sidebar-collapsed: 68px;
  --topbar-height: 64px;
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --shadow-card: 0 4px 20px -2px rgba(71, 68, 229, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
  --shadow-float: 0 20px 40px -8px rgba(71, 68, 229, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.02);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-mode {
  --surface: #09071c;
  --surface-container: #120f30;
  --surface-low: #1c194e;
  --on-surface: #f3f4f6;
  --on-surface-variant: #cbd5e1;
  --outline: #2d266e;
  --surface-card: #181544;
  --secondary: #9ca3af;
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --shadow-float: 0 20px 40px -8px rgba(0, 0, 0, 0.7);
}

/* ── Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  scroll-behavior: smooth;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100% !important;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  background: var(--surface);
  color: var(--on-surface);
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--surface-low);
}

::-webkit-scrollbar-thumb {
  background: var(--outline);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, #13103a 0%, #1a1650 40%, #0f0e2a 100%);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: var(--transition);
  overflow: hidden;
}

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

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  min-height: var(--topbar-height);
  text-decoration: none;
}

.sidebar-brand .brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6161ff, #9c8fff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(97, 97, 255, 0.4);
}

.sidebar-brand .brand-text {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  transition: var(--transition);
}

.sidebar-brand .brand-sub {
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .brand-sub {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.sidebar-nav::-webkit-scrollbar {
  width: 0;
}

.nav-section-label {
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 20px 6px;
  transition: var(--transition);
}

.sidebar.collapsed .nav-section-label {
  opacity: 0;
}

.nav-item-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  border-radius: 0;
  margin: 1px 10px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-item-link.active {
  background: linear-gradient(90deg, rgba(97, 97, 255, 0.3), rgba(97, 97, 255, 0.1));
  color: #fff;
  border-left: 3px solid var(--primary-container);
}

.nav-item-link .nav-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.nav-item-link .nav-label {
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
}

.sidebar.collapsed .nav-label {
  opacity: 0;
  width: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

.sidebar.collapsed .nav-badge {
  display: none;
}

/* Sidebar submenu */
.nav-submenu {
  display: none;
  padding-left: 16px;
}

.nav-submenu.open {
  display: block;
}

.nav-submenu .nav-item-link {
  padding: 8px 20px;
  font-size: 13px;
}

.nav-arrow {
  margin-left: auto;
  font-size: 16px;
  transition: transform 0.2s;
}

.nav-item-link.has-sub.open .nav-arrow {
  transform: rotate(180deg);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-user img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(97, 97, 255, 0.5);
}

.sidebar-user .user-info .user-name {
  font-size: 13px;
  font-weight: 600;
}

.sidebar-user .user-info .user-role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.sidebar.collapsed .sidebar-user .user-info {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  height: var(--topbar-height);
  background: rgba(250, 248, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--outline);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 1030;
  transition: left 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar.sidebar-collapsed {
  left: var(--sidebar-collapsed);
}

.topbar-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: var(--transition);
}

.topbar-toggle:hover {
  background: var(--surface-container);
  color: var(--primary);
}

.topbar-breadcrumb {
  flex: 1;
}

.topbar-breadcrumb .page-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--on-surface);
  margin: 0;
}

.topbar-breadcrumb .breadcrumb {
  margin: 0;
  font-size: 12px;
}

.topbar-breadcrumb .breadcrumb-item a {
  color: var(--primary);
  text-decoration: none;
}

.topbar-breadcrumb .breadcrumb-item.active {
  color: var(--on-surface-variant);
}

.topbar-search {
  display: flex;
  align-items: center;
  background: var(--surface-low);
  border: 1px solid var(--outline);
  border-radius: var(--radius-xl);
  padding: 6px 14px;
  gap: 8px;
  transition: var(--transition);
  min-width: 220px;
}

.topbar-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(97, 97, 255, 0.12);
  background: var(--surface-card);
}

.topbar-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  color: var(--on-surface);
  width: 100%;
}

.topbar-search .material-icons-round {
  color: var(--on-surface-variant);
  font-size: 18px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--on-surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  font-size: 20px;
}

.topbar-btn:hover {
  background: var(--surface-container);
  color: var(--primary);
}

.topbar-btn .badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.topbar-notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

.topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-container);
  cursor: pointer;
}

/* Dropdown alignment safety overrides to prevent screen overflow */
.topbar-actions .dropdown {
  position: relative !important;
}
.topbar-actions .dropdown-menu-end {
  right: 0 !important;
  left: auto !important;
  position: absolute !important;
  top: 100% !important;
  margin-top: 8px !important;
  transform: none !important;
}
@media (max-width: 576px) {
  .topbar-actions .dropdown-menu-end {
    max-width: calc(100vw - 32px) !important;
    min-width: auto !important;
  }
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 24px 24px 60px 24px;
  min-height: calc(100vh - var(--topbar-height));
  transition: margin-left 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden !important;
}

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

/* ============================================================
   CARDS
   ============================================================ */
.card {
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  background: var(--surface-card);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
}

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

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--outline);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-header .card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--on-surface);
}

.card-body {
  padding: 20px;
}

/* KPI Cards */
.kpi-card {
  background: var(--surface-card);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--kpi-color, var(--primary));
}

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

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.kpi-info .kpi-label {
  font-size: 12px;
  color: var(--on-surface-variant);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-info .kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--on-surface);
  line-height: 1.2;
}

.kpi-info .kpi-change {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

.kpi-change.up {
  color: var(--success);
}

.kpi-change.down {
  color: var(--danger);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}

.badge-new {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}

.badge-assigned {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.badge-interested {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.badge-qualified {
  background: rgba(97, 97, 255, 0.12);
  color: #4744e5;
}

.badge-proposal {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.badge-info {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}

.badge-primary {
  background: rgba(71, 68, 229, 0.12);
  color: #4744e5;
}

.badge-secondary {
  background: rgba(81, 95, 116, 0.1);
  color: var(--secondary);
}

.badge-orange {
  background: rgba(234, 88, 12, 0.1);
  color: #ea580c;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(71, 68, 229, 0.3);
}

.btn-primary-custom:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(71, 68, 229, 0.4);
}

.btn-outline-custom {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-outline-custom:hover {
  background: rgba(97, 97, 255, 0.06);
}

/* ============================================================
   TABLES
   ============================================================ */
.erp-table {
  width: 100%;
  border-collapse: collapse;
}

.erp-table thead th {
  background: var(--surface-low);
  color: var(--on-surface-variant);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 16px;
  white-space: nowrap;
  border-bottom: 2px solid var(--outline);
}

.erp-table tbody tr {
  border-bottom: 1px solid rgba(199, 196, 216, 0.4);
  transition: background 0.15s;
}

.erp-table tbody tr:hover {
  background: var(--surface-low);
}

.erp-table tbody td {
  padding: 12px 16px;
  font-size: 13.5px;
  vertical-align: middle;
}

.erp-table tbody tr:last-child {
  border-bottom: none;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control-custom {
  background: var(--surface-low);
  border: 1.5px solid var(--outline);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 13.5px;
  color: var(--on-surface);
  width: 100%;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}

.form-control-custom:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface-card);
  box-shadow: 0 0 0 3px rgba(97, 97, 255, 0.12);
}

.form-label-custom {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--on-surface-variant);
  margin-bottom: 6px;
  display: block;
}

/* ============================================================
   KANBAN
   ============================================================ */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-col {
  flex-shrink: 0;
  width: 280px;
  background: var(--surface-low);
  border-radius: var(--radius-lg);
  border: 1px solid var(--outline);
  overflow: visible;
}

.kanban-col-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--outline);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.kanban-col-body {
  padding: 10px;
  min-height: 200px;
}

.kanban-card {
  background: var(--surface-card);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--outline);
  cursor: grab;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.kanban-card:hover {
  box-shadow: var(--shadow-float);
  transform: translateY(-2px);
}

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

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--outline);
}

.timeline-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  position: relative;
}

.timeline-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  z-index: 1;
  border: 2px solid #fff;
}

.timeline-content {
  flex: 1;
  background: var(--surface-low);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.timeline-content .t-title {
  font-weight: 600;
  font-size: 13.5px;
}

.timeline-content .t-time {
  font-size: 11.5px;
  color: var(--on-surface-variant);
}

/* ============================================================
   ATTENDANCE PUNCH
   ============================================================ */
.punch-card {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(49, 46, 129, 0.3), 0 8px 10px -6px rgba(49, 46, 129, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.punch-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(99, 102, 241, 0.25), transparent 70%);
  pointer-events: none;
}

.punch-time-container {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
  position: relative;
  white-space: nowrap;
}

.punch-time {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to bottom, #ffffff, #f1f5f9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.punch-ampm {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.5px;
}

.punch-date {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 20px;
  font-weight: 500;
  position: relative;
}

.punch-btn {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #6161ff, #9c8fff);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 0 0 8px rgba(97, 97, 255, 0.2), 0 8px 32px rgba(97, 97, 255, 0.4);
}

.punch-btn:hover {
  transform: scale(1.05);
}

.punch-btn .material-icons-round {
  font-size: 32px;
}

.punch-btn.punch-out {
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.2), 0 8px 32px rgba(239, 68, 68, 0.3);
}

/* ============================================================
   MOBILE BOTTOM NAV
   ============================================================ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--outline);
  padding: 8px 0 env(safe-area-inset-bottom);
  z-index: 1050;
}

.mobile-bottom-nav .nav-items {
  display: flex;
  justify-content: space-around;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 14px;
  text-decoration: none;
  color: var(--on-surface-variant);
  font-size: 10px;
  font-weight: 600;
  transition: var(--transition);
}

.mobile-nav-item.active {
  color: var(--primary);
}

.mobile-nav-item .material-icons-round {
  font-size: 22px;
}

/* FAB */
.fab {
  position: fixed;
  bottom: 72px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(97, 97, 255, 0.4);
  cursor: pointer;
  z-index: 1045;
  border: none;
  transition: var(--transition);
}

.fab:hover {
  transform: scale(1.1);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-custom .modal-content {
  border-radius: var(--radius-xl);
  border: none;
  box-shadow: 0 20px 60px rgba(19, 27, 46, 0.18);
}

.modal-custom .modal-header {
  border-bottom: 1px solid var(--outline);
  padding: 20px 24px;
}

.modal-custom .modal-body {
  padding: 24px;
}

.modal-custom .modal-footer {
  border-top: 1px solid var(--outline);
  padding: 16px 24px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .topbar {
    left: 0 !important;
  }

  .main-content {
    margin-left: 0 !important;
    padding-bottom: 120px !important;
    overflow-x: hidden !important;
  }

  .mobile-bottom-nav {
    display: block;
  }

  .topbar-search {
    min-width: 160px;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 16px 16px 120px 16px !important;
    overflow-x: hidden !important;
  }
  .topbar-breadcrumb nav {
    display: none !important;
  }

  .topbar {
    padding: 0 12px;
  }

  .topbar-search {
    display: none;
  }

  .kpi-value {
    font-size: 22px !important;
  }
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-primary-custom {
  color: var(--primary) !important;
}

.text-muted-custom {
  color: var(--on-surface-variant) !important;
}

.bg-primary-light {
  background: rgba(97, 97, 255, 0.08) !important;
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.page-header {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
}

.page-header p {
  font-size: 13px;
  color: var(--on-surface-variant);
  margin: 0;
}

.divider {
  border: none;
  border-top: 1px solid var(--outline);
  margin: 16px 0;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-md {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

/* Chart container */
.chart-container {
  position: relative;
  height: 260px;
}

/* Dropdown menu */
.dropdown-menu-custom {
  background: var(--surface-card);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  padding: 6px;
  min-width: 180px;
}

.dropdown-item-custom {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--on-surface);
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
}

.dropdown-item-custom:hover {
  background: var(--surface-low);
}

.dropdown-item-custom.danger {
  color: var(--danger);
}

.dropdown-item-custom.danger:hover {
  background: rgba(239, 68, 68, 0.06);
}

/* Notification Dropdown */
.notif-dropdown {
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: background 0.15s;
  cursor: pointer;
}

.notif-item:hover {
  background: var(--surface-low);
}

.notif-item.unread {
  background: rgba(97, 97, 255, 0.04);
}

.notif-dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.notif-text .notif-title {
  font-size: 13px;
  font-weight: 600;
}

.notif-text .notif-msg {
  font-size: 12px;
  color: var(--on-surface-variant);
}

.notif-text .notif-time {
  font-size: 11px;
  color: var(--on-surface-variant);
}

/* Alert */
.alert {
  border-radius: var(--radius-md);
  border: none;
  padding: 12px 16px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #065f46;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
}

.alert-info {
  background: rgba(99, 102, 241, 0.1);
  color: #3730a3;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state .material-icons-round {
  font-size: 56px;
  color: var(--outline);
  margin-bottom: 12px;
}

.empty-state h5 {
  font-size: 16px;
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
  color: var(--on-surface-variant);
}

/* Lead pipeline */
.pipeline-stage {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface-low);
  border-radius: var(--radius-xl);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.pipeline-stage.active {
  border-color: var(--primary);
  background: rgba(97, 97, 255, 0.08);
  color: var(--primary);
}

.pipeline-stage:hover {
  border-color: var(--outline);
}

/* Section tabs */
.section-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-low);
  border-radius: var(--radius-md);
  padding: 4px;
  overflow-x: auto !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
  max-width: 100% !important;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.section-tabs::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

.section-tab {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--on-surface-variant);
  border: none;
  background: transparent;
  flex-shrink: 0 !important;
}

.section-tab.active {
  background: var(--surface-card);
  color: var(--primary);
  box-shadow: var(--shadow-card);
}

/* Progress bar */
.progress-custom {
  height: 6px;
  border-radius: 10px;
  background: var(--surface-container);
  overflow: hidden;
}

.progress-bar-custom {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary), var(--primary-container));
  transition: width 0.6s ease;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1035;
  backdrop-filter: blur(2px);
}

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

/* Clickable Task Title Link */
.task-title-link {
  transition: var(--transition);
}
.task-title-link:hover {
  color: var(--primary) !important;
  text-decoration: underline !important;
}