/* ===================================================
   MADENSOFT ENTERPRISE EXECUTIVE CRM & ADMIN SUITE
   Design System: Obsidian Glass + Cyber Precision + Executive SaaS
   =================================================== */

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

:root {
  /* Dimensions */
  --admin-sidebar-width: 285px;

  /* Core Obsidian & Navy Palette */
  --admin-bg-base: #040814;
  --admin-bg-sidebar: #070d1e;
  --admin-bg-topbar: rgba(7, 13, 30, 0.88);
  --admin-bg-card: rgba(12, 21, 44, 0.78);
  --admin-bg-card-elevated: rgba(16, 28, 56, 0.9);
  --admin-bg-card-hover: rgba(22, 38, 74, 0.95);
  --admin-bg-glass: rgba(10, 18, 38, 0.65);
  --admin-bg-input: rgba(6, 11, 24, 0.95);
  
  /* Borders & Glows */
  --admin-border: rgba(255, 255, 255, 0.08);
  --admin-border-subtle: rgba(255, 255, 255, 0.04);
  --admin-border-focus: #38bdf8;
  --admin-border-glow: rgba(56, 189, 248, 0.35);
  --admin-border-glow-success: rgba(16, 185, 129, 0.4);
  --admin-border-glow-purple: rgba(168, 85, 247, 0.4);
  --admin-border-glow-amber: rgba(245, 158, 11, 0.4);
  
  /* Typography */
  --admin-text-main: #f8fafc;
  --admin-text-sub: #cbd5e1;
  --admin-text-muted: #94a3b8;
  --admin-text-dim: #64748b;
  
  /* Vibrant Executive Accents */
  --admin-cyan: #06b6d4;
  --admin-cyan-light: #38bdf8;
  --admin-blue: #3b82f6;
  --admin-blue-deep: #1d4ed8;
  --admin-emerald: #10b981;
  --admin-emerald-light: #34d399;
  --admin-amber: #f59e0b;
  --admin-rose: #f43f5e;
  --admin-purple: #8b5cf6;
  --admin-purple-light: #a78bfa;
  
  /* Gradients */
  --admin-gradient-primary: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --admin-gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --admin-gradient-card: linear-gradient(165deg, rgba(14, 25, 52, 0.85) 0%, rgba(8, 14, 28, 0.92) 100%);
  --admin-gradient-card-glow: linear-gradient(165deg, rgba(22, 38, 74, 0.95) 0%, rgba(10, 18, 38, 0.95) 100%);
  --admin-gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --admin-gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  --admin-gradient-amber: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --admin-gradient-text: linear-gradient(135deg, #ffffff 30%, #38bdf8 100%);
  --admin-gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  
  /* Shadows */
  --admin-shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --admin-shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --admin-shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.7);
  --admin-shadow-glow-cyan: 0 0 25px rgba(6, 182, 212, 0.25);
  --admin-shadow-glow-blue: 0 0 25px rgba(59, 130, 246, 0.25);
  --admin-shadow-glow-success: 0 0 25px rgba(16, 185, 129, 0.25);
  
  /* Transitions */
  --transition-fast: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base resets & typography */
*, *::before, *::after {
  box-sizing: border-box;
}

body.admin-body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--admin-bg-base);
  color: var(--admin-text-main);
  min-height: 100vh;
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 10% 6%, rgba(37, 99, 235, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 90% 10%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(139, 92, 246, 0.09) 0%, transparent 60%),
    linear-gradient(to bottom, transparent, rgba(4, 8, 20, 0.85));
  background-attachment: fixed;
  overflow-x: hidden;
  letter-spacing: -0.012em;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: #040814; }
