/* ==========================================================================
   LEAD MAGNETS CENTRAL DASHBOARD — PRO CONSOLE & DEDICATED SITE VIEWS
   Typography: 'Outfit', sans-serif
   Tokens: Synchronized with Lead Magnets Studio & Analytics
   ========================================================================== */

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

:root {
  --ssl-ink: #202039;
  --ssl-muted: #64647c;
  --ssl-accent: #6152d6;
  --ssl-accent-hover: #5042bd;
  --ssl-accent-ink: #ffffff;
  --ssl-soft: #e9e6fc;
  --ssl-surface: rgba(255, 255, 255, 0.78);
  --ssl-surface-card: rgba(255, 255, 255, 0.9);
  --ssl-solid: #ffffff;
  --ssl-field: rgba(255, 255, 255, 0.95);
  --ssl-line: rgba(115, 111, 155, 0.22);
  --ssl-line-subtle: rgba(115, 111, 155, 0.12);
  --ssl-shadow: 0 16px 45px -25px rgba(99, 89, 146, 0.35);
  --ssl-shadow-sm: 0 4px 14px -4px rgba(97, 82, 214, 0.14);
  --ssl-blur: 20px;

  --ssl-emerald-bg: #dbf2e7;
  --ssl-emerald-ink: #0d6446;
  --ssl-blue-bg: #dcebfa;
  --ssl-blue-ink: #1a4f94;
  --ssl-amber-bg: #fef3c7;
  --ssl-amber-ink: #82531a;
  --ssl-rose-bg: #fde2e4;
  --ssl-rose-ink: #9a2343;

  --sidebar-w: 260px;
  --sidebar-w-collapsed: 72px;
}

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

html {
  scroll-behavior: smooth;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(115, 111, 155, 0.05);
}
::-webkit-scrollbar-thumb {
  background: rgba(97, 82, 214, 0.25);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(97, 82, 214, 0.45);
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: #eeedf4;
  background-image: 
    radial-gradient(at 10% 10%, rgba(97, 82, 214, 0.08) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(13, 148, 136, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--ssl-ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   LEFT SIDEBAR (COLLAPSIBLE)
   ========================================================================== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(var(--ssl-blur));
  -webkit-backdrop-filter: blur(var(--ssl-blur));
  border-right: 1px solid var(--ssl-line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.is-collapsed {
  width: var(--sidebar-w-collapsed);
}

.sidebar.is-collapsed .brand-info,
.sidebar.is-collapsed .nav-section-title,
.sidebar.is-collapsed .nav-text,
.sidebar.is-collapsed .nav-count,
.sidebar.is-collapsed .server-status-text,
.sidebar.is-collapsed .btn-sidebar-label {
  display: none !important;
}

.sidebar.is-collapsed .sidebar-brand {
  padding: 20px 14px;
  justify-content: center;
}

.sidebar.is-collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
}

.sidebar.is-collapsed .sidebar-footer {
  padding: 14px 8px;
}

.sidebar-brand {
  padding: 22px 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ssl-line-subtle);
  gap: 10px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #6152d6 0%, #8565e6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 18px -4px rgba(97, 82, 214, 0.45);
  flex-shrink: 0;
}

.brand-info h2 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ssl-ink);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.brand-info h2 .badge-live {
  font-size: 9.5px;
  font-weight: 700;
  background: var(--ssl-soft);
  color: var(--ssl-accent);
  padding: 1px 6px;
  border-radius: 999px;
  text-transform: uppercase;
}

.brand-info p {
  font-size: 11.5px;
  color: var(--ssl-muted);
  white-space: nowrap;
}

.sidebar-toggle-btn {
  background: transparent;
  border: 1px solid var(--ssl-line);
  color: var(--ssl-muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: #ffffff;
  color: var(--ssl-accent);
  border-color: var(--ssl-accent);
}

.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ssl-muted);
  letter-spacing: 0.8px;
  padding: 10px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ssl-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(97, 82, 214, 0.08);
  color: var(--ssl-ink);
}

.nav-item.is-active {
  background: var(--ssl-accent);
  color: #ffffff;
  box-shadow: 0 4px 14px -3px rgba(97, 82, 214, 0.42);
}

.nav-item .nav-count {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(115, 111, 155, 0.16);
  color: inherit;
}

.nav-item.is-active .nav-count {
  background: rgba(255, 255, 255, 0.22);
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 12px;
  border-top: 1px solid var(--ssl-line-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.server-status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--ssl-muted);
  font-weight: 600;
  padding: 6px 10px;
  background: rgba(115, 111, 155, 0.08);
  border-radius: 8px;
}

.server-status-pill .status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  flex-shrink: 0;
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.main-content {
  flex: 1;
  padding: 24px 34px 60px;
  min-width: 0;
  transition: all 0.28s ease;
}

/* Top Navbar */
.top-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.mobile-toggle-btn {
  display: none;
  background: var(--ssl-surface);
  border: 1px solid var(--ssl-line);
  padding: 8px;
  border-radius: 10px;
  color: var(--ssl-ink);
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-toggle-btn { display: flex; }
}

.search-container {
  flex: 1;
  max-width: 440px;
  position: relative;
}

.search-container input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  font-size: 13.5px;
  font-family: inherit;
  border-radius: 12px;
  border: 1px solid var(--ssl-line);
  background: var(--ssl-solid);
  color: var(--ssl-ink);
  outline: none;
  box-shadow: 0 2px 8px -2px rgba(97, 82, 214, 0.08);
  transition: all 0.2s ease;
}

.search-container input:focus {
  border-color: var(--ssl-accent);
  box-shadow: 0 0 0 3px rgba(97, 82, 214, 0.16);
}

.search-container svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ssl-muted);
}

.search-container .clear-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ssl-muted);
  cursor: pointer;
  display: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ssl-accent);
  color: #ffffff;
  box-shadow: 0 4px 14px -3px rgba(97, 82, 214, 0.45);
}

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

