/* Solar India 365 CRM - Admin Stylesheet */
:root {
  --crm-bg: #f8fafc;
  --crm-card-bg: #ffffff;
  --crm-sidebar-bg: #0f172a;
  --crm-sidebar-hover: #1e293b;
  --crm-sidebar-text: #94a3b8;
  --crm-sidebar-active: #3b82f6;
  
  --crm-primary: #2563eb;
  --crm-primary-dark: #1d4ed8;
  --crm-primary-light: #eff6ff;
  --crm-amber: #f59e0b;
  --crm-amber-light: #fef3c7;
  --crm-emerald: #10b981;
  --crm-emerald-light: #ecfdf5;
  --crm-rose: #ef4444;
  --crm-rose-light: #fef2f2;
  --crm-purple: #8b5cf6;
  --crm-purple-light: #f5f3ff;
  --crm-indigo: #6366f1;
  --crm-indigo-light: #eef2ff;

  --crm-text-main: #0f172a;
  --crm-text-muted: #64748b;
  --crm-border: #e2e8f0;
  --crm-border-light: #f1f5f9;
  
  --crm-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --crm-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --crm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--crm-bg);
  color: var(--crm-text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
}

/* CRM Layout */
.crm-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar */
.crm-sidebar {
  width: 260px;
  background-color: var(--crm-sidebar-bg);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-brand {
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-brand h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}
.sidebar-brand span {
  color: var(--crm-amber);
}
.sidebar-menu {
  list-style: none;
  padding: 1.25rem 0.75rem;
  flex: 1;
  overflow-y: auto;
}
.sidebar-menu li {
  margin-bottom: 0.35rem;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  color: var(--crm-sidebar-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.2s ease;
}
.sidebar-link:hover {
  background-color: var(--crm-sidebar-hover);
  color: #ffffff;
}
.sidebar-link.active {
  background: linear-gradient(135deg, var(--crm-primary) 0%, var(--crm-primary-dark) 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.sidebar-link .icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}
.sidebar-badge {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}
.sidebar-badge.alert {
  background: var(--crm-rose);
}

.sidebar-expand-collapse-controls {
  padding: 0.25rem 0.5rem 0.5rem;
  display: flex;
  justify-content: flex-end;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0.5rem;
}
.btn-sidebar-toggle-all {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}
.btn-sidebar-toggle-all:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.sidebar-nav-section {
  margin-bottom: 0.5rem;
}
.sidebar-menu-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 6px;
  user-select: none;
  transition: all 0.2s ease;
}
.sidebar-menu-section-header:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}
.sidebar-menu-section-header .section-toggle-icon {
  font-size: 0.8rem;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.sidebar-section-items {
  list-style: none;
  padding: 0;
  margin: 0.2rem 0 0 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  max-height: 800px;
  opacity: 1;
  overflow: hidden;
}

/* Collapsed Section State */
.sidebar-nav-section.is-collapsed .sidebar-menu-section-header .section-toggle-icon {
  transform: rotate(-90deg);
}
.sidebar-nav-section.is-collapsed .sidebar-section-items {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: var(--crm-sidebar-text);
  transition: opacity 0.2s ease;
}

/* Sidebar Backdrop for Mobile */
.sidebar-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 95;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Desktop Collapsed Sidebar State */
body.sidebar-collapsed .crm-sidebar {
  width: 76px;
}
body.sidebar-collapsed .crm-main {
  margin-left: 76px;
}
body.sidebar-collapsed .sidebar-brand {
  padding: 1.25rem 0.5rem;
  justify-content: center;
}
body.sidebar-collapsed .sidebar-brand div,
body.sidebar-collapsed .sidebar-link span:not(.icon),
body.sidebar-collapsed .sidebar-badge,
body.sidebar-collapsed .sidebar-footer,
body.sidebar-collapsed .sidebar-menu-section-title {
  display: none !important;
}
body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 0.85rem 0;
}
body.sidebar-collapsed .sidebar-link .icon {
  width: auto;
  font-size: 1.35rem;
}

/* Main Content Area */
.crm-main {
  margin-left: 260px;
  width: calc(100% - 260px);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body.sidebar-collapsed .crm-main {
  margin-left: 76px;
  width: calc(100% - 76px);
}

/* Burger Toggle Button */
.crm-burger-btn {
  background: transparent;
  border: 1px solid var(--crm-border);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  margin-right: 1.25rem;
  transition: all 0.2s ease;
  color: var(--crm-text-main);
  flex-shrink: 0;
}
.crm-burger-btn:hover {
  background: var(--crm-bg);
  border-color: var(--crm-primary);
  color: var(--crm-primary);
  transform: translateY(-1px);
}
.crm-burger-btn .burger-bar {
  width: 18px;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: all 0.25s ease;
}
body.sidebar-collapsed .crm-burger-btn {
  background: var(--crm-primary-light);
  border-color: var(--crm-primary);
  color: var(--crm-primary);
}

/* Topbar */
.crm-topbar {
  height: 70px;
  background: #ffffff;
  border-bottom: 1px solid var(--crm-border);
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left {
  display: flex;
  align-items: center;
  min-width: 0;
}
.topbar-title {
  min-width: 0;
}
.topbar-title h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--crm-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* Content Container */
.crm-content {
  padding: 2rem;
  flex: 1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* KPI Summary Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.kpi-card {
  background: #ffffff;
  border: 1px solid var(--crm-border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--crm-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--crm-shadow-md);
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--crm-border);
}
.kpi-card.kpi-blue::before { background: var(--crm-primary); }
.kpi-card.kpi-amber::before { background: var(--crm-amber); }
.kpi-card.kpi-emerald::before { background: var(--crm-emerald); }
.kpi-card.kpi-rose::before { background: var(--crm-rose); }
.kpi-card.kpi-purple::before { background: var(--crm-purple); }

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.kpi-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--crm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kpi-icon {
  font-size: 1.2rem;
}
.kpi-value {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--crm-text-main);
  line-height: 1.1;
}
.kpi-sub {
  font-size: 0.8rem;
  color: var(--crm-text-muted);
  margin-top: 0.35rem;
}

/* CRM Standard Cards */
.crm-card {
  background: #ffffff;
  border: 1px solid var(--crm-border);
  border-radius: 16px;
  box-shadow: var(--crm-shadow-sm);
  margin-bottom: 2rem;
  overflow: hidden;
}
.crm-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--crm-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.crm-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--crm-text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.crm-card-body {
  padding: 1.5rem;
}

/* Buttons */
.crm-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.crm-btn-primary {
  background: var(--crm-primary);
  color: #ffffff;
}
.crm-btn-primary:hover {
  background: var(--crm-primary-dark);
}
.crm-btn-secondary {
  background: #ffffff;
  color: var(--crm-text-main);
  border-color: var(--crm-border);
}
.crm-btn-secondary:hover {
  background: var(--crm-bg);
}
.crm-btn-success {
  background: var(--crm-emerald);
  color: #ffffff;
}
.crm-btn-success:hover {
  background: #059669;
}
.crm-btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  line-height: 1;
}
.badge-new { background: var(--crm-primary-light); color: var(--crm-primary); border: 1px solid #bfdbfe; }
.badge-contacted { background: var(--crm-indigo-light); color: var(--crm-indigo); border: 1px solid #c7d2fe; }
.badge-followup { background: var(--crm-amber-light); color: #b45309; border: 1px solid #fde68a; }
.badge-qualified { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.badge-sitesurvey { background: var(--crm-purple-light); color: var(--crm-purple); border: 1px solid #ddd6fe; }
.badge-proposal { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge-negotiation { background: #fff7ed; color: #c2410c; border: 1px solid #ffedd5; }
.badge-won { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; font-weight: 800; }
.badge-lost { background: var(--crm-rose-light); color: var(--crm-rose); border: 1px solid #fecaca; }
.badge-notinterested { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

.badge-priority-high { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-priority-medium { background: #fefce8; color: #a16207; border: 1px solid #fef08a; }
.badge-priority-low { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.badge-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; font-weight: 700; }
.badge-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; font-weight: 700; }
.badge-warning { background: #fefce8; color: #a16207; border: 1px solid #fef08a; font-weight: 700; }
.badge-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; font-weight: 700; }
.badge-neutral { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; font-weight: 700; }

/* Filter & Search Bar */
.filter-bar {
  background: var(--crm-bg);
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}
.search-input-wrapper input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  border-radius: 10px;
  border: 1.5px solid var(--crm-border);
  font-size: 0.9rem;
  background: #ffffff;
  outline: none;
}
.search-input-wrapper input:focus {
  border-color: var(--crm-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.search-input-wrapper .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--crm-text-muted);
  font-size: 0.95rem;
}
.filter-select {
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--crm-border);
  font-size: 0.88rem;
  background: #ffffff;
  color: var(--crm-text-main);
  outline: none;
  font-weight: 500;
}
.filter-select:focus {
  border-color: var(--crm-primary);
}

/* CRM Tables */
.crm-table-container {
  overflow-x: auto;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  background: #ffffff;
}
.crm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}
.crm-table th {
  background: var(--crm-bg);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--crm-text-muted);
  border-bottom: 1px solid var(--crm-border);
  white-space: nowrap;
}
.crm-table th a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.crm-table th a:hover {
  color: var(--crm-primary);
}
.crm-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--crm-border-light);
  vertical-align: middle;
}
.crm-table tbody tr:hover {
  background: #f8fafc;
}
.crm-table tbody tr:last-child td {
  border-bottom: none;
}

/* Pagination */
.crm-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--crm-text-muted);
}
.pagination-controls {
  display: flex;
  gap: 0.35rem;
}
.page-btn {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--crm-border);
  background: #ffffff;
  color: var(--crm-text-main);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}
.page-btn:hover {
  background: var(--crm-bg);
  border-color: var(--crm-primary);
}
.page-btn.active {
  background: var(--crm-primary);
  color: #ffffff;
  border-color: var(--crm-primary);
}

/* 360° Timeline */
.timeline-container {
  position: relative;
  padding-left: 2rem;
  margin-top: 1rem;
}
.timeline-container::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--crm-border);
}
.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
}
.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--crm-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}
.timeline-dot.dot-green { border-color: var(--crm-emerald); color: var(--crm-emerald); }
.timeline-dot.dot-amber { border-color: var(--crm-amber); color: var(--crm-amber); }
.timeline-dot.dot-purple { border-color: var(--crm-purple); color: var(--crm-purple); }