::-webkit-scrollbar-thumb { background: #1a2742; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2c4068; }

/* Text Utilities */
.text-light-sub { color: var(--admin-text-sub) !important; }
.text-muted { color: var(--admin-text-muted) !important; }
.text-dim { color: var(--admin-text-dim) !important; }
.font-mono { font-family: 'JetBrains Mono', monospace !important; }

.gradient-text {
  background: var(--admin-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-gold {
  background: var(--admin-gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-emerald {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===================================================
   ADMIN SIDEBAR
   =================================================== */
.admin-sidebar {
  width: var(--admin-sidebar-width);
  background: var(--admin-bg-sidebar);
  border-right: 1px solid var(--admin-border);
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 1050;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 6px 0 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-sidebar-brand {
  padding: 1.35rem 1.3rem;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.2);
}

.brand-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--admin-gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.3rem;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.45);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-icon-box::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.35), transparent);
}

.brand-title {
  font-size: 1.32rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.4px;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--admin-cyan-light);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  display: block;
}

.crm-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.4);
  letter-spacing: 0.6px;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

.admin-nav-section-title {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--admin-text-dim);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 1.25rem 1.15rem 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.admin-nav-list {
  list-style: none;
  padding: 0.5rem 0.85rem;
  margin: 0;
  flex-grow: 1;
  overflow-y: auto;
}

.admin-nav-item {
  margin-bottom: 0.25rem;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.72rem 0.95rem;
  color: var(--admin-text-sub);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 11px;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  position: relative;
  white-space: nowrap;
}

.admin-nav-link > div {
  display: flex;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
}

.admin-nav-link span {
  white-space: nowrap;
}

.admin-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(3px);
  border-color: rgba(255, 255, 255, 0.06);
}

.admin-nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, rgba(6, 182, 212, 0.2) 100%);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), inset 0 0 14px rgba(6, 182, 212, 0.12);
}

.admin-nav-link.active::before {
  content: '';
  position: absolute;
  left: -0.85rem;
  top: 15%;
  bottom: 15%;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--admin-cyan-light);
  box-shadow: 0 0 12px var(--admin-cyan);
}

.admin-nav-icon {
  font-size: 1.15rem;
  margin-right: 0.75rem;
  color: #64748b;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
}

.admin-nav-link:hover .admin-nav-icon {
  color: var(--admin-cyan-light);
}

.admin-nav-link.active .admin-nav-icon {
  color: var(--admin-cyan-light);
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.7));
}

.admin-badge-count {
  font-size: 0.68rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.35);
}

.admin-user-footer {
  padding: 1.1rem 1.2rem;
  border-top: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
}

.user-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.4);
  position: relative;
  flex-shrink: 0;
}

.status-dot-online {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #070d1e;
  position: absolute;
  bottom: -2px;
  right: -2px;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

/* ===================================================
   STICKY EXECUTIVE TOPBAR
   =================================================== */
.admin-topbar {
  position: sticky;
  top: 0;
  left: var(--admin-sidebar-width);
  right: 0;
  height: 70px;
  background: var(--admin-bg-topbar);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  z-index: 1040;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  margin-left: var(--admin-sidebar-width);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.topbar-search-trigger {
  background: rgba(12, 21, 42, 0.8);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-dim);
  border-radius: 12px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.85rem;
  min-width: 260px;
}

.topbar-search-trigger:hover {
  background: rgba(18, 32, 64, 0.95);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--admin-text-sub);
}

.kbd-shortcut {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  color: var(--admin-text-sub);
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
}

.status-beacon-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  letter-spacing: 0.3px;
}

.status-beacon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 1.8s infinite ease-in-out;
}

.topbar-btn {
  background: rgba(14, 24, 48, 0.85);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-sub);
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.topbar-btn:hover {
  background: rgba(37, 99, 235, 0.25);
  border-color: rgba(56, 189, 248, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}

.topbar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #f43f5e;
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border: 2px solid #070d1e;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.6);
}

/* ===================================================
   ADMIN MAIN CONTENT
   =================================================== */
.admin-main {
  margin-left: var(--admin-sidebar-width);
  padding: 2.2rem 2.5rem 4.5rem;
  min-height: calc(100vh - 70px);
}