.btn-secondary {
  background: var(--ssl-surface);
  color: var(--ssl-ink);
  border-color: var(--ssl-line);
  backdrop-filter: blur(var(--ssl-blur));
}

.btn-secondary:hover {
  background: #ffffff;
  border-color: var(--ssl-accent);
  color: var(--ssl-accent);
}

.btn-danger {
  background: #fff0f3;
  color: #e11d48;
  border-color: #fecdd3;
}

.btn-danger:hover {
  background: #ffe4e6;
  border-color: #fda4af;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-icon-only {
  padding: 8px;
  border-radius: 999px;
}

/* ==========================================================================
   VIEW CONTAINERS
   ========================================================================== */
.view-section {
  display: none;
  animation: anFadeSlide 0.25s ease-out;
}

.view-section.is-active {
  display: block;
}

/* ==========================================================================
   CLEAN DROPDOWNS (NO EMOJIS, NO OVERFLOW, BUILT-IN SVG ARROW)
   ========================================================================== */
.select-dropdown {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ssl-ink);
  background-color: var(--ssl-surface);
  border: 1px solid var(--ssl-line);
  padding: 7px 32px 7px 12px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(var(--ssl-blur));
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2364647C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.select-dropdown:focus {
  border-color: var(--ssl-accent);
  box-shadow: 0 0 0 3px rgba(97, 82, 214, 0.15);
}

/* Controls Filter Bar */
.controls-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.an-range-pills {
  display: inline-flex;
  align-items: center;
  background: var(--ssl-surface);
  backdrop-filter: blur(var(--ssl-blur));
  border: 1px solid var(--ssl-line);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--ssl-shadow-sm);
}

.an-pill {
  background: transparent;
  border: none;
  color: var(--ssl-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.an-pill:hover {
  color: var(--ssl-ink);
  background: rgba(97, 82, 214, 0.08);
}

.an-pill.is-active {
  background: var(--ssl-accent);
  color: #ffffff !important;
  box-shadow: 0 4px 12px -2px rgba(97, 82, 214, 0.42);
}

.an-custom-range-card {
  padding: 12px 18px;
  background: var(--ssl-solid);
  border: 1px solid var(--ssl-line);
  border-radius: 12px;
  box-shadow: var(--ssl-shadow-sm);
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  animation: anFadeSlide 0.2s ease-out;
}

.an-custom-range-card.is-visible {
  display: flex;
}

.an-custom-range-card input[type="date"] {
  font-family: inherit;
  font-size: 12.5px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--ssl-line);
  color: var(--ssl-ink);
  outline: none;
}

/* ==========================================================================
   4-METRIC HERO KPI GRID
   ========================================================================== */
.an-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

@media (max-width: 1200px) {
  .an-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .an-kpi-grid { grid-template-columns: 1fr; }
}

.an-kpi-card {
  background: var(--ssl-surface-card);
  backdrop-filter: blur(var(--ssl-blur));
  border: 1px solid var(--ssl-line);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--ssl-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.an-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px -20px rgba(99, 89, 146, 0.45);
}

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

.kpi-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ssl-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon-violet { background: var(--ssl-soft); color: var(--ssl-accent); }
.kpi-icon-emerald { background: var(--ssl-emerald-bg); color: var(--ssl-emerald-ink); }
.kpi-icon-blue { background: var(--ssl-blue-bg); color: var(--ssl-blue-ink); }
.kpi-icon-amber { background: var(--ssl-amber-bg); color: var(--ssl-amber-ink); }

.kpi-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--ssl-ink);
  line-height: 1.15;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.kpi-hint {
  font-size: 12px;
  color: var(--ssl-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi-hint .trend-tag {
  color: var(--ssl-emerald-ink);
  background: var(--ssl-emerald-bg);
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
}

/* ==========================================================================
   CONSOLE PERFORMANCE GRAPH CARD
   ========================================================================== */
.graph-card {
  background: var(--ssl-surface-card);
  backdrop-filter: blur(var(--ssl-blur));
  border: 1px solid var(--ssl-line);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--ssl-shadow);
  margin-bottom: 24px;
}

.graph-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.graph-title-group h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ssl-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.graph-title-group p {
  font-size: 12.5px;
  color: var(--ssl-muted);
}

.graph-canvas-wrap {
  position: relative;
  height: 280px;
  width: 100%;
}

/* ==========================================================
   CONNECTED SITES PREVIEW (ON OVERVIEW PAGE)
   ========================================================== */
.overview-sites-section {
  background: var(--ssl-surface-card);
  backdrop-filter: blur(var(--ssl-blur));
  border: 1px solid var(--ssl-line);
  border-radius: 16px;
  box-shadow: var(--ssl-shadow);
  padding: 22px 24px;
  margin-bottom: 26px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title-row h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ssl-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.preview-site-card {
  background: #ffffff;
  border: 1px solid var(--ssl-line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 4px 14px -6px rgba(97, 82, 214, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.preview-site-card:hover {
  transform: translateY(-2px);
  border-color: var(--ssl-accent);
  box-shadow: 0 10px 24px -10px rgba(97, 82, 214, 0.3);
}

.preview-site-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-site-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ssl-ink);
}

.preview-site-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ssl-muted);
}

.preview-site-stat strong {
  color: var(--ssl-accent);
}

/* ==========================================================================
   FULL-WIDTH PRO LEADS TABLE
   ========================================================================== */
.card-panel-full {
  background: var(--ssl-surface-card);
  backdrop-filter: blur(var(--ssl-blur));
  border: 1px solid var(--ssl-line);
  border-radius: 16px;
  box-shadow: var(--ssl-shadow);
  overflow: hidden;
  margin-bottom: 30px;
}

.table-responsive {
  overflow-x: auto;
  width: 100%;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.leads-table th {
  padding: 13px 20px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ssl-muted);
  background: rgba(115, 111, 155, 0.05);
  border-bottom: 1px solid var(--ssl-line);
  white-space: nowrap;
  user-select: none;
}

.leads-table th.sortable-th {
  cursor: pointer;
  transition: color 0.15s ease;
}

.leads-table th.sortable-th:hover {
  color: var(--ssl-accent);
}

.leads-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--ssl-line);
  color: var(--ssl-ink);
  vertical-align: middle;
}

