/**
 * public/style.css — Global Kinect & Lead Kinect Mobile-First PWA Design System (v3.4 Polished)
 */

:root {
  --gk-space-950: #070B19;
  --gk-deep-space: #1A1C38;
  --gk-navy: #323664;
  --gk-green: #7DB242;
  --gk-green-dark: #51722D;
  --gk-teal: #7EBEC5;
  --gk-surface: #F7F8FC;
  --gk-ink: #1A1A2E;
  --gk-alert: #E85D4A;
  --gk-gold: #E3A93C;
  --lk-safe-top: env(safe-area-inset-top, 0px);
  --lk-safe-bottom: env(safe-area-inset-bottom, 0px);
}

html,
body {
  min-height: 100vh;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--gk-ink);
}

@media (max-width: 767px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

.font-display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.font-mono-data {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.gk-space-bg {
  background: radial-gradient(circle at 50% 0%, #323664 0%, #1A1C38 52%, #070B19 100%);
  position: relative;
}

.gk-starfield {
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    radial-gradient(rgba(126, 190, 197, 0.12) 1px, transparent 1px);
  background-size: 36px 36px, 72px 72px;
  background-position: 0 0, 18px 18px;
}

.btn-gk-green {
  background-color: var(--gk-green);
  color: #ffffff;
  font-weight: 700;
  transition: transform 0.15s ease, background-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 8px 24px rgba(125, 178, 66, 0.35);
}

@media (hover: hover) {
  .btn-gk-green:hover:not(:disabled) {
    background-color: var(--gk-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(125, 178, 66, 0.48);
  }
}

.btn-gk-green:active:not(:disabled) {
  transform: scale(0.97);
}

@keyframes gkRadarPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(125, 178, 66, 0.55);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(125, 178, 66, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(125, 178, 66, 0);
  }
}

.gk-radar-pulse {
  animation: gkRadarPulse 2.2s infinite;
}

.lead-blur-mask {
  filter: blur(4.5px);
  user-select: none;
  pointer-events: none;
  opacity: 0.82;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ========================================================================== */
/* Mandatory Legal Clickwrap Gate on Sign-Up Modal                            */
/* ========================================================================== */
.lk-auth-locked {
  pointer-events: none !important;
  opacity: 0.35 !important;
  filter: grayscale(0.85);
  user-select: none;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.lk-auth-unlocked {
  pointer-events: auto !important;
  opacity: 1 !important;
  filter: none;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

/* ========================================================================== */
/* Interactive ROI & Commission Calculator Sliders                            */
/* ========================================================================== */
.lk-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.lk-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gk-green);
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.lk-range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gk-green);
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* ========================================================================== */
/* Mobile 4-Tab Fixed Bottom Navigation Bar (<1024px)                         */
/* ========================================================================== */
.lk-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(7, 11, 25, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(126, 190, 197, 0.2);
  padding-top: 6px;
  padding-bottom: max(8px, var(--lk-safe-bottom));
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.lk-bottom-tab {
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: rgba(247, 248, 252, 0.65);
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  transition: color 0.15s ease, transform 0.1s ease;
}

.lk-bottom-tab:active {
  transform: scale(0.94);
}

.lk-bottom-tab.is-active {
  color: var(--gk-green);
}

@media (min-width: 1024px) {
  .lk-bottom-nav {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .lk-workspace-main {
    padding-bottom: calc(84px + var(--lk-safe-bottom)) !important;
  }
}

/* ========================================================================== */
/* Responsive CRM: Desktop Table (>=768px) vs Mobile Lead Cards (<768px)      */
/* ========================================================================== */
@media (max-width: 767px) {
  .lk-crm-desktop-table {
    display: none !important;
  }
  .lk-crm-mobile-cards {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
  }
}

@media (min-width: 768px) {
  .lk-crm-mobile-cards {
    display: none !important;
  }
}

.lk-lead-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(7, 11, 25, 0.05);
  transition: transform 0.12s ease;
}

.lk-lead-card:active {
  transform: scale(0.99);
}

.lk-touch-btn {
  min-height: 44px;
  min-width: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.1s ease;
}

.lk-touch-btn:active {
  transform: scale(0.96);
}

/* ========================================================================== */
/* Slide-Up Bottom Sheet Lead Detail Drawer                                   */
/* ========================================================================== */
.lk-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(7, 11, 25, 0.65);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.lk-sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lk-bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  max-height: 88vh;
  background: #ffffff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  padding-bottom: max(12px, var(--lk-safe-bottom));
  box-shadow: 0 -10px 30px rgba(7, 11, 25, 0.3);
}

.lk-bottom-sheet.is-open {
  transform: translateY(0);
}

.lk-sheet-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

body.lk-sheet-lock {
  overflow: hidden;
}

body.is-native-app #lk-install-banner {
  display: none !important;
}

/* ========================================================================== */
/* Night Vision™ Workspace Dark Mode (`body.lk-dark-workspace`)               */
/* Fixes full-viewport dark canvas, Step 1/Step 2 headings & row hover states */
/* ========================================================================== */
html:has(body.lk-dark-workspace),
body.lk-dark-workspace {
  background-color: #070B19 !important;
  color: #f1f5f9 !important;
}

body.lk-dark-workspace #dashboard-shell {
  background-color: #070B19 !important;
  color: #f1f5f9 !important;
  min-height: 100vh !important;
}

body.lk-dark-workspace #dashboard-shell header {
  background-color: rgba(15, 23, 42, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.lk-dark-workspace #dashboard-shell #view-title {
  color: #ffffff !important;
}

/* High-contrast Step 1, Step 2, More Filters & Credit counters in Dark Mode */
body.lk-dark-workspace #dashboard-shell .text-\[\#323664\] {
  color: #7EBEC5 !important;
}

body.lk-dark-workspace #dashboard-shell .text-\[\#51722D\] {
  color: #7DB242 !important;
}

