/* APEX CRM - Enterprise Modern Stylesheet (HTML, CSS, PHP) */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --purple: #8b5cf6;
  --purple-light: #f5f3ff;
  --rose: #f43f5e;
  --rose-light: #fff1f2;
  --amber: #d97706;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --sidebar-w: 260px;
  --header-h: 68px;
  --radius: 10px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: #f8fafc;
  color: var(--slate-800);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: #ffffff;
  border-right: 1px solid var(--slate-200);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform 0.25s ease;
}

.brand-area {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--slate-100);
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}

.brand-text p {
  font-size: 11px;
  color: var(--slate-400);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-menu {
  padding: 20px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.nav-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-400);
  padding: 10px 12px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--slate-600);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  background: var(--slate-200);
  color: var(--slate-700);
}

.nav-item.active .nav-badge {
  background: var(--primary);
  color: #fff;
}

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--slate-50);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
}

.user-info {
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
}

/* Main Layout */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100vw - var(--sidebar-w));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Header */
.topbar {
  height: var(--header-h);
  background: #ffffff;
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.topbar-left {
  order: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 1 auto;
}

.page-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-breadcrumb {
  font-size: 11.5px;
  color: var(--slate-400);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  order: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
  margin-left: auto;
}

.topbar-attendance-widget {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  transition: all 0.2s ease !important;
  border: 1px solid var(--slate-200) !important;
  background: #f8fafc !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  height: 34px !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
}

.topbar-attendance-widget.on-shift {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}

.topbar-attendance-widget.off-duty {
  background: #f8fafc !important;
  border-color: var(--slate-200) !important;
}

.attendance-pulse-dot {
  width: 8px !important;
  height: 8px !important;
  min-width: 8px !important;
  border-radius: 50% !important;
  background-color: #10b981 !important;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 1.6s infinite cubic-bezier(0.66, 0, 0, 1);
  flex-shrink: 0 !important;
}

.attendance-offline-dot {
  width: 8px !important;
  height: 8px !important;
  min-width: 8px !important;
  border-radius: 50% !important;
  background-color: #94a3b8 !important;
  flex-shrink: 0 !important;
}

.attendance-info {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  margin-right: 4px !important;
}

.attendance-label {
  font-size: 9px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: var(--slate-500) !important;
  line-height: 1 !important;
}

.on-shift .attendance-label {
  color: #047857 !important;
}

.attendance-status-text {
  font-size: 11px !important;
  color: var(--slate-600) !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

.attendance-timer {
  font-family: monospace !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #065f46 !important;
  line-height: 1.2 !important;
}

.btn-checkin-topbar {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: #10b981 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1.2 !important;
  height: 26px !important;
  box-sizing: border-box !important;
}

.btn-checkin-topbar:hover {
  background: #059669 !important;
}

.btn-checkout-topbar {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: #ef4444 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  line-height: 1.2 !important;
  height: 26px !important;
  box-sizing: border-box !important;
}

.btn-checkout-topbar:hover {
  background: #dc2626 !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.25;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #fff;
  border-color: var(--slate-300);
  color: var(--slate-700);
}
.btn-secondary:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
}

.btn-outline-primary {
  background: transparent;
  border-color: var(--primary-border);
  color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary-light);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  white-space: nowrap !important;
  flex-shrink: 0;
}

/* Page Views Container */
.page-view {
  padding: 30px 32px;
  display: none;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.page-view.active {
  display: flex;
}

/* Metric Cards */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.metric-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-info h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-500);
  margin-bottom: 4px;
}

.metric-info .value {
  font-size: 22px;
  font-weight: 800;
  color: var(--slate-900);
}

/* Tables */
.card-table-container {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.table-header-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #fff;
}

.table-search {
  position: relative;
  min-width: 260px;
}

.table-search input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  font-size: 13px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  outline: none;
  background: var(--slate-50);
}

.table-search input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.table-search svg {
  position: absolute;
  left: 10px;
  top: 9px;
  width: 16px;
  height: 16px;
  color: var(--slate-400);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.select-filter {
  padding: 7px 12px;
  font-size: 12.5px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: #fff;
  color: var(--slate-700);
  outline: none;
  cursor: pointer;
}

.select-filter:focus {
  border-color: var(--primary);
}

.crm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.crm-table th {
  background: var(--slate-50);
  padding: 12px 18px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
  border-bottom: 1px solid var(--slate-200);
}

.crm-table td {
  padding: 14px 18px;
  font-size: 13px;
  color: var(--slate-700);
  border-bottom: 1px solid var(--slate-100);
  vertical-align: middle;
}

.crm-table tbody tr:hover {
  background-color: var(--slate-50);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-emerald { background: var(--success-light); color: var(--success); }
.badge-amber { background: var(--warning-light); color: var(--amber); }
.badge-rose { background: var(--rose-light); color: var(--rose); }
.badge-purple { background: var(--purple-light); color: var(--purple); }
.badge-gray { background: var(--slate-100); color: var(--slate-600); }

/* Priority Dot */
.priority-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}
.priority-pill.hot { color: #e11d48; }
.priority-pill.warm { color: #d97706; }
.priority-pill.cold { color: #0284c7; }

.priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.priority-pill.hot .priority-dot { background: #e11d48; box-shadow: 0 0 6px #e11d48; }
.priority-pill.warm .priority-dot { background: #d97706; }
.priority-pill.cold .priority-dot { background: #0284c7; }

/* Floating Bulk Actions Bar */
.bulk-actions-bar {
  position: fixed;
  bottom: 24px;
  left: calc(var(--sidebar-w) + 32px);
  right: 32px;
  background: var(--slate-900);
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  display: none;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-xl);
  z-index: 50;
  animation: slideUp 0.2s ease-out;
  flex-wrap: wrap;
  gap: 12px;
}

.bulk-actions-bar.active {
  display: flex !important;
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.bulk-actions-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.bulk-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Kanban Board View */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 20px;
  min-height: 600px;
}

.kanban-column {
  min-width: 290px;
  max-width: 310px;
  flex-shrink: 0;
  background: var(--slate-100);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  border: 1px solid var(--slate-200);
}

.kanban-col-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--slate-200);
}

.kanban-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-800);
}

.kanban-col-count {
  background: #fff;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--slate-600);
}

.kanban-col-val {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--slate-500);
}

.kanban-cards-container {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
}

.kanban-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.kanban-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-lead-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--slate-900);
}