.leads-table tbody tr {
  transition: background-color 0.15s ease;
}

.leads-table tbody tr:hover {
  background-color: rgba(97, 82, 214, 0.04);
}

.lead-time-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.lead-time-date {
  font-weight: 600;
  color: var(--ssl-ink);
  font-size: 12.5px;
}

.lead-time-clock {
  font-size: 11px;
  color: var(--ssl-muted);
}

.site-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--ssl-soft);
  color: var(--ssl-accent);
  font-weight: 600;
  font-size: 11.5px;
  text-decoration: none;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visitor-info {
  display: flex;
  flex-direction: column;
}

.visitor-name {
  font-weight: 700;
  color: var(--ssl-ink);
}

.visitor-contact {
  font-size: 12px;
  color: var(--ssl-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.whatsapp-direct-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #0d9488;
  font-weight: 600;
  text-decoration: none;
  font-size: 11.5px;
  background: #ccfbf1;
  padding: 1px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.whatsapp-direct-btn:hover {
  background: #99f6e4;
}

.service-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11.5px;
  background: #e0e7ff;
  color: #3730a3;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-new { background: var(--ssl-emerald-bg); color: var(--ssl-emerald-ink); }
.status-contacted { background: var(--ssl-blue-bg); color: var(--ssl-blue-ink); }
.status-in_progress { background: var(--ssl-amber-bg); color: var(--ssl-amber-ink); }
.status-closed { background: #f1f1f5; color: #717182; }
.status-won { background: var(--ssl-emerald-bg); color: var(--ssl-emerald-ink); font-weight: 800; }
.status-lost { background: #fef2f2; color: #b91c1c; }
.status-spam { background: #f1f1f5; color: #94a3b8; text-decoration: line-through; }

/* ==========================================================================
   VIEW 3: DEDICATED SINGLE SITE DASHBOARD
   ========================================================================== */
.site-profile-header {
  background: var(--ssl-surface-card);
  backdrop-filter: blur(var(--ssl-blur));
  border: 1px solid var(--ssl-line);
  border-radius: 16px;
  padding: 22px 26px;
  box-shadow: var(--ssl-shadow);
  margin-bottom: 24px;
}

.site-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ssl-muted);
  margin-bottom: 12px;
}

.site-breadcrumb a {
  color: var(--ssl-accent);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.site-profile-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.site-profile-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-profile-title h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--ssl-ink);
  letter-spacing: -0.3px;
}

.site-profile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   VIEW 2: SITES DIRECTORY FULL GRID
   ========================================================================== */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.site-card {
  background: var(--ssl-surface-card);
  border: 1px solid var(--ssl-line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--ssl-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px -20px rgba(99, 89, 146, 0.45);
}

.site-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.site-card-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ssl-ink);
  margin-bottom: 3px;
}

.site-card-info a {
  font-size: 12px;
  color: var(--ssl-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(115, 111, 155, 0.05);
  border-radius: 12px;
}

.site-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--ssl-emerald-bg);
  color: var(--ssl-emerald-ink);
}

.site-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--ssl-line-subtle);
  font-size: 12px;
  color: var(--ssl-muted);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(32, 32, 57, 0.45);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -15px rgba(32, 32, 57, 0.4);
  border: 1px solid var(--ssl-line);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
}

.modal-overlay.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--ssl-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ssl-ink);
}

.modal-body {
  padding: 22px 24px;
}

.field-group {
  margin-bottom: 16px;
}

.field-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ssl-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.field-value {
  font-size: 14px;
  color: var(--ssl-ink);
  font-weight: 500;
  background: #f8f7fc;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--ssl-line-subtle);
  word-break: break-word;
}

.code-copy-box {
  display: flex;
  align-items: center;
  background: #1e1b38;
  color: #e9e6fc;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: monospace;
  font-size: 13px;
  gap: 10px;
  margin-top: 8px;
}

.code-copy-box span {
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: 45px 20px;
  color: var(--ssl-muted);
}

.empty-state svg {
  margin: 0 auto 12px;
  color: var(--ssl-muted);
  opacity: 0.5;
}

.empty-state h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ssl-ink);
  margin-bottom: 4px;
}

.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--ssl-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 99999;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-notice.is-show {
  transform: translateY(0);
  opacity: 1;
}

@keyframes anFadeSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   PRO ADMIN 6-CARD KPI GRID
   ========================================================================== */
.an-kpi-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

@media (max-width: 1450px) {
  .an-kpi-grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .an-kpi-grid-6 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .an-kpi-grid-6 { grid-template-columns: 1fr; }
}

/* Sub-Tabs Nav for Single-Site and Analytics */
.tab-nav-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--ssl-line);
  padding: 0 20px;
  background: var(--ssl-surface);
  overflow-x: auto;
}