.timeline-content {
  background: var(--crm-bg);
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}
.timeline-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--crm-text-main);
}
.timeline-time {
  font-size: 0.78rem;
  color: var(--crm-text-muted);
}
.timeline-desc {
  font-size: 0.86rem;
  color: var(--crm-text-main);
}

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  align-items: flex-start;
}
.kanban-column {
  width: 300px;
  flex-shrink: 0;
  background: #f1f5f9;
  border-radius: 14px;
  border: 1px solid var(--crm-border);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}
.kanban-col-header {
  padding: 1rem;
  font-size: 0.92rem;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--crm-border);
}
.kanban-cards-wrapper {
  padding: 0.75rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.kanban-card {
  background: #ffffff;
  border: 1px solid var(--crm-border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--crm-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--crm-shadow-md);
}

/* Modals */
.crm-modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.crm-modal-backdrop.active {
  display: flex;
}
.crm-modal {
  background: #ffffff;
  border-radius: 18px;
  width: 100%;
  max-width: 550px;
  box-shadow: var(--crm-shadow-lg);
  overflow: hidden;
  animation: modalPop 0.25s ease forwards;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.crm-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--crm-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.crm-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
}
.crm-modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--crm-text-muted);
}
.crm-modal-body {
  padding: 1.5rem;
}
.crm-modal-footer {
  padding: 1rem 1.5rem;
  background: var(--crm-bg);
  border-top: 1px solid var(--crm-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Form Controls in Admin */
.crm-form-group {
  margin-bottom: 1.2rem;
}
.crm-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--crm-text-main);
  margin-bottom: 0.35rem;
}
.crm-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1.5px solid var(--crm-border);
  font-size: 0.9rem;
  font-family: inherit;
  background: #ffffff;
  outline: none;
}
.crm-input:focus {
  border-color: var(--crm-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Selected Row in Data Grid */
tr.selected-row {
  background-color: #eff6ff !important;
}

/* SEARCH BY Radio Selector Bar */
.search-by-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--crm-text-muted);
}
.search-by-options {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.search-by-option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  color: var(--crm-text-main);
  user-select: none;
}
.search-by-option input[type="radio"] {
  accent-color: var(--crm-primary);
  cursor: pointer;
}