.kanban-company {
  font-size: 12px;
  color: var(--slate-500);
  font-weight: 500;
}

.kanban-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--slate-100);
}

.kanban-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--slate-900);
}

.kanban-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.kanban-nav-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--slate-200);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  color: var(--slate-600);
}
.kanban-nav-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* Modals */
.modal-overlay,
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.active,
.modal-backdrop.active {
  display: flex !important;
}

.modal-box,
.modal-card {
  background: #fff;
  border-radius: 14px;
  max-width: 620px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modalPop 0.2s ease-out;
}

.modal-box.modal-lg {
  max-width: 860px;
}

@keyframes modalPop {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--slate-900);
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--slate-400);
}
.modal-close:hover { color: var(--slate-700); }

.modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--slate-50);
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-full {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--slate-700);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 9px 12px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-help {
  font-size: 11.5px;
  color: var(--slate-400);
}

/* Slide-over Drawer for Lead 360 */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 90;
  display: none;
}

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

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 760px;
  max-width: 96vw;
  background: #fff;
  z-index: 95;
  box-shadow: -10px 0 30px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--slate-200);
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--slate-300);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timeline-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-900);
}

.timeline-time {
  font-size: 11px;
  color: var(--slate-400);
}

.timeline-desc {
  font-size: 12.5px;
  color: var(--slate-600);
  background: var(--slate-50);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--slate-200);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s ease-out;
}

@keyframes toastIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-success { background: #059669; }
.toast-error { background: #dc2626; }
.toast-info { background: #2563eb; }

/* Responsive adjustments for Topbar & Layout */
@media (max-width: 1440px) {
  .topbar {
    padding: 0 16px;
    gap: 8px;
  }
  .topbar-search-trigger {
    min-width: 140px;
    max-width: 400px;
    flex: 1 1 auto;
  }
  .page-title {
    font-size: 16px;
    max-width: 320px;
  }
}

@media (max-width: 1320px) {
  .desktop-sim-btn-text {
    display: none;
  }
  .topbar-attendance-widget .attendance-label {
    display: none;
  }
}

@media (max-width: 1280px) {
  .topbar-search-trigger span {
    display: none;
  }
  .topbar-search-trigger {
    min-width: 40px;
    padding: 6px 10px;
    flex: 1 1 auto;
    max-width: 200px;
  }
  .topbar-search-trigger kbd {
    display: none;
  }
  .persona-switcher-wrap {
    padding: 3px 8px;
  }
  .persona-select {
    max-width: 130px;
  }
}

@media (max-width: 1100px) {
  .topbar-attendance-widget .attendance-info {
    display: none;
  }
  .persona-switcher-label {
    display: none;
  }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
}

/* ==========================================================================
   MODERN CRM SYSTEM OF ACTION: SPOTLIGHT, FUNNEL, TASKS & SCORING
   ========================================================================== */

/* 1. Global Spotlight Command Palette (Ctrl+K) */
.spotlight-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.spotlight-backdrop.active {
  display: flex;
}

.spotlight-box {
  background: #ffffff;
  width: 100%;
  max-width: 640px;
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  border: 1px solid var(--slate-200);
  animation: modalPop 0.15s ease-out;
}

.spotlight-input-wrap {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--slate-200);
  background: #ffffff;
}

.spotlight-input-wrap svg {
  color: var(--slate-400);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.spotlight-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 500;
  color: var(--slate-900);
  background: transparent;
}

.spotlight-input::placeholder {
  color: var(--slate-400);
}

.spotlight-kbd {
  font-size: 11px;
  font-weight: 700;
  color: var(--slate-500);
  background: var(--slate-100);
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--slate-300);
  white-space: nowrap;
}

.spotlight-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 10px;
}

.spotlight-group-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
  padding: 8px 12px 4px;
}

.spotlight-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.1s ease;
  text-decoration: none;
  color: inherit;
}

.spotlight-item:hover,
.spotlight-item.active {
  background: var(--slate-100);
}

.spotlight-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spotlight-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--slate-100);
  color: var(--slate-600);
  flex-shrink: 0;
}

.spotlight-item:hover .spotlight-icon-box {
  background: var(--primary-light);
  color: var(--primary);
}

.spotlight-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--slate-900);
}

.spotlight-item-sub {
  font-size: 12px;
  color: var(--slate-500);
}

/* 2. Lead Scoring & Tagging */
.lead-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: monospace;
}

.lead-score-high {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.lead-score-med {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.lead-score-low {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--slate-100);
  color: var(--slate-600);
  border: 1px solid var(--slate-200);
}

/* 3. Sales Funnel Analytics Visualization */
.funnel-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0;
}

.funnel-stage-row {
  display: grid;
  grid-template-columns: 160px 1fr 140px;
  align-items: center;
  gap: 16px;
}