.tab-nav-btn {
  padding: 12px 16px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ssl-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-nav-btn:hover {
  color: var(--ssl-ink);
}

.tab-nav-btn.is-active {
  color: var(--ssl-accent);
  border-bottom-color: var(--ssl-accent);
}

/* Source Badges */
.badge-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.badge-google-ads {
  background: #fef08a;
  color: #854d0e;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.badge-organic {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-direct {
  background: #f1f5f9;
  color: #475569;
}

.badge-blocked {
  background: #ffe4e6;
  color: #be123c;
}

.badge-allowed {
  background: #dcfce7;
  color: #15803d;
}

/* Site Date Filter Pills */
.site-range-btn {
  background: #ffffff;
  border: 1px solid var(--ssl-line);
  color: var(--ssl-muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.site-range-btn:hover {
  border-color: var(--ssl-accent);
  color: var(--ssl-ink);
}

.site-range-btn.is-active {
  background: var(--ssl-accent);
  border-color: var(--ssl-accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(97, 82, 214, 0.25);
}

/* Device Badges */
.device-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.device-mobile {
  background: #ede9fe;
  color: #6d28d9;
}

.device-desktop {
  background: #e0e7ff;
  color: #3730a3;
}

.device-tablet {
  background: #fef3c7;
  color: #b45309;
}

/* Device & Traffic Stat Cards */
.visitors-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 16px 20px;
  background: var(--ssl-surface);
  border-bottom: 1px solid var(--ssl-line);
}

.visitor-stat-card {
  background: #ffffff;
  border: 1px solid var(--ssl-line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.visitor-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.visitor-stat-info h5 {
  font-size: 11px;
  font-weight: 700;
  color: var(--ssl-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.visitor-stat-info .stat-num {
  font-size: 17px;
  font-weight: 800;
  color: var(--ssl-ink);
  line-height: 1.2;
}

.visitor-stat-info .stat-pct {
  font-size: 10.5px;
  color: var(--ssl-muted);
  font-weight: 600;
}

/* ==========================================================
 * LEAD MESSAGES & INBOX (CARDS VIEW)
 * ========================================================== */
.inbox-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
  padding: 20px 24px;
}

.inbox-lead-card {
  background: #ffffff;
  border: 1px solid var(--ssl-line);
  border-radius: 16px;
  box-shadow: 0 3px 12px rgba(32, 32, 57, 0.04);
  display: flex;
  flex-direction: column;
  transition: all 0.22s ease;
  overflow: hidden;
  position: relative;
}

.inbox-lead-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(97, 82, 214, 0.12);
  border-color: rgba(97, 82, 214, 0.35);
}

.inbox-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #fbfbfe;
  border-bottom: 1px solid var(--ssl-line);
  gap: 10px;
}

.inbox-site-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ssl-ink);
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--ssl-line);
  text-decoration: none;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-site-chip:hover {
  border-color: var(--ssl-accent);
  color: var(--ssl-accent);
}

.inbox-card-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inbox-card-btn-readmore {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  background: var(--ssl-accent);
  padding: 5px 12px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.inbox-card-btn-readmore:hover {
  background: var(--ssl-accent-hover);
  transform: translateY(-1px);
}

.inbox-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.inbox-customer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inbox-avatar-stack {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inbox-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 100%);
  color: #6152d6;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(97, 82, 214, 0.2);
}

.inbox-customer-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--ssl-ink);
  line-height: 1.2;
}

.inbox-customer-contact {
  font-size: 12px;
  color: var(--ssl-muted);
  margin-top: 2px;
}

.inbox-contact-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inbox-btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #25d366;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 7px;
  text-decoration: none;
  transition: all 0.18s ease;
}

.inbox-btn-wa:hover {
  background: #1eb757;
  transform: translateY(-1px);
}

.inbox-btn-tel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: var(--ssl-ink);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 7px;
  text-decoration: none;
  border: 1px solid var(--ssl-line);
}

.inbox-btn-tel:hover {
  background: #e2e8f0;
}

.inbox-message-bubble {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3.5px solid var(--ssl-accent);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #1e293b;
  position: relative;
}

.inbox-message-text {
  font-style: italic;
  color: #334155;
  margin-top: 4px;
}

.inbox-topic-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: rgba(97, 82, 214, 0.08);
  color: #6152d6;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
}

.inbox-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ssl-muted);
  gap: 8px;
  padding-top: 4px;
}

.inbox-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #ffffff;
  border-top: 1px solid var(--ssl-line);
  gap: 10px;
}

/* ==========================================================================
   MULTI-SITE IP SECURITY CARDS (SCALABLE FOR 100+ SITES)
   ========================================================================== */
.security-sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.security-site-card {
  background: var(--ssl-surface-card);
  border: 1.5px solid var(--ssl-line);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  box-shadow: var(--ssl-shadow-sm);
}

.security-site-card:hover {
  transform: translateY(-2px);
  border-color: var(--ssl-accent);
  box-shadow: 0 8px 24px -6px rgba(97, 82, 214, 0.22);
}

.security-site-card.is-active {
  border-color: var(--ssl-accent);
  background: rgba(97, 82, 214, 0.04);
  box-shadow: 0 0 0 2px rgba(97, 82, 214, 0.25);
}

.security-site-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.security-site-card-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ssl-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-site-card-url {
  font-size: 11.5px;
  color: var(--ssl-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: monospace;
}

.security-site-card-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.security-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.chip-blocked {
  background: #ffe4e6;
  color: #e11d48;
}

.chip-deflect {
  background: #fef3c7;
  color: #b45309;
}

.chip-attempts {
  background: #f1f5f9;
  color: #475569;
}

/* ==========================================================================
   ATTRIBUTION & DURATION BADGES
   ========================================================================== */
.badge-traffic {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.badge-traffic-gads {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-traffic-organic {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-traffic-direct {
  background: #f1f5f9;
  color: #475569;
}

.badge-traffic-referral {
  background: #eff6ff;
  color: #1d4ed8;
}

.badge-duration {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
}

.landing-url-snippet {
  font-size: 11px;
  color: var(--ssl-muted);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: monospace;
  display: block;
}

/* Delete Button */
.btn-delete-lead {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(225, 29, 72, 0.2);
  background: #fff;
  color: #e11d48;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-delete-lead:hover {
  background: #ffe4e6;
  border-color: #e11d48;
  transform: scale(1.05);
}

/* ==========================================================================
   IP INSPECTION TIMELINE & LOGS
   ========================================================================== */
.inspect-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.inspect-stat-card {
  background: #f8fafc;
  border: 1px solid var(--ssl-line);
  border-radius: 10px;
  padding: 10px 14px;
}

.inspect-stat-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--ssl-muted);
  text-transform: uppercase;
}

.inspect-stat-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--ssl-ink);
  margin-top: 2px;
}

