/* =========================================================
   Live Leads Solution - CEO Mobile Lead Portal Styles
   ========================================================= */

:root {
  --bg-backdrop: #F1F5F9;
  --bg-device: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-main: #0F172A;
  --text-sub: #475569;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;

  --call-green: #16A34A;
  --call-green-hover: #15803D;
  --call-green-light: #DCFCE7;

  --border-color: #E2E8F0;
  --border-subtle: #EDF2F7;

  --font-head: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-phone: 44px;

  --shadow-phone: 0 25px 60px -15px rgba(15, 23, 42, 0.2), 0 0 0 12px #0F172A, 0 0 0 14px #334155;
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 16px -4px rgba(15, 23, 42, 0.05);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-backdrop);
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================
   Showcase Split Layout
   ========================================================= */
.showcase-container {
  display: flex;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
}

/* Sidebar for Presentation / Context */
.showcase-sidebar {
  flex: 1;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 28px;
  max-width: 520px;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.live-pulse {
  width: 8px;
  height: 8px;
  background-color: var(--call-green);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.showcase-title {
  font-family: var(--font-head);
  font-size: 2.35rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.showcase-subtitle {
  font-size: 1.05rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.showcase-subtitle strong {
  color: var(--primary);
}

/* Comparison Card */
.comparison-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.comparison-heading {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.comp-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.comp-row:last-child {
  margin-bottom: 0;
}

.comp-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.comp-row.bad .comp-icon {
  background: #FEE2E2;
  color: #DC2626;
}

.comp-row.good .comp-icon {
  background: #DCFCE7;
  color: #16A34A;
}

.comp-text strong {
  display: block;
  color: var(--text-main);
  margin-bottom: 2px;
}

.comp-text span {
  color: var(--text-muted);
}

/* Showcase Demo Controls */
.showcase-controls {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.control-section-title {
  font-family: var(--font-head);
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.btn-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.action-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.action-pill-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.action-pill-btn.secondary {
  background: #FFFFFF;
  color: var(--text-sub);
  border: 1.5px solid var(--border-color);
}

.action-pill-btn.secondary:hover {
  background: var(--bg-device);
  color: var(--text-main);
  border-color: var(--primary);
}

.frame-toggle-wrap {
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.segmented-control {
  display: flex;
  background: var(--bg-device);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.segment-btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-head);
  border: none;
  background: none;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.segment-btn.active {
  background: #FFFFFF;
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

/* =========================================================
   Device Presentation Stage
   ========================================================= */
.device-stage {
  flex: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* iPhone Hardware Simulation Frame */
.mobile-frame {
  width: 410px;
  height: 840px;
  max-height: 92vh;
  background: #0F172A;
  border-radius: var(--radius-phone);
  box-shadow: var(--shadow-phone);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 4px solid #1E293B;
  transition: all 0.3s ease;
}

/* Fullscreen Mode Override */
.mobile-frame.is-fullscreen {
  width: 100% !important;
  max-width: 680px;
  height: auto !important;
  min-height: 90vh;
  border-radius: var(--radius-xl);
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--border-color);
  background: #FFFFFF;
}

.mobile-frame.is-fullscreen .mobile-status-bar,
.mobile-frame.is-fullscreen .home-indicator {
  display: none;
}

/* iOS Status Bar */
.mobile-status-bar {
  height: 44px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 20;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-main);
}

.status-time {
  font-family: var(--font-head);
  letter-spacing: -0.02em;
}

.dynamic-island {
  width: 110px;
  height: 26px;
  background: #000000;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
}

.island-camera {
  width: 10px;
  height: 10px;
  background: #111827;
  border-radius: 50%;
  box-shadow: inset 0 0 2px rgba(56, 189, 248, 0.4);
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
}

.battery-icon {
  width: 22px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  padding: 1px;
  position: relative;
}

.battery-icon::after {
  content: '';
  position: absolute;
  right: -3.5px;
  top: 2.5px;
  width: 2px;
  height: 4px;
  background: currentColor;
  border-radius: 0 1px 1px 0;
}

.battery-level {
  height: 100%;
  width: 82%;
  background: currentColor;
  border-radius: 1px;
}

/* Home Indicator Bar */
.home-indicator {
  height: 20px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.home-indicator::after {
  content: '';
  width: 130px;
  height: 4px;
  background: #0F172A;
  border-radius: 10px;
  opacity: 0.3;
}

/* =========================================================
   Mobile Screen (Inside App)
   ========================================================= */
.mobile-screen {
  flex: 1;
  background: var(--bg-device);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

/* App Header Nav */
.app-nav {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 16px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.app-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ceo-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ceo-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0F172A 0%, #334155 100%);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.user-greeting {
  font-size: 0.725rem;
  color: var(--text-muted);
  font-weight: 500;
}

.user-name {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.header-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  background: var(--call-green-light);
  border: 1px solid #BBF7D0;
  border-radius: 9999px;
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--call-green-hover);
}

.live-dot-green {
  width: 6px;
  height: 6px;
  background-color: var(--call-green);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

/* Metric Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.stat-card {
  background: var(--bg-device);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.text-success { color: var(--call-green); }
.text-primary { color: var(--primary); }

.stat-label {
  font-size: 0.675rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Search & Tabs */
.search-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.mobile-search-wrap svg {
  position: absolute;
  left: 10px;
  color: var(--text-light);
}

.mobile-search-wrap input {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 32px;
  background: var(--bg-device);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  outline: none;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.mobile-search-wrap input:focus {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.quick-status-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.status-tab {
  padding: 4px 10px;
  border-radius: 9999px;
  background: var(--bg-device);
  border: 1px solid var(--border-color);
  font-family: var(--font-head);
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.status-tab.active {
  background: var(--text-main);
  color: #FFFFFF;
  border-color: var(--text-main);
}

/* =========================================================
   Leads Stream (Feed)
   ========================================================= */
.leads-stream {
  flex: 1;
  padding: 14px 14px 90px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Individual Lead Card */
.lead-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 14px 12px;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.lead-card:active {
  transform: scale(0.985);
}

.lead-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.lead-name {
  font-family: var(--font-head);
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.lead-time {
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 500;
}

.lead-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.675rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-new {
  background: #EFF6FF;
  color: var(--primary);
  border: 1px solid #BFDBFE;
}

.badge-called {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.badge-qualified {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.lead-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--text-sub);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.meta-item svg {
  color: var(--text-light);
}

/* Card Action Strip */
.lead-action-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

/* Prominent DIRECT CALL Button */
.call-btn {
  flex: 1.4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  background: linear-gradient(180deg, #16A34A 0%, #15803D 100%);
  color: #FFFFFF;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-size: 0.825rem;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.35);
  transition: all 0.15s ease;
}

.call-btn:hover,
.call-btn:active {
  background: linear-gradient(180deg, #15803D 0%, #166534 100%);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.45);
  transform: translateY(-1px);
}

.icon-btn {
  height: 38px;
  padding: 0 12px;
  background: var(--bg-device);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  text-decoration: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-head);
  gap: 4px;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background: #FFFFFF;
  color: var(--text-main);
  border-color: var(--text-light);
}

/* Floating Bottom Action Dock */
.mobile-bottom-dock {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  z-index: 15;
}

.primary-dock-btn {
  width: 100%;
  height: 46px;
  background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
}

.primary-dock-btn:active {
  transform: scale(0.98);
}

/* =========================================================
   Lead Detail Drawer (Slide-up Sheet)
   ========================================================= */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.drawer-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-sheet {
  background: #FFFFFF;
  width: 100%;
  max-width: 480px;
  border-radius: 24px 24px 0 0;
  padding: 12px 20px 32px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.2);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-backdrop.is-active .drawer-sheet {
  transform: translateY(0);
}

.drawer-handle {
  width: 40px;
  height: 4px;
  background: #CBD5E1;
  border-radius: 10px;
  margin: 4px auto 14px;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.drawer-lead-headline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.drawer-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-device);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.875rem;
}

/* Drawer Hero Call Action */
.drawer-hero-actions {
  margin-bottom: 20px;
}

.call-hero-btn {
  width: 100%;
  height: 52px;
  background: linear-gradient(180deg, #16A34A 0%, #15803D 100%);
  color: #FFFFFF;
  text-decoration: none;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.4);
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.call-hero-btn:active {
  transform: scale(0.98);
}

.drawer-sub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sub-action-btn {
  height: 42px;
  background: var(--bg-device);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

/* Spec List */
.lead-spec-list {
  background: var(--bg-device);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  margin-bottom: 20px;
}

.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8125rem;
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  color: var(--text-muted);
  font-weight: 500;
}

.spec-val {
  font-weight: 700;
  color: var(--text-main);
  text-align: right;
}

/* Status Updater */
.status-updater-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.updater-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-btn-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.status-toggle-btn {
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: #FFFFFF;
  font-family: var(--font-head);
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.15s ease;
}

.status-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Toast */
.mobile-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: #0F172A;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 200;
}

.mobile-toast.is-active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .showcase-container {
    flex-direction: column;
  }

  .showcase-sidebar {
    max-width: 100%;
    padding: 24px 20px 0;
  }

  .device-stage {
    padding: 20px;
  }

  .mobile-frame {
    width: 100%;
    max-width: 440px;
    height: 780px;
  }
}
