/* Leads mock prototype: design tokens, reset, app shell, sidebar, buttons.
   Loaded by frontend/pages/leads-mock.html only. */

:root {
  --bg-primary: #f4f5f8;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eceef2;
  --bg-elevated: #ffffff;
  --bg-hover: #e8eaf0;
  --bg-active: #e0e3ea;
  --bg-subtle: #f0f1f5;
  --bg-sidebar: #0f1117;
  --bg-sidebar-hover: #1a1d26;
  --bg-sidebar-active: #222633;

  --text-primary: #0f1117;
  --text-secondary: #3d4250;
  --text-tertiary: #6b7280;
  --text-muted: #9ca3af;
  --text-inverse: #ffffff;
  --text-sidebar: #a0a8b8;
  --text-sidebar-active: #ffffff;

  --border-subtle: #e5e7eb;
  --border-medium: #d1d5db;
  --border-strong: #b0b5c0;
  --border-sidebar: #1e2230;

  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-primary-light: #dbeafe;
  --accent-primary-ghost: #eff6ff;
  --accent-secondary: #0ea5e9;
  --accent-secondary-light: #e0f2fe;
  --accent-success: #059669;
  --accent-success-light: #d1fae5;
  --accent-success-ghost: #ecfdf5;
  --accent-warning: #d97706;
  --accent-warning-light: #fef3c7;
  --accent-warning-ghost: #fffbeb;
  --accent-danger: #dc2626;
  --accent-danger-light: #fee2e2;
  --accent-danger-ghost: #fef2f2;
  --accent-purple: #7c3aed;
  --accent-purple-light: #ede9fe;
  --accent-purple-ghost: #f5f3ff;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;

  --shadow-sm: 0 1px 2px rgba(15,17,23,0.04), 0 1px 3px rgba(15,17,23,0.02);
  --shadow-md: 0 2px 8px rgba(15,17,23,0.06), 0 1px 3px rgba(15,17,23,0.03);
  --shadow-lg: 0 4px 16px rgba(15,17,23,0.08), 0 2px 6px rgba(15,17,23,0.04);
  --shadow-xl: 0 12px 40px rgba(15,17,23,0.12), 0 4px 12px rgba(15,17,23,0.06);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body, #root {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 13px;
  line-height: 1.5;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0; }
}

.animate-fadeIn { animation: fadeIn 0.18s ease-out forwards; }
.animate-slideInRight { animation: slideInRight 0.2s ease-out forwards; }
.animate-scaleIn { animation: scaleIn 0.2s ease-out forwards; }

.app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.sidebar {
  width: 220px;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-sidebar);
  z-index: 50;
}

.sidebar-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  margin-bottom: 24px;
}

.sidebar-logo {
  width: 32px;
  height: 32px;
  background: var(--accent-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.sidebar-logo svg { color: white; width: 18px; height: 18px; }

.sidebar-wordmark { font-size: 14px; font-weight: 700; color: var(--text-sidebar-active); letter-spacing: -0.01em; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  flex: 1;
}

.sidebar-item {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-sidebar);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.sidebar-item:hover { background: var(--bg-sidebar-hover); color: var(--text-inverse); }
.sidebar-item.active { background: var(--bg-sidebar-active); color: var(--text-sidebar-active); }
.sidebar-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-item-label { font-size: 13px; font-weight: 500; flex: 1; }

.sidebar-badge {
  width: 8px;
  height: 8px;
  background: var(--accent-danger);
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-sidebar);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 4px;
  cursor: pointer;
}

.sidebar-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-md);
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-user-name { font-size: 12px; font-weight: 600; color: var(--text-sidebar-active); }
.sidebar-user-role { font-size: 10px; color: var(--text-sidebar); margin-top: 1px; }

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent-primary); color: white; }
.btn-primary:hover { background: var(--accent-primary-hover); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-xs { padding: 3px 8px; font-size: 10px; }

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-tertiary);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-secondary); }
.btn-icon.active { background: var(--accent-primary-light); color: var(--accent-primary); }

/* Incoming call notification (app-level overlay, tied to a lead) */
.incoming-notification {
  position: fixed;
  top: 60px;
  right: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 14px 16px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  animation: slideInRight 0.3s ease-out;
}
.incoming-notification.call { border-left: 3px solid var(--accent-success); }

.incoming-pulse {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.incoming-pulse.call { background: var(--accent-success-light); color: var(--accent-success); }
.incoming-pulse::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid currentColor;
  animation: pulse-ring 1.5s ease-out infinite;
}
.incoming-pulse svg { width: 16px; height: 16px; }

.incoming-info { flex: 1; }
.incoming-title { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.incoming-desc { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
.incoming-actions { display: flex; gap: 6px; }

.placeholder-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 12px;
}
.placeholder-page svg { width: 48px; height: 48px; color: var(--border-medium); }
.placeholder-page h2 { font-size: 16px; font-weight: 600; color: var(--text-secondary); }
.placeholder-page p { font-size: 12px; color: var(--text-muted); }