.inspect-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.inspect-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
}

.inspect-timeline-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
}



/* ==========================================================
 * AGENT HUB & MULTI-SITE AI CENTER STYLES
 * ========================================================== */
.btn-toggle-secret:hover {
  color: var(--ssl-ink) !important;
}

.agent-channel-filter.is-active {
  background: var(--ssl-ink) !important;
  color: #ffffff !important;
  border-color: var(--ssl-ink) !important;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  animation: spin 0.6s linear infinite;
}


/* ==========================================================
   CENTRAL DASHBOARD: SESSION REPLAY & OBSIDIAN THEATER STYLES
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/**
 * Lead CRM - Microsoft Clarity-Style Session Replay (High-End Pro Light Studio)
 * Typography: 'Outfit', sans-serif | Elegant Off-White, Crisp Borders & Azure Accents
 */

#lcrm-replay-app,
.lcrm-player-modal,
#view-replays {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#lcrm-replay-app * {
    box-sizing: border-box;
    font-family: inherit;
}

/* ==========================================================================
   1. MASTER MODAL & DIALOG (ELEGANT LIGHT DOUBLE-BEZEL THEATER)
   ========================================================================== */
.lcrm-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 1;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lcrm-player-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.lcrm-player-dialog {
    position: relative;
    width: 100%;
    max-width: 1480px;
    height: 94vh;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 25px 70px -12px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(226, 232, 240, 0.8), 0 10px 30px -5px rgba(2, 132, 199, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: lcrmDialogPopLight 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lcrmDialogPopLight {
    from { opacity: 0; transform: scale(0.97) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==========================================================================
   2. PLAYER HEADER (CRISP LIGHT COMMAND BAR)
   ========================================================================== */
.lcrm-player-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.lcrm-player-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 4px 10px;
    border-radius: 7px;
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

.lcrm-player-sub-badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 7px;
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.lcrm-player-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.lcrm-player-meta {
    font-size: 12.5px;
    color: #64748b;
    margin-top: 3px;
    font-weight: 400;
}

.lcrm-player-meta strong {
    color: #1e293b;
    font-weight: 600;
}

.lcrm-player-del-btn {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.lcrm-player-del-btn:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.lcrm-player-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lcrm-player-close:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
    transform: rotate(90deg) scale(1.05);
}

/* ==========================================================================
   3. THEATER BODY (SPLIT VIEW - LIGHT THEME)
   ========================================================================== */
.lcrm-player-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: #f8fafc;
}

.lcrm-player-viewport-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

/* Simulated macOS Light Chrome Bar */
.lcrm-simulated-browser-bar {
    height: 46px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 18px;
    gap: 16px;
    flex-shrink: 0;
}

.lcrm-browser-dots {
    display: flex;
    align-items: center;
    gap: 7px;
}

.lcrm-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    transition: transform 0.15s ease;
}

.lcrm-dot:hover {
    transform: scale(1.15);
}

.lcrm-dot-red    { background: #ff5f56; border: 1px solid #e0443e; }
.lcrm-dot-yellow { background: #ffbd2e; border: 1px solid #dea123; }
.lcrm-dot-green  { background: #27c93f; border: 1px solid #1aab29; }

.lcrm-browser-nav-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
}

.lcrm-simulated-url-bar {
    flex: 1;
    height: 30px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    max-width: 680px;
}

.lcrm-simulated-url {
    font-size: 12.5px;
    color: #0369a1;
    font-family: 'Outfit', monospace;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lcrm-browser-viewport-tag {
    font-size: 11.5px;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid #bae6fd;
    font-family: 'Outfit', monospace;
}

/* Viewport Screen */
.lcrm-simulated-screen {
    flex: 1;
    position: relative;
    background: #ffffff;
    overflow: hidden;
}

.lcrm-simulated-screen iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #ffffff;
}

/* Viewport Loader */
.lcrm-viewport-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: opacity 0.25s ease;
}

.lcrm-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0f2fe;
    border-top-color: #0284c7;
    border-radius: 50%;
    animation: lcrmSpin 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes lcrmSpin {
    to { transform: rotate(360deg); }
}

.lcrm-loader-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.2px;
}

.lcrm-loader-sub {
    font-size: 12.5px;
    color: #64748b;
    font-family: 'Outfit', monospace;
}

/* Virtual Animated Mouse Pointer */
.lcrm-virtual-cursor {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    transform: translate3d(50px, 50px, 0);
    transition: transform 0.05s linear;
    will-change: transform;
}

.lcrm-cursor-pulse {
    position: absolute;
    top: -12px;
    left: -12px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.45) 0%, rgba(2, 132, 199, 0) 70%);
    opacity: 0;
    transform: scale(0.3);
    pointer-events: none;
}

.lcrm-cursor-pulse.is-pulsing {
    animation: lcrmPulseRippleLight 0.5s ease-out forwards;
}

@keyframes lcrmPulseRippleLight {
    0%   { opacity: 1; transform: scale(0.3); box-shadow: 0 0 14px rgba(2, 132, 199, 0.6); }
    50%  { opacity: 0.6; transform: scale(1.2); }
    100% { opacity: 0; transform: scale(2.0); }
}

.lcrm-cursor-label {
    position: absolute;
    top: 24px;
    left: 16px;
    background: #0f172a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
    display: none;
}

/* ==========================================================================
   4. VIDEO CONTROLS DECK (PRISTINE LIGHT BOTTOM DOCK)
   ========================================================================== */