/* Executive Glass Cards */
.executive-card {
  background: var(--admin-gradient-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--admin-border);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: var(--admin-shadow-md);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.executive-card:hover {
  border-color: var(--admin-border-glow);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.6), var(--admin-shadow-glow-cyan);
}

.executive-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--admin-cyan), transparent);
  opacity: 0;
  transition: var(--transition-fast);
}

.executive-card:hover::before {
  opacity: 1;
}

/* Modern Metric / KPI Cards */
.admin-metric-card {
  background: var(--admin-gradient-card);
  backdrop-filter: blur(24px);
  border: 1px solid var(--admin-border);
  border-radius: 18px;
  padding: 1.6rem;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--admin-shadow-md);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--admin-border-glow);
  box-shadow: 0 15px 38px rgba(0, 0, 0, 0.55), var(--admin-shadow-glow-cyan);
}

.admin-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--admin-gradient-cyan);
  opacity: 0.85;
}

.admin-metric-card.border-glow-success::before { background: var(--admin-gradient-success); }
.admin-metric-card.border-glow-purple::before { background: var(--admin-gradient-purple); }
.admin-metric-card.border-glow-amber::before { background: var(--admin-gradient-amber); }
.admin-metric-card.border-glow-rose::before { background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%); }

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.metric-title {
  color: var(--admin-text-sub);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
}

.metric-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  transition: var(--transition-fast);
}

.admin-metric-card:hover .metric-icon-box {
  transform: scale(1.08);
}

.metric-icon-blue { background: rgba(59, 130, 246, 0.16); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.35); box-shadow: 0 0 15px rgba(59, 130, 246, 0.2); }
.metric-icon-cyan { background: rgba(6, 182, 212, 0.16); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.35); box-shadow: 0 0 15px rgba(6, 182, 212, 0.2); }
.metric-icon-green { background: rgba(16, 185, 129, 0.16); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); box-shadow: 0 0 15px rgba(16, 185, 129, 0.2); }
.metric-icon-purple { background: rgba(168, 85, 247, 0.16); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.35); box-shadow: 0 0 15px rgba(168, 85, 247, 0.2); }
.metric-icon-amber { background: rgba(245, 158, 11, 0.16); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); box-shadow: 0 0 15px rgba(245, 158, 11, 0.2); }

.metric-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 0.45rem;
  letter-spacing: -0.5px;
}

/* ===================================================
   CHARTS & ANALYTICS WRAPPER
   =================================================== */
.chart-card-box {
  background: var(--admin-gradient-card);
  border: 1px solid var(--admin-border);
  border-radius: 20px;
  padding: 1.6rem 1.8rem;
  backdrop-filter: blur(24px);
  box-shadow: var(--admin-shadow-md);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--admin-border);
}

.chart-canvas-container {
  position: relative;
  width: 100%;
  min-height: 260px;
}

/* ===================================================
   KANBAN DEAL PIPELINE BOARD
   =================================================== */
.kanban-board-container {
  overflow-x: auto;
  padding-bottom: 1.5rem;
}

.kanban-board {
  display: flex;
  gap: 1.25rem;
  min-width: 1300px;
  align-items: flex-start;
}

.kanban-column {
  flex: 1;
  min-width: 260px;
  background: rgba(8, 14, 28, 0.7);
  border: 1px solid var(--admin-border);
  border-radius: 18px;
  padding: 1rem;
  backdrop-filter: blur(20px);
  box-shadow: var(--admin-shadow-sm);
  display: flex;
  flex-direction: column;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--admin-border);
}

.kanban-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.kanban-col-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--admin-text-sub);
}

.kanban-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 150px;
}

.kanban-card {
  background: rgba(14, 25, 52, 0.9);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 1.1rem;
  transition: var(--transition-fast);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.kanban-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), var(--admin-shadow-glow-cyan);
}

.kanban-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
}