/* Inline Column Level Filter Row */
.grid-filter-row {
  background: #f8fafc;
  border-bottom: 2px solid var(--crm-border);
}
.grid-filter-row th {
  padding: 0.45rem 0.5rem !important;
  vertical-align: middle;
  background: #f8fafc !important;
}
.col-filter-wrap {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--crm-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
}
.col-filter-wrap:focus-within {
  border-color: var(--crm-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.col-filter-wrap.active-filter {
  border-color: var(--crm-primary);
  background: #eff6ff;
}
.col-op-select {
  background: #f1f5f9;
  border: none;
  border-right: 1px solid var(--crm-border);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--crm-primary);
  padding: 0.3rem 0.35rem;
  outline: none;
  cursor: pointer;
  border-radius: 0;
  text-transform: uppercase;
  max-width: 55px;
}
.col-val-input {
  border: none;
  outline: none;
  padding: 0.32rem 0.45rem;
  font-size: 0.78rem;
  font-family: inherit;
  width: 100%;
  min-width: 75px;
  background: transparent;
  color: var(--crm-text-main);
}
.col-val-input::placeholder {
  color: #94a3b8;
  font-size: 0.75rem;
}
.col-filter-clear-btn {
  background: #f1f5f9;
  border: 1px solid var(--crm-border);
  border-radius: 6px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--crm-text-muted);
  font-size: 0.8rem;
  font-weight: bold;
  transition: all 0.2s ease;
}
.col-filter-clear-btn:hover {
  background: var(--crm-rose);
  color: #ffffff;
  border-color: var(--crm-rose);
}

/* Sticky Floating Bulk Action Bar */
.crm-bulk-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  z-index: 900;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 0.85rem 1.75rem;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 580px;
  max-width: 90vw;
}
.crm-bulk-bar.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.bulk-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.bulk-bar-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
}
.bulk-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 992px) {
  .crm-sidebar {
    transform: translateX(-100%);
  }
  .crm-sidebar.open {
    transform: translateX(0);
  }
  .crm-main {
    margin-left: 0;
  }
  .crm-bulk-bar {
    min-width: 92vw;
    bottom: 12px;
    padding: 0.75rem 1rem;
  }
}