.lcrm-player-controls {
    height: 64px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 18px;
    flex-shrink: 0;
}

.lcrm-play-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.lcrm-play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.5);
}

.lcrm-skip-btn {
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.lcrm-skip-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.lcrm-scrubber-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.lcrm-scrubber {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    accent-color: #0284c7;
}

.lcrm-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #0284c7;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.lcrm-scrubber::-webkit-slider-thumb:hover {
    transform: scale(1.28);
}

.lcrm-time-display {
    font-family: 'Outfit', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #0284c7;
    min-width: 105px;
    background: #f0f9ff;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #bae6fd;
    text-align: center;
}

.lcrm-speed-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lcrm-speed-group {
    display: inline-flex;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 2px;
}

.lcrm-speed-btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.lcrm-speed-btn.is-active {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(2, 132, 199, 0.3);
}

/* ==========================================================================
   5. VISITOR JOURNEY & TELEMETRY STREAM (CLEAN LIGHT SIDEBAR)
   ========================================================================== */
.lcrm-player-sidebar {
    width: 390px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    border-left: 1px solid #e2e8f0;
}

.lcrm-sidebar-head {
    padding: 16px 20px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.lcrm-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
    letter-spacing: -0.2px;
}

.lcrm-events-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 800;
    background: #e0f2fe;
    color: #0284c7;
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid #bae6fd;
}