.funnel-stage-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-800);
  display: flex;
  align-items: center;
  gap: 6px;
}

.funnel-bar-track {
  background: var(--slate-100);
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.funnel-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  padding-left: 12px;
}

.funnel-bar-label {
  position: absolute;
  left: 12px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.funnel-stage-stats {
  text-align: right;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--slate-900);
}

.funnel-conversion-pill {
  font-size: 11px;
  color: var(--slate-500);
  font-weight: 500;
}

/* 4. Action Tasks & Follow-ups */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.task-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow);
}

.task-card.completed {
  opacity: 0.6;
  background: var(--slate-50);
}

.task-card.completed .task-title {
  text-decoration: line-through;
  color: var(--slate-400);
}

.task-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.task-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.task-type-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--slate-100);
  color: var(--slate-600);
}

.task-due-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.task-due-overdue {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.task-due-today {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.task-due-upcoming {
  background: var(--slate-100);
  color: var(--slate-600);
}

/* 5. Simplified Admin Hub Tab Navigation */
.admin-tab-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--slate-200);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.admin-tab-btn {
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 8px;
  background: transparent;
  color: var(--slate-600);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-tab-btn:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}

.admin-tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  border-color: var(--slate-300);
  box-shadow: var(--shadow-sm);
}

/* 6. Lead 360 Drawer Tabbed Segments */
.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--slate-200);
  background: var(--slate-50);
}

.drawer-tab {
  flex: 1;
  text-align: center;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.drawer-tab:hover {
  color: var(--slate-800);
}

.drawer-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #ffffff;
}

.drawer-tab-content {
  display: none;
}

.drawer-tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.topbar-search-trigger {
  order: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 6px 14px;
  color: var(--slate-500);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 180px;
  max-width: 500px;
  flex: 1 1 auto;
}

.topbar-search-trigger svg {
  width: 16px;
  height: 16px;
  min-width: 16px;
  max-width: 16px;
  flex-shrink: 0;
}

.topbar-search-trigger span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-search-trigger:hover {
  background: #ffffff;
  border-color: var(--slate-300);
  box-shadow: var(--shadow-sm);
  color: var(--slate-700);
}

.topbar-search-trigger kbd {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--slate-500);
  background: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--slate-300);
  flex-shrink: 0;
}

.quick-filter-chips {
  display: flex;
  gap: 6px;
  align-items: center;
}

.quick-chip {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 9999px;
  border: 1px solid var(--slate-300);
  background: #ffffff;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-chip:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}


/* ==========================================================================
   AUTOMATION PANEL & WORKFLOW ENGINE STYLES
   ========================================================================== */

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  vertical-align: middle;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--slate-300);
  transition: .25s ease;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--success);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.automation-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.automation-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 18px 22px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.automation-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.automation-card.disabled {
  background: var(--slate-50);
  opacity: 0.78;
  border-style: dashed;
}

.automation-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.automation-card-info {
  flex: 1;
}

.automation-card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.automation-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-900);
}

.automation-card-desc {
  font-size: 13px;
  color: var(--slate-600);
  line-height: 1.4;
}

.automation-trigger-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.automation-flow-chain {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: var(--slate-50);
  border-radius: 8px;
  border: 1px solid var(--slate-200);
  font-size: 12px;
}

.flow-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
}

.flow-step-trigger {
  background: #ede9fe;
  color: #6d28d9;
}

.flow-step-condition {
  background: #fef3c7;
  color: #92400e;
}

.flow-step-action {
  background: #dcfce7;
  color: #166534;
}

.flow-arrow {
  color: var(--slate-400);
  font-size: 12px;
}

.automation-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--slate-500);
  padding-top: 6px;
  border-top: 1px solid var(--slate-100);
}

.automation-stats-pills {
  display: flex;
  gap: 16px;
  align-items: center;
}

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

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.recipe-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.recipe-icon-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.recipe-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #eef2ff;
  color: var(--primary);
  flex-shrink: 0;
}

.recipe-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-900);
}

.recipe-desc {
  font-size: 13px;
  color: var(--slate-600);
  line-height: 1.45;
  flex: 1;
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recipe-tag {
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.builder-section {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.builder-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.builder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  background: #ffffff;
  padding: 10px 12px;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
}

.builder-row select, .builder-row input {
  padding: 6px 10px;
  font-size: 13px;
}

.builder-remove-btn {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.builder-remove-btn:hover {
  opacity: 1;
}

.test-run-result-box {
  background: #0f172a;
  color: #a7f3d0;
  font-family: Consolas, Monaco, 'Courier New', monospace;
  font-size: 12px;
  padding: 14px;
  border-radius: 8px;
  max-height: 260px;
  overflow-y: auto;
  line-height: 1.6;
  white-space: pre-wrap;
  border: 1px solid #334155;
}

/* Persona Switcher in Topbar */
.persona-switcher-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}
.persona-switcher-label {
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.persona-select {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-800);
  cursor: pointer;
  outline: none;
  max-width: 170px;
  text-overflow: ellipsis;
}
.persona-select:focus {
  outline: none;
}

/* Ownership & Reassignment Badges & Buttons */
.ownership-locked-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  cursor: help;
}

.ownership-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.ownership-badge.authorized {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.ownership-transfer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* User Access Settings Modal */
.user-access-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  margin-bottom: 18px;
}
.user-access-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.access-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  background: #ffffff;
  margin-bottom: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.access-setting-row:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}
.access-setting-info {
  flex: 1;
  padding-right: 16px;
}
.access-setting-info h5 {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 2px;
}
.access-setting-info p {
  font-size: 11.5px;
  color: var(--slate-500);
  line-height: 1.35;
}