.kanban-card.status-new::before { background: #3b82f6; }
.kanban-card.status-reviewed::before { background: #f59e0b; }
.kanban-card.status-priced::before { background: #8b5cf6; }
.kanban-card.status-contacted::before { background: #f97316; }
.kanban-card.status-won::before { background: #10b981; }
.kanban-card.status-lost::before { background: #f43f5e; }

.kanban-card-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--admin-cyan-light);
  text-decoration: none;
}

.kanban-card-title {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.94rem;
  margin-top: 0.25rem;
  margin-bottom: 0.15rem;
}

.kanban-card-company {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
}

.kanban-card-budget {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 0.65rem;
  display: block;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===================================================
   CRM PIPELINE STEPPER & STATUS BADGES
   =================================================== */
.pipeline-stepper-modern {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
  padding: 0.85rem;
  background: rgba(4, 8, 20, 0.75);
  border: 1px solid var(--admin-border);
  border-radius: 18px;
  margin-bottom: 1.75rem;
  backdrop-filter: blur(16px);
}

.pipeline-step-item-modern {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-fast);
  color: var(--admin-text-dim);
}

.pipeline-step-item-modern .step-number {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--admin-text-muted);
}

.pipeline-step-item-modern .step-text {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
}

.pipeline-step-item-modern.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, rgba(6, 182, 212, 0.22) 100%);
  border-color: rgba(56, 189, 248, 0.55);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
}

.pipeline-step-item-modern.active .step-number {
  background: var(--admin-cyan);
  color: #040814;
  box-shadow: 0 0 12px var(--admin-cyan);
}

.pipeline-step-item-modern.completed {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.pipeline-step-item-modern.completed .step-number {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.pipeline-step-item-modern.won {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(5, 150, 105, 0.25) 100%);
  border-color: rgba(52, 211, 153, 0.65);
  color: #ffffff;
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.35);
}

.pipeline-step-item-modern.won .step-number {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 0 12px #10b981;
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-pill.status-new {
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.45);
}
.status-pill.status-new::before { background: #60a5fa; box-shadow: 0 0 8px #60a5fa; }

.status-pill.status-reviewed {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}
.status-pill.status-reviewed::before { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }

.status-pill.status-priced {
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.45);
}
.status-pill.status-priced::before { background: #c084fc; box-shadow: 0 0 8px #c084fc; }

.status-pill.status-contacted {
  background: rgba(249, 115, 22, 0.16);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.45);
}
.status-pill.status-contacted::before { background: #fb923c; box-shadow: 0 0 8px #fb923c; }

.status-pill.status-won {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.55);
}
.status-pill.status-won::before { background: #34d399; box-shadow: 0 0 10px #34d399; }

.status-pill.status-lost {
  background: rgba(244, 63, 94, 0.16);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.45);
}
.status-pill.status-lost::before { background: #fb7185; }

/* Micro Info Card */
.micro-info-card {
  background: rgba(7, 14, 28, 0.7);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  transition: var(--transition-fast);
}

.micro-info-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(10, 20, 40, 0.85);
}

/* ===================================================
   ADMIN TABLES
   =================================================== */
.admin-table {
  width: 100%;
  margin-bottom: 0;
  color: var(--admin-text-main);
  border-collapse: separate;
  border-spacing: 0;
}

.admin-table th {
  background: rgba(0, 0, 0, 0.35);
  color: var(--admin-text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--admin-border);
  white-space: nowrap;
}

.admin-table td {
  padding: 1.15rem 1.4rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--admin-border-subtle);
  font-size: 0.92rem;
}

.admin-table tbody tr {
  transition: var(--transition-fast);
}

.admin-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.045);
}

/* ===================================================
   BUTTONS & INPUTS
   =================================================== */
.btn-crm-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 11px;
  padding: 0.6rem 1.15rem;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: var(--transition-fast);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-crm-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.55);
  color: #ffffff !important;
}

.btn-crm-action {
  background: rgba(14, 24, 48, 0.85);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-sub);
  font-weight: 600;
  border-radius: 11px;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