.lcrm-sidebar-tabs {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.lcrm-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    padding: 6px 0;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.lcrm-tab-btn.is-active {
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.lcrm-timeline-feed {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    background: #f8fafc;
}

/* Timeline Cards */
.lcrm-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.lcrm-feed-item:hover {
    background: #f0f9ff;
    border-color: #bae6fd;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

.lcrm-feed-item.is-active {
    background: #f0f9ff;
    border-color: #38bdf8;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.18);
}

.lcrm-feed-time {
    font-family: 'Outfit', monospace;
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 3px 7px;
    border-radius: 6px;
    flex-shrink: 0;
}

.lcrm-feed-icon-box {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-page   { background: #e0f2fe; color: #0284c7; }
.icon-click  { background: #dcfce7; color: #16a34a; }
.icon-action { background: #fef3c7; color: #d97706; }
.icon-scroll { background: #f3e8ff; color: #9333ea; }
.icon-input  { background: #ffedd5; color: #ea580c; }

.lcrm-feed-content {
    flex: 1;
    min-width: 0;
}

.lcrm-feed-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    word-break: break-word;
}

.lcrm-feed-sub {
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
    word-break: break-word;
}

/* ==========================================================================
   6. DASHBOARD BENTO & TABLE ELEVATIONS (PRO LIGHT)
   ========================================================================== */
.lcrm-bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.lcrm-bento-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lcrm-bento-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}

.lcrm-bento-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.lcrm-bento-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
}

.lcrm-bento-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lcrm-bento-val {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.lcrm-bento-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
    font-weight: 500;
}

.lcrm-panel {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.lcrm-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.lcrm-table-wrap {
    overflow-x: auto;
}

.lcrm-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.lcrm-table th {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.lcrm-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: #334155;
    vertical-align: middle;
}

.lcrm-table tr:hover td {
    background: #f8fafc;
}

.lcrm-watch-replay-btn,
.cd-watch-replay-btn {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 7px 16px !important;
    border-radius: 8px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.lcrm-watch-replay-btn:hover,
.cd-watch-replay-btn:hover {
    transform: translateY(-1px) scale(1.02) !important;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4) !important;
}

.lcrm-journey-trail {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.lcrm-path-pill {
    display: inline-block;
    font-size: 11.5px;
    background: #f1f5f9;
    color: #334155;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    font-family: 'Outfit', monospace;
}

.lcrm-path-active {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.lcrm-path-arrow {
    color: #0284c7;
    font-size: 11px;
    font-weight: bold;
}

.lcrm-table-del-btn,
.cd-delete-replay-btn {
    background: #ffffff;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 6px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.lcrm-table-del-btn:hover,
.cd-delete-replay-btn:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}

.lcrm-toast-notice {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 10000000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: lcrmToastIn 0.25s ease;
}

@keyframes lcrmToastIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Security Gate Login Modal */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-modal-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  text-align: center;
  animation: loginCardPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes loginCardPop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.login-brand-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}
.login-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}
.login-desc {
  font-size: 13.5px;
  color: #64748b;
  margin: 0 0 24px 0;
  line-height: 1.5;
}
.login-input-wrap {
  margin-bottom: 14px;
}
.login-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14.5px;
  font-family: inherit;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.login-input:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}
.login-error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
}
.btn-login-submit {
  width: 100%;
  padding: 12px 20px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease;
}
.btn-login-submit:hover {
  background: #0369a1;
}
.login-footer {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 20px;
}
.login-footer code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: #475569;
}


/* WhatsApp Inbox */
.wa-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.wa-head h2 { margin: 0 0 4px; font-size: 20px; color: var(--ssl-ink); }
.wa-head p { margin: 0; color: var(--ssl-muted); font-size: 13px; max-width: 60ch; }
.wa-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.wa-filters input, .wa-filters select, .wa-card select, .wa-fields input { padding: 8px 10px; border: 1px solid var(--ssl-line); border-radius: 8px; background: var(--ssl-field); color: var(--ssl-ink); font: inherit; font-size: 13px; }
.wa-filters input { min-width: 240px; }
.wa-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.wa-tile { background: var(--ssl-surface-card); border: 1px solid var(--ssl-line-subtle); border-radius: 12px; padding: 12px 14px; }
.wa-tile span { display: block; font-size: 12px; color: var(--ssl-muted); }
.wa-tile b { font-size: 22px; color: var(--ssl-ink); }
.wa-grid { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 14px; align-items: start; }
.wa-list, .wa-detail { background: var(--ssl-surface-card); border: 1px solid var(--ssl-line-subtle); border-radius: 12px; }
.wa-list { max-height: 72vh; overflow-y: auto; }
.wa-row { display: block; width: 100%; text-align: left; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--ssl-line-subtle); background: none; cursor: pointer; font: inherit; color: var(--ssl-ink); }
.wa-row:hover, .wa-row.is-on { background: var(--ssl-soft); }
.wa-row:focus-visible, #wa-save:focus-visible { outline: 2px solid var(--ssl-accent); outline-offset: -2px; }
.wa-row-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13.5px; }
.wa-row-sub, .wa-row-last { display: block; font-size: 12px; color: var(--ssl-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--ssl-blue-bg); color: var(--ssl-blue-ink); white-space: nowrap; }
.wa-s-booked, .wa-s-done { background: var(--ssl-emerald-bg); color: var(--ssl-emerald-ink); }
.wa-s-stalled, .wa-s-new { background: var(--ssl-amber-bg); color: var(--ssl-amber-ink); }
.wa-s-lost { background: var(--ssl-rose-bg); color: var(--ssl-rose-ink); }
.wa-empty, .wa-muted { color: var(--ssl-muted); font-size: 12.5px; }
.wa-empty { padding: 28px; text-align: center; }
.wa-card { padding: 14px 16px; border-bottom: 1px solid var(--ssl-line-subtle); }
.wa-card-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.wa-card h3 { margin: 0 0 2px; font-size: 16px; color: var(--ssl-ink); }
.wa-card label { font-size: 12px; color: var(--ssl-muted); display: flex; flex-direction: column; gap: 3px; }
.wa-fields { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-top: 10px; }
.wa-fields label { flex: 1 1 180px; }
#wa-save { padding: 8px 16px; border: 0; border-radius: 8px; background: var(--ssl-accent); color: var(--ssl-accent-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.wa-history { margin-top: 10px; font-size: 13px; }
.wa-history ul { margin: 8px 0 0; padding-left: 18px; }
.wa-history li { margin-bottom: 4px; }
.wa-thread { padding: 16px; max-height: 56vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.wa-msg { max-width: 76%; padding: 8px 12px; border-radius: 12px; background: var(--ssl-solid); border: 1px solid var(--ssl-line-subtle); align-self: flex-start; }
.wa-msg p { margin: 2px 0; font-size: 13.5px; color: var(--ssl-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.wa-msg time { font-size: 10.5px; color: var(--ssl-muted); }
.wa-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ssl-muted); }
.wa-from-ai, .wa-from-human { align-self: flex-end; }
.wa-from-ai { background: var(--ssl-soft); }
.wa-from-ai .wa-tag { color: var(--ssl-accent); }
.wa-from-human { background: var(--ssl-emerald-bg); }
.wa-from-human .wa-tag { color: var(--ssl-emerald-ink); }
.wa-from-system { align-self: center; background: none; border-style: dashed; text-align: center; }
@media (max-width: 860px) { .wa-grid { grid-template-columns: 1fr; } .wa-list { max-height: 40vh; } .wa-filters input { min-width: 0; flex: 1; } }
/* The replays section has no .view-section class, so it used to stay visible under every other view. */
#view-replays:not(.is-active) { display: none; }

/* WhatsApp Inbox: reply box */
.wa-paused { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; background: var(--ssl-amber-bg); color: var(--ssl-amber-ink); font-size: 12.5px; }
.wa-paused[hidden], .wa-pop[hidden], .wa-attach[hidden], .wa-input[hidden], .wa-round[hidden] { display: none; }
.wa-paused button, .wa-q-add, .wa-q-form button { padding: 5px 12px; border: 1px solid currentColor; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.wa-composer { position: relative; border-top: 1px solid var(--ssl-line-subtle); padding: 10px 14px 14px; }
.wa-composer.is-drop { outline: 2px dashed var(--ssl-accent); outline-offset: -4px; }
.wa-tools { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.wa-tool { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--ssl-muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.wa-tool:hover { background: var(--ssl-soft); color: var(--ssl-accent); }
.wa-tool-text { font-weight: 600; }
#wa-send-status { margin-left: auto; }
#wa-send-status.wa-bad { color: var(--ssl-rose-ink); font-weight: 600; }
.wa-input { display: flex; align-items: flex-end; gap: 8px; }
.wa-input textarea { flex: 1; min-height: 40px; max-height: 140px; resize: none; padding: 10px 12px; border: 1px solid var(--ssl-line); border-radius: 12px; background: var(--ssl-field); color: var(--ssl-ink); font: inherit; font-size: 13.5px; line-height: 1.4; }
.wa-round { flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ssl-line); border-radius: 50%; background: var(--ssl-solid); color: var(--ssl-muted); cursor: pointer; }
.wa-round.wa-go { background: var(--ssl-accent); border-color: var(--ssl-accent); color: var(--ssl-accent-ink); }
.wa-tool:focus-visible, .wa-round:focus-visible, .wa-input textarea:focus-visible, .wa-q:focus-visible { outline: 2px solid var(--ssl-accent); outline-offset: 1px; }
.wa-rec-status { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ssl-ink); }
.wa-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #dc2626; animation: waPulse 1s infinite; }
@keyframes waPulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .wa-rec-dot { animation: none; } }
#wa-voice-audio { flex: 1; height: 40px; min-width: 0; }
.wa-attach { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 8px; border: 1px solid var(--ssl-line-subtle); border-radius: 10px; background: var(--ssl-solid); font-size: 12.5px; }
.wa-attach img, .wa-attach video, .wa-doc { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--ssl-soft); }
.wa-doc { display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--ssl-accent); }
.wa-attach > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wa-pop { position: absolute; left: 14px; right: 14px; bottom: calc(100% - 4px); max-height: 300px; overflow-y: auto; background: var(--ssl-solid); border: 1px solid var(--ssl-line); border-radius: 12px; box-shadow: var(--ssl-shadow); z-index: 5; }
.wa-emoji { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 2px; padding: 8px; right: auto; width: min(340px, calc(100% - 28px)); }
.wa-emoji button { border: 0; background: none; font-size: 20px; padding: 4px; border-radius: 6px; cursor: pointer; }
.wa-emoji button:hover { background: var(--ssl-soft); }
.wa-q { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 9px 12px; border-bottom: 1px solid var(--ssl-line-subtle); cursor: pointer; font-size: 13px; color: var(--ssl-ink); }
.wa-q:hover, .wa-q.is-on { background: var(--ssl-soft); }
.wa-q-body { grid-column: 1; color: var(--ssl-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-q-del { grid-column: 2; grid-row: 1 / span 2; align-self: center; border: 0; background: none; color: var(--ssl-muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.wa-q-del:hover { background: var(--ssl-rose-bg); color: var(--ssl-rose-ink); }
.wa-q-add { margin: 8px 12px; color: var(--ssl-accent); }
.wa-q-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px; }
.wa-q-form input, .wa-q-form textarea { padding: 8px 10px; border: 1px solid var(--ssl-line); border-radius: 8px; background: var(--ssl-field); color: var(--ssl-ink); font: inherit; font-size: 13px; }
.wa-q-form textarea { grid-column: 1 / -1; resize: vertical; }
.wa-q-form button { justify-self: start; color: var(--ssl-accent); }
.wa-thread { max-height: 46vh; }

/* WhatsApp Inbox: media in the thread */
.wa-media { display: block; max-width: 100%; width: 280px; max-height: 320px; object-fit: cover; border-radius: 8px; margin: 4px 0; background: var(--ssl-soft); }
video.wa-media { object-fit: contain; }
.wa-media-audio { display: block; width: 260px; max-width: 100%; height: 40px; margin: 4px 0; }
.wa-media-file { display: inline-block; margin: 4px 0; padding: 6px 12px; border: 1px solid var(--ssl-line); border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--ssl-accent); text-decoration: none; }

/* Vendors & Jobs */
.vd-card { background: var(--ssl-surface-card); border: 1px solid var(--ssl-line-subtle); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.vd-card h3 { margin: 0 0 12px; font-size: 15px; color: var(--ssl-ink); }
.vd-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.vd-card-head h3 { margin: 0; }
.vd-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: end; margin-bottom: 12px; }
.vd-form[hidden], #vd-ledger[hidden] { display: none; }
.vd-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ssl-muted); }
.vd-form input:not([type=checkbox]), .vd-form select, .vd-table select { padding: 8px 10px; border: 1px solid var(--ssl-line); border-radius: 8px; background: var(--ssl-field); color: var(--ssl-ink); font: inherit; font-size: 13px; }
.vd-form .vd-check { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--ssl-ink); }
.vd-sites { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; border: 1px solid var(--ssl-line-subtle); border-radius: 10px; padding: 10px 12px; }
.vd-sites legend { font-size: 12px; color: var(--ssl-muted); padding: 0 6px; }
.vd-btn { padding: 7px 14px; border: 1px solid var(--ssl-line); border-radius: 8px; background: var(--ssl-solid); color: var(--ssl-ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.vd-btn:hover { border-color: var(--ssl-accent); color: var(--ssl-accent); }
.vd-btn:focus-visible, .vd-table select:focus-visible { outline: 2px solid var(--ssl-accent); outline-offset: 1px; }
.vd-primary { background: var(--ssl-accent); border-color: var(--ssl-accent); color: var(--ssl-accent-ink); justify-self: start; }
.vd-primary:hover { color: var(--ssl-accent-ink); background: var(--ssl-accent-hover); }
.vd-scroll { overflow-x: auto; }
.vd-table { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--ssl-ink); }
.vd-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ssl-muted); padding: 8px 10px; border-bottom: 1px solid var(--ssl-line); white-space: nowrap; }
.vd-table td { padding: 10px; border-bottom: 1px solid var(--ssl-line-subtle); vertical-align: top; }
.vd-actions { white-space: nowrap; } .vd-actions .vd-btn { margin-right: 4px; }
.vd-notes { white-space: pre-wrap; font: inherit; font-size: 12px; color: var(--ssl-muted); margin: 4px 0 0; }
.wa-bad { color: var(--ssl-rose-ink); font-weight: 600; }

