/* DG CallDesk CRM — Ultra Premium Kinetic UI/UX Theme */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;600;700;800&display=swap');

:root {
  --font-heading: 'Sora', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  --brand-primary: #4f46e5;
  --brand-primary-hover: #4338ca;
  --brand-glow: rgba(79, 70, 229, 0.25);

  --sidebar-width: 270px;
}

[data-bs-theme="dark"] {
  --bg-primary: #07090e;
  --bg-card: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  
  --brand-primary: #6366f1;
  --brand-primary-hover: #818cf8;
  --brand-glow: rgba(99, 102, 241, 0.35);
}

html, body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: var(--font-mono);
}

/* App Wrapper & Layout */
.app-wrapper {
  display: flex;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Translucent Glassmorphism Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.03);
}

[data-bs-theme="dark"] .app-sidebar {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 9, 14, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1045;
}

.sidebar-backdrop.show {
  display: block;
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  padding-bottom: 80px;
  overflow-x: hidden;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.show {
    transform: translateX(0);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.4);
  }
  .app-main {
    margin-left: 0;
    width: 100vw;
  }
}

/* Header styling */
.app-header {
  height: 70px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

[data-bs-theme="dark"] .app-header {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
}

@media (min-width: 768px) {
  .app-header {
    padding: 0 1.75rem;
  }
}

/* Glassmorphism SaaS Cards */
.card-saas {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.04);
  margin-bottom: 1.25rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-bs-theme="dark"] .card-saas {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
}

.card-saas:hover {
  border-color: var(--brand-glow);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.1);
}

/* Kinetic Stat KPI Cards */
.stat-card {
  padding: 1.25rem 1rem;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--brand-primary);
  opacity: 0.5;
  border-radius: 0 16px 16px 0;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-primary);
  box-shadow: 0 12px 30px -6px var(--brand-glow);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-icon-blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.stat-icon-green { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.stat-icon-gray { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.stat-icon-cyan { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }
.stat-icon-amber { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.stat-icon-purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

/* Status Badges */
.badge-status {
  padding: 0.4em 0.85em;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.725rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-block;
  white-space: nowrap;
}

.badge-new { background: rgba(148, 163, 184, 0.15); color: #475569; }
.badge-contacted { background: rgba(14, 165, 233, 0.15); color: #0284c7; }
.badge-interested { background: rgba(16, 185, 129, 0.15); color: #059669; }
.badge-followup { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.badge-proposal { background: rgba(168, 85, 247, 0.15); color: #7e22ce; }
.badge-converted { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.badge-not_interested { background: rgba(239, 68, 68, 0.15); color: #dc2626; }

[data-bs-theme="dark"] .badge-new { color: #cbd5e1; }
[data-bs-theme="dark"] .badge-contacted { color: #38bdf8; }
[data-bs-theme="dark"] .badge-interested { color: #34d399; }
[data-bs-theme="dark"] .badge-followup { color: #fbbf24; }
[data-bs-theme="dark"] .badge-proposal { color: #c084fc; }

/* Call Outcome Options */
.btn-call-option {
  min-height: 48px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.btn-call-option input[type="radio"] {
  display: none;
}

.btn-call-option.active {
  background: var(--brand-primary) !important;
  color: #ffffff !important;
  border-color: var(--brand-primary) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--brand-glow);
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  z-index: 1040;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .mobile-bottom-nav {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.725rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.mobile-nav-item i {
  font-size: 1.25rem;
  margin-bottom: 2px;
}

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

.mobile-nav-item.call-center-btn {
  background: var(--brand-primary);
  color: white;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  justify-content: center;
  margin-top: -26px;
  box-shadow: 0 6px 20px var(--brand-glow);
}

.mobile-nav-item.call-center-btn i {
  font-size: 1.4rem;
  margin-bottom: 0;
}

@media (max-width: 991.98px) {
  .mobile-bottom-nav {
    display: flex;
  }
}

/* Pulsing Status Dot */
.mm-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: mmPulse 2s indefinite;
}

@keyframes mmPulse {
  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 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