/* Switch Toggle Component */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--slate-300);
  transition: .2s;
  border-radius: 22px;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}
.switch-toggle input:checked + .switch-slider {
  background-color: var(--primary);
}
.switch-toggle input:checked + .switch-slider:before {
  transform: translateX(18px);
}

/* Lead Status Pills (Contact Lifecycle) */
.lead-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}
.lead-status-pill .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.status-pill-new { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.status-pill-new .status-dot { background: #2563eb; }

.status-pill-attempted-contact { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.status-pill-attempted-contact .status-dot { background: #d97706; }

.status-pill-contacted { background: #e0e7ff; color: #4338ca; border: 1px solid #c7d2fe; }
.status-pill-contacted .status-dot { background: #4f46e5; }

.status-pill-working { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.status-pill-working .status-dot { background: #9333ea; }

.status-pill-qualified { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.status-pill-qualified .status-dot { background: #059669; }

.status-pill-unqualified { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.status-pill-unqualified .status-dot { background: #64748b; }

.status-pill-nurture { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; }
.status-pill-nurture .status-dot { background: #0891b2; }

.status-pill-disqualified { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.status-pill-disqualified .status-dot { background: #e11d48; }

/* Operational Calling Dispositions, Temperature & Lead Statuses */
.status-pill-ringing { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.status-pill-ringing .status-dot { background: #d97706; }

.status-pill-ask-info { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.status-pill-ask-info .status-dot { background: #16a34a; }

.status-pill-call-back { background: #e0e7ff; color: #4338ca; border: 1px solid #c7d2fe; }
.status-pill-call-back .status-dot { background: #4f46e5; }

.status-pill-needs-followup { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.status-pill-needs-followup .status-dot { background: #ea580c; }

.status-pill-not-int { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.status-pill-not-int .status-dot { background: #64748b; }

.status-pill-invalid-num { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.status-pill-invalid-num .status-dot { background: #e11d48; }

.status-pill-warm { background: #fefce8; color: #a16207; border: 1px solid #fef08a; }
.status-pill-warm .status-dot { background: #eab308; }

.status-pill-cold { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.status-pill-cold .status-dot { background: #3b82f6; }

.status-pill-frozen { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; }
.status-pill-frozen .status-dot { background: #06b6d4; }

.status-pill-hot { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.status-pill-hot .status-dot { background: #ef4444; }

.status-pill-other-lc { background: #faf5ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.status-pill-other-lc .status-dot { background: #9333ea; }

.status-pill-duplicate { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.status-pill-duplicate .status-dot { background: #94a3b8; }

.status-pill-registered { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.status-pill-registered .status-dot { background: #10b981; }

.status-pill-already-mba { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.status-pill-already-mba .status-dot { background: #7c3aed; }

.status-pill-switch-off { background: #fdf2f8; color: #be185d; border: 1px solid #fbcfe8; }
.status-pill-switch-off .status-dot { background: #db2777; }

/* Status & Stage Progression Controller */
.progression-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 16px;
  margin-top: 14px;
  box-shadow: var(--shadow-sm);
}
.progression-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.progression-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 6px;
}
.progression-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stage-lock-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  margin-top: 8px;
}
.stage-unlocked-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  margin-top: 8px;
}
.admin-override-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  margin-top: 8px;
}
.bulk-stage-admin-badge {
  background: #ede9fe;
  color: #6d28d9;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

/* ================= ATTENDANCE & SHIFT TRACKING STYLES ================= */
.topbar-attendance-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  transition: all 0.2s ease;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.topbar-attendance-widget.on-shift {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.topbar-attendance-widget.off-duty {
  background: #f8fafc;
  border-color: var(--slate-200);
}

.attendance-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 1.6s infinite cubic-bezier(0.66, 0, 0, 1);
  flex-shrink: 0;
}

.attendance-offline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #94a3b8;
  flex-shrink: 0;
}

@keyframes pulseGreen {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.attendance-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.attendance-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--slate-500);
  white-space: nowrap !important;
}

.on-shift .attendance-label {
  color: #047857;
}

.attendance-timer {
  font-family: monospace;
  font-size: 12.5px;
  font-weight: 800;
  color: #065f46;
  white-space: nowrap !important;
}

.attendance-status-text {
  font-size: 11px;
  color: var(--slate-500);
  font-weight: 500;
  white-space: nowrap !important;
}

.btn-checkin-topbar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.btn-checkin-topbar:hover {
  background: #059669;
}

.btn-checkout-topbar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.btn-checkout-topbar:hover {
  background: #dc2626;
}

/* Sub-views Pills & Filters */
.pill-nav {
  display: inline-flex;
  background: var(--slate-100);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--slate-200);
}

.pill-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--slate-600);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn.active {
  background: #ffffff;
  color: var(--slate-900);
  box-shadow: var(--shadow-sm);
}

.pulse-dot-sm {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  animation: pulseGreen 1.4s infinite;
}

.pulse-tag {
  font-size: 9px;
  font-weight: 800;
  background: #d1fae5;
  color: #065f46;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  animation: pulseGreen 2s infinite;
}

.auth-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.auth-badge.online {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.auth-badge.offline {
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

/* ================= FULL-SCREEN LOGIN PORTAL ================= */
.login-page-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 15%, #1e1b4b 0%, #0f172a 60%, #020617 100%);
  color: var(--slate-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  position: relative;
  overflow-y: auto;
}

.login-wrapper {
  width: 100%;
  max-width: 480px;
  padding: 32px 20px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.3s ease-in-out;
}

.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.brand-logo-lg {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 900;
  margin: 0 auto 14px;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.5);
}

.login-brand h1 {
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin: 0;
}

.login-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
}

.login-card {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  padding: 28px;
  width: 100%;
}

.login-role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--slate-100);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 18px;
}

.role-selector-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.role-selector-btn.active {
  background: #ffffff;
  color: var(--slate-900);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.login-role-badge-banner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  margin-bottom: 18px;
}

.role-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-badge.admin {
  color: #6d28d9;
}

.role-badge.user {
  color: var(--primary);
}

.role-desc {
  font-size: 12px;
  color: var(--slate-500);
  line-height: 1.4;
}

.login-alert-box {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 18px;
}

.login-alert-box.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.login-alert-box.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.login-alert-box.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-leading-icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--slate-400);
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  font-size: 13.5px;
  outline: none;
  transition: all 0.15s ease;
}

.input-with-icon input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-password-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  padding: 4px;
  color: var(--slate-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-password-toggle:hover {
  color: var(--slate-700);
}

.btn-login-submit {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  cursor: pointer;
}

.login-quick-creds {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--slate-100);
}

.quick-creds-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--slate-600);
  margin-bottom: 10px;
}

.quick-creds-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  width: 100%;
}

.quick-chip:hover {
  background: #ffffff;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--slate-200);
  color: var(--slate-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.quick-chip.admin .chip-avatar {
  background: #ede9fe;
  color: #6d28d9;
}

.chip-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.chip-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--slate-900);
}

.chip-sub {
  font-size: 11px;
  color: var(--slate-500);
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: #94a3b8;
}

.login-footer a {
  color: #a5b4fc;
  text-decoration: none;
  font-weight: 600;
}

.login-footer a:hover {
  text-decoration: underline;
}

.login-copy {
  margin-top: 8px;
  font-size: 11px;
  color: #64748b;
}







/* Role Mode Differentiation & User Sales Workspace */
.sidebar-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  margin-top: 8px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.role-badge-admin {
  background: rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
  border: 1px solid rgba(165, 180, 252, 0.4);
}

.role-badge-user {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  border: 1px solid rgba(110, 231, 183, 0.4);
}

.user-workspace-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border-radius: var(--radius);
  padding: 22px 24px;
  color: #ffffff;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.user-workspace-hero h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #f8fafc;
}

.user-workspace-hero p {
  font-size: 13px;
  color: #94a3b8;
}

.punch-card-wrapper {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.user-cockpit-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .user-cockpit-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SIMPLIFIED & DETAILED ATTENDANCE SYSTEM STYLES
   ========================================================================== */

/* Segmented View Mode Switcher (Simple vs Detailed) */
.view-mode-toggle-group {
  display: inline-flex;
  background: var(--slate-100);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--slate-200);
  gap: 2px;
}

.view-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-600);
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.view-mode-btn:hover {
  color: var(--slate-900);
  background: rgba(255, 255, 255, 0.5);
}

.view-mode-btn.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Live Team Pulse Bar (Executive Simple Overview) */
.team-pulse-bar {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: #ffffff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.15);
}

.team-pulse-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulse-beacon {
  width: 11px;
  height: 11px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: beacon-pulse 1.8s infinite;
}

@keyframes beacon-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.team-pulse-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pulse-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 3px 10px 3px 5px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}

.pulse-chip img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #34d399;
}

/* Simple Team Roster Grid & Cards */
.simple-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.simple-roster-card {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.simple-roster-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--slate-300);
}

.simple-roster-card.is-on-shift {
  border-left: 4px solid #10b981;
}

.simple-roster-card.is-off-duty {
  border-left: 4px solid var(--slate-300);
}

.card-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.card-user-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.card-user-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--slate-200);
}

.card-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #ffffff;
}

.card-status-dot.online {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.card-status-dot.offline {
  background: var(--slate-400);
}

.card-meta-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--slate-50);
  border-radius: 6px;
  border: 1px solid var(--slate-100);
}

.card-meta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--slate-600);
}

.card-meta-item strong {
  color: var(--slate-800);
}

/* User Simple Shift Summary Timeline */
.user-simple-shifts-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-shift-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  transition: all 0.15s ease;
}

.user-shift-summary-card:hover {
  border-color: var(--slate-300);
  box-shadow: var(--shadow-sm);
}

.user-shift-summary-card.active-shift {
  border-left: 4px solid #10b981;
  background: #f0fdf4;
}

.user-shift-timeline {
  position: relative;
  padding-left: 20px;
}

.user-shift-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--slate-200);
}

.user-shift-timeline-item {
  position: relative;
  margin-bottom: 14px;
}

.user-shift-timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #ffffff;
}

.user-shift-timeline-item.active::before {
  background: #10b981;
  animation: beacon-pulse 1.8s infinite;
}

/* Shift Details Modal Styling */
.shift-detail-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.shift-detail-row {
  background: var(--slate-50);
  border-radius: 6px;
}

.shift-detail-row td {
  padding: 9px 12px;
  font-size: 12.5px;
}

.shift-detail-label {
  font-weight: 600;
  color: var(--slate-500);
  width: 140px;
  vertical-align: top;
}

.shift-detail-value {
  color: var(--slate-900);
  font-weight: 500;
  word-break: break-word;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--slate-200);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11.5px;
  color: var(--slate-800);
}

/* ================= MULTI-STATUS CHIPS & FLOWCHART STYLES ================= */
.status-pill-whatsapp {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.status-pill-demo {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}
.status-pill-quote {
  background: #fdf2f8;
  color: #be185d;
  border: 1px solid #fbcfe8;
}

.multi-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.multi-status-chip:hover {
  border-color: #94a3b8;
  background: #e2e8f0;
}
.multi-status-chip .chip-remove-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  border-radius: 3px;
}
.multi-status-chip .chip-remove-btn:hover {
  color: #ef4444;
  background: #fee2e2;
}

/* Architecture Banner */
.flowchart-architecture-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.arch-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
}
.arch-stage-badge {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
}
.arch-status-badge {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.arch-icon {
  font-size: 18px;
}

/* Flowchart Track & Horizontal Scrollable Canvas */
.flowchart-canvas {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 20px;
}
.flowchart-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-width: 100%;
  width: max-content;
}

.flowchart-node-wrap {
  display: flex;
  align-items: center;
}

.flowchart-stage-card {
  width: 290px;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-top-width: 4px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.flowchart-stage-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.flowchart-stage-card.border-top-indigo { border-top-color: #6366f1; }
.flowchart-stage-card.border-top-sky { border-top-color: #0284c7; }
.flowchart-stage-card.border-top-amber { border-top-color: #d97706; }
.flowchart-stage-card.border-top-orange { border-top-color: #ea580c; }
.flowchart-stage-card.border-top-emerald { border-top-color: #10b981; }
.flowchart-stage-card.border-top-rose { border-top-color: #f43f5e; }
.flowchart-stage-card.border-top-purple { border-top-color: #8b5cf6; }
.flowchart-stage-card.border-top-blue { border-top-color: #3b82f6; }
.flowchart-stage-card.border-top-slate { border-top-color: #64748b; }

.flowchart-stage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.flowchart-step-indicator {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--slate-400);
  text-transform: uppercase;
}
.flowchart-stage-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--slate-900);
  margin-top: 2px;
}
.flowchart-prob-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.flowchart-stage-rule-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--slate-50);
  border-radius: 6px;
  font-size: 11px;
  color: var(--slate-600);
  font-weight: 600;
}

/* Statuses Container */
.flowchart-statuses-container {
  background: #f8fafc;
  border: 1px dashed var(--slate-300);
  border-radius: 8px;
  padding: 10px;
}
.flowchart-statuses-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--slate-500);
  margin-bottom: 8px;
}
.multi-allowed-badge {
  font-size: 9.5px;
  background: #ecfdf5;
  color: #047857;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.flowchart-statuses-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.flowchart-status-item {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  padding: 8px 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.flowchart-status-main {
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot-emerald { background: #10b981; }
.status-dot-teal { background: #14b8a6; }
.status-dot-sky { background: #0ea5e9; }
.status-dot-indigo { background: #6366f1; }
.status-dot-amber { background: #f59e0b; }
.status-dot-rose { background: #f43f5e; }
.status-dot-purple { background: #a855f7; }
.status-dot-slate { background: #64748b; }
.status-dot-blue { background: #3b82f6; }

.flowchart-status-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--slate-800);
  flex: 1;
}
.status-default-chip {
  font-size: 9.5px;
  background: var(--slate-100);
  color: var(--slate-600);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

.flowchart-status-auto {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: #4f46e5;
  background: #f5f3ff;
  padding: 3px 6px;
  border-radius: 4px;
  border-left: 2px solid #6366f1;
}
.auto-lightning {
  font-size: 11px;
}
.auto-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flowchart-status-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 2px;
}
.btn-icon-subtle {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--slate-400);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
.btn-icon-subtle:hover {
  background: var(--slate-100);
  color: var(--slate-800);
}
.btn-icon-subtle.text-danger:hover {
  color: #ef4444;
  background: #fee2e2;
}

.btn-add-status {
  width: 100%;
  padding: 6px;
  background: #ffffff;
  border: 1px dashed var(--slate-300);
  color: var(--primary);
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-add-status:hover {
  background: #f0fdf4;
  border-color: var(--primary);
}

/* Connector Arrow */
.flowchart-arrow-wrap {
  display: flex;
  align-items: center;
  padding: 0 8px;
}
.flowchart-arrow-line {
  width: 24px;
  height: 2px;
  background: linear-gradient(to right, var(--slate-300), var(--slate-400));
}
.flowchart-arrow-head {
  font-size: 20px;
  color: var(--slate-400);
  line-height: 1;
  margin-left: -2px;
}

/* ==========================================================================
   ENTERPRISE MOBILE VERSION: RESPONSIVE APP, DOCK, DRAWER & SIMULATOR
   ========================================================================== */

/* 1. Mobile Menu Toggle Button (Default: hidden on desktop) */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  border: 1px solid var(--slate-200);
  background: #ffffff;
  color: var(--slate-700);
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 8px;
  transition: all 0.15s ease;
  padding: 0;
}
.mobile-menu-btn:hover {
  background: var(--slate-100);
  border-color: var(--slate-300);
}
.mobile-menu-btn svg {
  display: block;
}

/* 2. Mobile Sidebar Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* 3. Mobile Bottom Navigation Dock */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #ffffff;
  border-top: 1px solid var(--slate-200);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  z-index: 90;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px calc(env(safe-area-inset-bottom, 0px) + 2px);
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  color: var(--slate-400);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  height: 100%;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  padding: 4px 0;
}
.mobile-nav-item svg {
  stroke: var(--slate-400);
  transition: stroke 0.15s ease;
}
.mobile-nav-item.active {
  color: var(--primary);
  font-weight: 700;
}
.mobile-nav-item.active svg {
  stroke: var(--primary);
  stroke-width: 2.2;
}

.mobile-nav-fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translateY(-12px);
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  margin: 0 4px;
}
.mobile-nav-fab:active {
  transform: translateY(-9px) scale(0.95);
}

/* 4. Mobile Quick Action Sheet */
.mobile-action-sheet {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  padding: 12px 20px 28px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
  animation: sheetSlideUp 0.22s ease-out;
}
@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.mobile-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--slate-300);
  margin: 0 auto 12px;
}
.mobile-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.mobile-sheet-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--slate-900);
  margin: 0;
}
.mobile-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mobile-sheet-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
}
.mobile-sheet-btn:hover, .mobile-sheet-btn:active {
  background: #f1f5f9;
  border-color: var(--slate-300);
}
.mobile-sheet-btn.primary {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.mobile-sheet-btn.primary:hover {
  background: #dbeafe;
}
.mobile-sheet-btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mobile-sheet-btn strong {
  display: block;
  font-size: 13.5px;
  color: var(--slate-900);
  font-weight: 700;
  margin-bottom: 2px;
}
.mobile-sheet-btn span {
  font-size: 11.5px;
  color: var(--slate-500);
  line-height: 1.2;
}

/* 5. Desktop Mobile Simulator Banner & Device Bezel */
.mobile-sim-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 38px;
  background: #0f172a;
  color: #f8fafc;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Dashboard Two-Column Layout (stacked on mobile/simulator) */
.dashboard-two-col-center {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

/* Floating View Mode Switcher Pill (Persistent 1-Tap Toggle) */
.floating-mode-switch {
  position: fixed;
  bottom: 74px;
  right: 16px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #1e293b;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}
.floating-mode-switch:hover {
  background: #0f172a;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
body.mobile-sim-active .floating-mode-switch {
  display: none;
}
body.mode-desktop .floating-mode-switch {
  display: none !important;
}
@media (min-width: 901px) {
  .floating-mode-switch {
    display: none !important;
  }
}

body.mobile-sim-active {
  background: #020617 !important;
  padding-top: 48px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  min-height: 100vh !important;
  overflow-x: hidden !important;
}

body.mobile-sim-active .main-content {
  width: 390px !important;
  max-width: 390px !important;
  margin: 10px auto 40px !important;
  height: 844px !important;
  border: 12px solid #1e293b !important;
  border-radius: 46px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 0 2px rgba(255, 255, 255, 0.1) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: var(--bg-main) !important;
  position: relative !important;
  padding-bottom: 70px !important;
}

body.mobile-sim-active .sidebar {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  height: 100% !important;
  z-index: 100 !important;
  transform: translateX(-100%) !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
body.mobile-sim-active .sidebar.open {
  transform: translateX(0) !important;
}
body.mobile-sim-active .mobile-menu-btn {
  display: inline-flex !important;
}
body.mobile-sim-active .mobile-bottom-nav {
  display: flex !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
}
body.mobile-sim-active .topbar {
  padding: 8px 12px !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  height: auto !important;
  min-height: 52px !important;
}
body.mobile-sim-active .topbar-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 1 !important;
  min-width: 0 !important;
}
body.mobile-sim-active .page-title {
  font-size: 14.5px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 140px !important;
}
body.mobile-sim-active .page-breadcrumb {
  display: none !important;
}
body.mobile-sim-active .topbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
}
body.mobile-sim-active .topbar-attendance-widget {
  padding: 3px 6px !important;
  height: 30px !important;
}
body.mobile-sim-active .topbar-attendance-widget .attendance-info {
  display: none !important;
}
body.mobile-sim-active .topbar-search-trigger {
  order: 3 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 2px 0 0 0 !important;
  height: 34px !important;
  padding: 6px 10px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}
body.mobile-sim-active .topbar-search-trigger span {
  display: inline !important;
  font-size: 12px !important;
  color: var(--slate-400) !important;
}
body.mobile-sim-active .topbar-search-trigger kbd {
  display: none !important;
}
body.mobile-sim-active .topbar-right #topbarAddTaskBtn,
body.mobile-sim-active .topbar-right #topbarAddLeadBtn {
  display: none !important;
}
body.mobile-sim-active .page-view {
  padding: 14px 12px 24px 12px !important;
  gap: 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
body.mobile-sim-active .metrics-row {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
}
body.mobile-sim-active .funnel-stage-row {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  row-gap: 6px !important;
  column-gap: 8px !important;
  padding: 10px 12px !important;
  background: #ffffff !important;
  border: 1px solid var(--slate-200) !important;
  border-radius: 8px !important;
  align-items: center !important;
}
body.mobile-sim-active .funnel-stage-name {
  grid-column: 1 !important;
  font-size: 12.5px !important;
}
body.mobile-sim-active .funnel-stage-stats {
  grid-column: 2 !important;
  text-align: right !important;
  font-size: 12px !important;
}
body.mobile-sim-active .funnel-bar-track {
  grid-column: 1 / -1 !important;
  height: 22px !important;
}
body.mobile-sim-active .dashboard-two-col-center {
  grid-template-columns: 1fr !important;
  gap: 16px !important;
}
body.mobile-sim-active .lead-drawer {
  width: 100% !important;
  max-width: 100% !important;
}

/* 6. Comprehensive Mobile Viewport Media Queries (Real Mobile Devices) */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    width: 100%;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .dashboard-two-col-center {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }
  body {
    padding-bottom: 70px;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .topbar {
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
    height: auto;
    min-height: 52px;
  }
  .topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
  }
  .topbar-title-wrap {
    min-width: 0;
    flex: 1;
  }
  .page-title {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
  }
  .page-breadcrumb {
    display: none;
  }
  .topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .topbar-attendance-widget {
    padding: 3px 6px !important;
    height: 30px !important;
  }
  .topbar-attendance-widget .attendance-info {
    display: none !important;
  }
  .btn-checkin-topbar, .btn-checkout-topbar {
    height: 24px !important;
    padding: 2px 6px !important;
    font-size: 10px !important;
  }
  .topbar-search-trigger {
    order: 3;
    width: 100%;
    max-width: 100% !important;
    margin: 2px 0 0 0;
    height: 34px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .topbar-search-trigger span {
    display: inline !important;
    font-size: 12px;
    color: var(--slate-400);
  }
  .topbar-search-trigger kbd {
    display: none;
  }
  .topbar-right #topbarAddTaskBtn,
  .topbar-right #topbarAddLeadBtn {
    display: none !important;
  }
  .page-view {
    padding: 14px 12px 24px 12px !important;
    gap: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .metrics-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .metric-card {
    padding: 12px 14px !important;
  }
  .metric-info h4 {
    font-size: 10.5px !important;
  }
  .metric-info .value {
    font-size: 17px !important;
  }
  .user-workspace-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .funnel-stage-row {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    row-gap: 6px !important;
    column-gap: 8px !important;
    padding: 10px 12px !important;
    background: #ffffff !important;
    border: 1px solid var(--slate-200) !important;
    border-radius: 8px !important;
    align-items: center !important;
  }
  .funnel-stage-name {
    grid-column: 1 !important;
    font-size: 12.5px !important;
  }
  .funnel-stage-stats {
    grid-column: 2 !important;
    text-align: right !important;
    font-size: 12px !important;
  }
  .funnel-bar-track {
    grid-column: 1 / -1 !important;
    height: 22px !important;
  }
  .funnel-stage-item {
    padding: 8px 10px;
  }
  .lead-drawer {
    width: 100% !important;
    max-width: 100% !important;
    border-left: none;
  }
  .modal-dialog {
    width: 95% !important;
    max-width: 95% !important;
    margin: 16px auto !important;
    padding: 16px !important;
  }
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .card-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .table-header-toolbar {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  .table-search {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 6px 10px;
  }
  .topbar-right {
    gap: 4px;
  }
  .topbar-attendance-widget {
    padding: 3px 5px !important;
  }
  .topbar-attendance-widget .attendance-info {
    display: none !important;
  }
  .desktop-sim-btn-text {
    display: none;
  }
  .metrics-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .funnel-stage-bar {
    height: 18px;
  }
  .floating-mode-switch {
    bottom: 68px;
    right: 12px;
    padding: 6px 12px;
    font-size: 11px;
  }
}

/* ================= FORCE WEB / DESKTOP MODE OVERRIDES ================= */
/* When user clicks "Switch back to Web Mode", force complete widescreen desktop layout */
body.mode-desktop {
  min-width: 1024px !important;
  overflow-x: auto !important;
  padding-bottom: 0 !important;
  display: flex !important;
  background: #f8fafc !important;
}

body.mode-desktop .sidebar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: var(--sidebar-w) !important;
  transform: none !important;
  box-shadow: none !important;
  display: flex !important;
  z-index: 40 !important;
}

body.mode-desktop .sidebar-backdrop {
  display: none !important;
}

body.mode-desktop .main-content {
  margin-left: var(--sidebar-w) !important;
  width: calc(100vw - var(--sidebar-w)) !important;
  max-width: calc(100vw - var(--sidebar-w)) !important;
  min-width: 0 !important;
  height: auto !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding-bottom: 30px !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

body.mode-desktop .mobile-menu-btn {
  display: none !important;
}

body.mode-desktop .mobile-bottom-nav {
  display: none !important;
}

body.mode-desktop .topbar {
  padding: 0 24px !important;
  flex-wrap: nowrap !important;
  height: var(--header-h) !important;
  min-height: var(--header-h) !important;
}

body.mode-desktop .page-breadcrumb {
  display: block !important;
}

body.mode-desktop .page-title {
  font-size: 18px !important;
  max-width: none !important;
}

body.mode-desktop .topbar-left {
  order: 1 !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
}

body.mode-desktop .topbar-search-trigger {
  order: 2 !important;
  max-width: 500px !important;
  width: auto !important;
  flex: 1 1 auto !important;
}

body.mode-desktop .topbar-right {
  order: 3 !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
}

body.mode-desktop .topbar-search-trigger span {
  display: inline !important;
}

body.mode-desktop .topbar-search-trigger kbd {
  display: inline-block !important;
}

body.mode-desktop .topbar-right #topbarAddTaskBtn,
body.mode-desktop .topbar-right #topbarAddLeadBtn {
  display: inline-flex !important;
}

body.mode-desktop .topbar-attendance-widget .attendance-info {
  display: flex !important;
}

body.mode-desktop .desktop-sim-btn-text {
  display: inline !important;
}

body.mode-desktop .page-view {
  padding: 30px 32px !important;
}

body.mode-desktop .dashboard-two-col-center {
  grid-template-columns: 1.2fr 1fr !important;
  gap: 24px !important;
}

body.mode-desktop .funnel-stage-row {
  grid-template-columns: 160px 1fr 140px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

body.mode-desktop .funnel-bar-track {
  grid-column: auto !important;
  height: 28px !important;
}

body.mode-desktop .funnel-stage-name {
  grid-column: auto !important;
}

body.mode-desktop .funnel-stage-stats {
  grid-column: auto !important;
}

body.mode-desktop .metrics-row {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 16px !important;
}