/* Sites & Numbers */
.st-in { padding: 7px 9px; border: 1px solid var(--ssl-line); border-radius: 8px; background: var(--ssl-field); color: var(--ssl-ink); font: inherit; font-size: 13px; width: 170px; max-width: 100%; }
.st-short { width: 110px; } .st-wide { width: 280px; }
.st-in:focus-visible { outline: 2px solid var(--ssl-accent); outline-offset: 1px; }
#st-vendor { margin-top: 14px; }

/* Cases board: one column per stage */
.vd-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; align-items: start; }
.vd-col { background: var(--ssl-surface-card); border: 1px solid var(--ssl-line-subtle); border-radius: 10px; padding: 8px; min-height: 80px; }
.vd-col h4 { margin: 0 0 8px; font-size: 12px; color: var(--ssl-muted); display: flex; justify-content: space-between; text-transform: uppercase; letter-spacing: .04em; }
.vd-col.vd-hot { border-color: var(--ssl-danger, #dc2626); }
.vd-case { display: block; width: 100%; text-align: left; font: inherit; background: var(--ssl-solid); color: var(--ssl-ink); border: 1px solid var(--ssl-line); border-radius: 8px; padding: 8px; margin-bottom: 6px; cursor: pointer; }
.vd-case:hover, .vd-case:focus-visible { border-color: var(--ssl-ink); outline: none; }
.vd-case b { font-size: 13px; }
.vd-case small { display: block; color: var(--ssl-muted); font-size: 11px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-item[hidden] { display: none; }