.btn-crm-action:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: var(--admin-cyan);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-crm-primary {
  background: var(--admin-gradient-primary);
  color: #ffffff !important;
  font-weight: 700;
  border: none;
  border-radius: 11px;
  padding: 0.68rem 1.35rem;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.45);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-crm-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(6, 182, 212, 0.55);
  color: #ffffff !important;
}

.admin-form-control, .form-select.admin-select {
  background: var(--admin-bg-input);
  border: 1px solid var(--admin-border);
  color: #ffffff;
  border-radius: 12px;
  padding: 0.75rem 1.15rem;
  font-size: 0.94rem;
  transition: var(--transition-fast);
}

.admin-form-control:focus, .form-select.admin-select:focus {
  background: rgba(10, 18, 36, 1);
  border-color: var(--admin-cyan-light);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
  color: #ffffff;
}

.admin-form-control::placeholder {
  color: var(--admin-text-dim);
}

/* Service icon box */
.service-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(6, 182, 212, 0.25));
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-cyan-light);
  font-size: 1.35rem;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.2);
}

/* ===================================================
   COMMAND PALETTE & QUICK SEARCH MODAL
   =================================================== */
.cmd-palette-backdrop {
  background: rgba(2, 6, 16, 0.85);
  backdrop-filter: blur(16px);
}

.cmd-palette-card {
  background: var(--admin-bg-sidebar);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(6, 182, 212, 0.25);
  overflow: hidden;
}

.cmd-palette-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.cmd-palette-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.15rem;
  width: 100%;
  outline: none;
}

.cmd-palette-input::placeholder {
  color: var(--admin-text-dim);
}

.cmd-palette-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.85rem;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 11px;
  color: var(--admin-text-sub);
  text-decoration: none;
  transition: var(--transition-fast);
}

.cmd-item:hover, .cmd-item.active {
  background: rgba(37, 99, 235, 0.2);
  color: #ffffff;
  transform: translateX(4px);
}

/* ===================================================
   FORMAL PROPOSAL PRINT SHEET (OFFICIAL LETTERHEAD)
   =================================================== */
.proposal-print-wrapper {
  background: #ffffff;
  color: #0f172a;
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

@media print {
  body.admin-body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .admin-sidebar, .admin-topbar, .no-print {
    display: none !important;
  }
  .admin-main {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  .proposal-print-wrapper {
    box-shadow: none !important;
    padding: 0 !important;
  }
}

/* ===================================================
   TOAST NOTIFICATIONS
   =================================================== */
.admin-toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-toast {
  background: var(--admin-gradient-card);
  backdrop-filter: blur(24px);
  border: 1px solid var(--admin-border-glow);
  color: #ffffff;
  border-radius: 14px;
  padding: 0.85rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--admin-shadow-lg), var(--admin-shadow-glow-cyan);
  font-size: 0.88rem;
  font-weight: 600;
  animation: slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===================================================
   LOGIN WRAPPER & GLASS CARD
   =================================================== */
.admin-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.admin-login-box {
  width: 100%;
  max-width: 450px;
  background: var(--admin-gradient-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--admin-border);
  border-radius: 24px;
  padding: 2.8rem 2.6rem;
  box-shadow: var(--admin-shadow-lg), var(--admin-shadow-glow-cyan);
  position: relative;
  overflow: hidden;
}

.admin-login-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--admin-gradient-cyan);
}

/* ===================================================
   RESPONSIVE DESIGN (MOBILE & TABLET DRAWER)
   =================================================== */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1045;
}

@media (max-width: 991px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.sidebar-open {
    transform: translateX(0);
  }
  .sidebar-backdrop.active {
    display: block;
  }
  .admin-topbar {
    left: 0;
    margin-left: 0;
    padding: 0 1.25rem;
  }
  .admin-main {
    margin-left: 0;
    padding: 1.5rem;
  }
  .topbar-search-trigger {
    min-width: auto;
    padding: 0.5rem 0.75rem;
  }
  .topbar-search-trigger span {
    display: none;
  }
  .pipeline-stepper-modern {
    grid-template-columns: 1fr;
  }
}