body.lk-dark-workspace #dashboard-shell .text-\[\#1A1A2E\] {
  color: #ffffff !important;
}

body.lk-dark-workspace #dashboard-shell .bg-white {
  background-color: #0F172A !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  color: #f1f5f9 !important;
}

body.lk-dark-workspace #dashboard-shell .bg-slate-50,
body.lk-dark-workspace #dashboard-shell .bg-slate-50\/70 {
  background-color: #1A1C38 !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  color: #e2e8f0 !important;
}

/* Prevent table rows from flashing bright white on hover in Dark Mode */
body.lk-dark-workspace #dashboard-shell tr.hover\:bg-slate-50\/75:hover,
body.lk-dark-workspace #dashboard-shell .hover\:bg-slate-50:hover {
  background-color: rgba(126, 190, 197, 0.08) !important;
}

body.lk-dark-workspace #dashboard-shell .text-slate-900,
body.lk-dark-workspace #dashboard-shell .text-slate-800 {
  color: #f8fafc !important;
}

body.lk-dark-workspace #dashboard-shell .text-slate-700,
body.lk-dark-workspace #dashboard-shell .text-slate-600 {
  color: #cbd5e1 !important;
}

body.lk-dark-workspace #dashboard-shell .text-slate-500,
body.lk-dark-workspace #dashboard-shell .text-slate-400 {
  color: #94a3b8 !important;
}

body.lk-dark-workspace #dashboard-shell .border-slate-200,
body.lk-dark-workspace #dashboard-shell .border-slate-300,
body.lk-dark-workspace #dashboard-shell .border-slate-100 {
  border-color: rgba(148, 163, 184, 0.18) !important;
}

body.lk-dark-workspace #dashboard-shell .divide-slate-200 > :not([hidden]) ~ :not([hidden]),
body.lk-dark-workspace #dashboard-shell .divide-slate-100 > :not([hidden]) ~ :not([hidden]) {
  border-color: rgba(148, 163, 184, 0.14) !important;
}

body.lk-dark-workspace #dashboard-shell input:not([type="checkbox"]):not([type="radio"]),
body.lk-dark-workspace #dashboard-shell select,
body.lk-dark-workspace #dashboard-shell textarea {
  background-color: #070B19 !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  color: #ffffff !important;
}

body.lk-dark-workspace .lk-lead-card {
  background-color: #0F172A !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  color: #f8fafc !important;
}

body.lk-dark-workspace .lk-bottom-sheet {
  background-color: #0F172A !important;
  color: #f8fafc !important;
}

body.lk-dark-workspace .lk-bottom-sheet .bg-slate-50,
body.lk-dark-workspace .lk-bottom-sheet .bg-white {
  background-color: #1A1C38 !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
  color: #f1f5f9 !important;
}

body.lk-dark-workspace .lk-bottom-sheet .text-slate-900,
body.lk-dark-workspace .lk-bottom-sheet .text-slate-800 {
  color: #ffffff !important;
}

/* FirebaseUI Overrides */
.firebaseui-container {
  max-width: 100% !important;
  box-shadow: none !important;
  background: transparent !important;
}
.firebaseui-card-content {
  padding: 0 !important;
}