/**
 * Another Level Loft Conversions - Admin Panel Executive Design System
 * Modern, High-End Responsive UI for Leads Management & Booking Engine
 */

:root {
  --p-bg: #F4F6F3;
  --p-surface: #FFFFFF;
  --p-sidebar-bg: #141C12;
  --p-sidebar-hover: #222E1F;
  --p-sidebar-active: #31422C;
  --p-primary: #4F6B42;
  --p-primary-hover: #3E5434;
  --p-primary-light: #EBF2E7;
  --p-accent: #D48C29;
  --p-text: #1A1D1A;
  --p-text-muted: #6B7268;
  --p-border: #E2E8F0;
  --p-border-subtle: #EDF2F7;
  --p-radius: 8px;
  --p-radius-sm: 5px;
  --p-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --p-shadow-md: 0 4px 14px rgba(20,28,18,0.08);
  --p-shadow-lg: 0 12px 32px rgba(20,28,18,0.14);
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

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

html, body.panel-body {
  font-family: var(--font-sans);
  background: var(--p-bg);
  color: var(--p-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Completely Hide Scrollbars Everywhere While Keeping Smooth Scrolling */
::-webkit-scrollbar {
  width: 0px !important;
  height: 0px !important;
  display: none !important;
  background: transparent !important;
}
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html, body {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none !important;
  width: 0px !important;
  height: 0px !important;
}

/* --------------------------------------------------------------------------
   Layout Shell
   -------------------------------------------------------------------------- */
.panel-wrapper {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.panel-sidebar {
  width: 225px;
  background: var(--p-sidebar-bg);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.sidebar-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--p-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1.2;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #8C9C87;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

/* User Card in Sidebar */
.sidebar-user-card {
  padding: 10px 16px;
  margin: 10px 12px 2px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--p-radius);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #3B4E36;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13.5px;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: #A9BCA4;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

.status-dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #48BB78;
  display: inline-block;
  box-shadow: 0 0 6px #48BB78;
}

.user-card-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #FC8181;
  background: rgba(229, 62, 62, 0.15);
  border: 1px solid rgba(229, 62, 62, 0.25);
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin-left: auto;
}
.user-card-logout-btn:hover {
  background: #E53E3E;
  color: #FFFFFF;
}

/* Sidebar Nav */
.sidebar-nav {
  padding: 8px 12px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.nav-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6C7D67;
  padding: 8px 12px 3px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8.5px 12px;
  border-radius: var(--p-radius-sm);
  color: #CBD5E0;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.nav-link:hover {
  background: var(--p-sidebar-hover);
  color: #FFFFFF;
}

.nav-link.active {
  background: var(--p-sidebar-active);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #6B8E5A;
}

/* Permanent Fixed Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding: 12px 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: var(--p-sidebar-bg);
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  z-index: 10;
}

.nav-link svg {
  flex-shrink: 0;
  color: #8C9C87;
  transition: color 0.15s ease;
}

.nav-link:hover svg,
.nav-link.active svg {
  color: #FFFFFF;
}

.nav-badge {
  margin-left: auto;
  background: #4F6B42;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 12px;
}

.nav-logout:hover {
  background: #742A2A !important;
  color: #FFFFFF !important;
}

.panel-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

/* --------------------------------------------------------------------------
   Main Content Area
   -------------------------------------------------------------------------- */
.panel-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  width: calc(100% - 225px);
  margin-left: 225px;
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Mode Toggle Button (Topbar) */
.desktop-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--p-surface-2);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-sm);
  color: var(--p-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.desktop-sidebar-toggle:hover {
  background: var(--p-surface);
  color: var(--p-primary);
  border-color: var(--p-border-dark);
}

/* Sidebar Mode Toggle Icons */
.icon-to-compact {
  display: block;
}

.icon-to-normal {
  display: none;
}

html.sidebar-compact .icon-to-compact,
body.sidebar-compact .icon-to-compact {
  display: none !important;
}

html.sidebar-compact .icon-to-normal,
body.sidebar-compact .icon-to-normal {
  display: block !important;
}

/* --------------------------------------------------------------------------
   Sidebar Modes: Normal (260px Full) vs Compact (68px Locked Rail)
   -------------------------------------------------------------------------- */
@media (min-width: 992px) {
  .desktop-sidebar-toggle {
    display: inline-flex;
  }

  /* Default / Normal Full Sidebar */
  .panel-sidebar {
    width: 225px;
    overflow-x: hidden;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
    z-index: 1000;
  }

  .panel-main {
    margin-left: 225px;
    width: calc(100% - 225px);
  }

  /* Compact Mode (Locked 68px Icon-Only Rail) */
  html.sidebar-compact .panel-sidebar,
  body.sidebar-compact .panel-sidebar {
    width: 68px !important;
  }

  html.sidebar-compact .panel-main,
  body.sidebar-compact .panel-main {
    margin-left: 68px !important;
    width: calc(100% - 68px) !important;
  }

  /* Hide labels and text cleanly */
  html.sidebar-compact .brand-text,
  body.sidebar-compact .brand-text,
  html.sidebar-compact .user-info,
  body.sidebar-compact .user-info,
  html.sidebar-compact .nav-section-label,
  body.sidebar-compact .nav-section-label,
  html.sidebar-compact .nav-link span,
  body.sidebar-compact .nav-link span,
  html.sidebar-compact .sidebar-footer .nav-link span,
  body.sidebar-compact .sidebar-footer .nav-link span {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  html.sidebar-compact .sidebar-header,
  body.sidebar-compact .sidebar-header {
    padding: 16px 14px 14px;
    justify-content: center;
  }

  html.sidebar-compact .sidebar-header-workspace,
  body.sidebar-compact .sidebar-header-workspace {
    padding: 12px 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  html.sidebar-compact .workspace-switcher-trigger,
  body.sidebar-compact .workspace-switcher-trigger {
    padding: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    border-radius: 10px;
    gap: 0;
  }

  html.sidebar-compact .workspace-mark,
  body.sidebar-compact .workspace-mark {
    margin: 0 auto;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }

  html.sidebar-compact .workspace-info,
  body.sidebar-compact .workspace-info,
  html.sidebar-compact .workspace-chevron,
  body.sidebar-compact .workspace-chevron {
    display: none !important;
  }

  html.sidebar-compact .sidebar-brand,
  body.sidebar-compact .sidebar-brand {
    justify-content: center;
    gap: 0;
  }

  html.sidebar-compact .sidebar-user-card,
  body.sidebar-compact .sidebar-user-card {
    padding: 8px;
    margin: 10px 8px 4px;
    justify-content: center;
  }

  html.sidebar-compact .user-avatar,
  body.sidebar-compact .user-avatar {
    margin: 0 auto;
  }

  html.sidebar-compact .sidebar-user-mini,
  body.sidebar-compact .sidebar-user-mini {
    padding: 6px !important;
    justify-content: center !important;
  }

  html.sidebar-compact .sidebar-user-mini > div:not(.user-avatar),
  body.sidebar-compact .sidebar-user-mini > div:not(.user-avatar) {
    display: none !important;
  }

  html.sidebar-compact .sidebar-nav,
  body.sidebar-compact .sidebar-nav {
    padding: 8px 6px;
  }

  html.sidebar-compact .nav-link,
  body.sidebar-compact .nav-link {
    padding: 10px 14px;
    justify-content: center;
    gap: 0;
    position: relative;
  }

  html.sidebar-compact .nav-link svg,
  body.sidebar-compact .nav-link svg {
    min-width: 20px;
    width: 20px;
    height: 20px;
    margin: 0 auto;
  }

  html.sidebar-compact .nav-badge,
  body.sidebar-compact .nav-badge {
    display: none !important;
  }

  /* Compact notification dot */
  html.sidebar-compact .nav-link:has(.nav-badge)::after,
  body.sidebar-compact .nav-link:has(.nav-badge)::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 14px;
    width: 7px;
    height: 7px;
    background: #48BB78;
    border-radius: 50%;
    box-shadow: 0 0 6px #48BB78;
  }

  html.sidebar-compact .sidebar-footer,
  body.sidebar-compact .sidebar-footer {
    padding: 12px 6px;
  }

  html.sidebar-compact .sidebar-footer .nav-link,
  body.sidebar-compact .sidebar-footer .nav-link {
    justify-content: center;
    padding: 10px 14px;
    gap: 0;
  }

  /* CRITICAL: Do NOT expand on hover in compact mode ("takay hover py full show na ho") */
  html.sidebar-compact .panel-sidebar:hover,
  body.sidebar-compact .panel-sidebar:hover {
    width: 68px !important;
    box-shadow: none !important;
  }

  html.sidebar-compact .panel-sidebar:hover .brand-text,
  body.sidebar-compact .panel-sidebar:hover .brand-text,
  html.sidebar-compact .panel-sidebar:hover .user-info,
  body.sidebar-compact .panel-sidebar:hover .user-info,
  html.sidebar-compact .panel-sidebar:hover .nav-section-label,
  body.sidebar-compact .panel-sidebar:hover .nav-section-label,
  html.sidebar-compact .panel-sidebar:hover .nav-link span,
  body.sidebar-compact .panel-sidebar:hover .nav-link span,
  html.sidebar-compact .panel-sidebar:hover .sidebar-footer .nav-link span,
  body.sidebar-compact .panel-sidebar:hover .sidebar-footer .nav-link span {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* Topbar */
.panel-topbar {
  background: var(--p-surface);
  border-bottom: 1px solid var(--p-border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--p-border);
  border-radius: 6px;
  padding: 6px 9px;
  cursor: pointer;
  color: var(--p-text);
}

.topbar-title {
  font-family: var(--font-sans) !important;
  font-size: 19px;
  font-weight: 700;
  color: var(--p-text);
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.topbar-title-mobile {
  display: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #F0FFF4;
  border: 1px solid #C6F6D5;
  color: #22543D;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
}

.pulse-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38A169;
  box-shadow: 0 0 0 0 rgba(56, 161, 105, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 161, 105, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(56, 161, 105, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 161, 105, 0); }
}

.btn-topbar-quick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--p-primary-light);
  border: 1px solid #DFEBD9;
  color: var(--p-primary);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-topbar-quick:hover {
  background: var(--p-primary);
  color: #FFFFFF;
}

.panel-content {
  padding: 28px 32px;
  flex: 1;
}

.panel-footer {
  padding: 18px 32px;
  border-top: 1px solid var(--p-border);
  background: var(--p-surface);
}

/* --------------------------------------------------------------------------
   KPI Metric Cards
   -------------------------------------------------------------------------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 20px 22px;
  box-shadow: var(--p-shadow-sm);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.metric-card:hover {
  border-color: #CBD5E0;
  box-shadow: var(--p-shadow-md);
}

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

.metric-title {
  font-size: 13px;
  font-weight: 600;
  color: #718096;
}

.metric-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-value {
  font-size: 32px;
  font-weight: 800;
  color: #1A202C;
  line-height: 1.1;
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
}

.metric-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Panels, Tables & Cards
   -------------------------------------------------------------------------- */
.panel-card {
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  padding: 22px 24px;
  box-shadow: var(--p-shadow-sm);
}

.panel-card-header {
  margin-bottom: 18px;
}

.panel-card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: #1A1A1A;
  margin: 0;
}

.panel-card-sub {
  font-size: 12.5px;
  color: #718096;
  margin: 3px 0 0;
}

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

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

.panel-table th {
  background: #F8FAFC;
  color: #4A5568;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--p-border);
}

.panel-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--p-border-subtle);
  color: #2D3748;
  vertical-align: middle;
}

.panel-table tbody tr:hover {
  background: #F8FAFC;
}

.panel-table tbody tr:last-child td {
  border-bottom: none;
}

/* Status Capsule Badges (Consistent Sizing & High Contrast) */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 105px;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
  text-transform: capitalize;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Compact Count Badges / Pills for Numbers & Tables */
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  box-sizing: border-box;
  letter-spacing: 0;
  box-shadow: none;
  white-space: nowrap;
}

.badge-count-leads {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #DCFCE7;
}

.badge-count-calls {
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FFEDD5;
}

.badge-count-chats {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #DBEAFE;
}

.badge-count-total {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.panel-table-compact th {
  padding: 10px 10px;
  font-size: 11px;
}

.panel-table-compact td {
  padding: 11px 10px;
}

/* Compact Status Badges for Tables & Logs */
.badge-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  box-sizing: border-box;
  line-height: 1;
}

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

.badge-status-failed {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.template-pill {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  padding: 2px 6px;
  border-radius: 4px;
  color: #334155;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* Email Template Visual Preview Components */
.email-view-tabs {
  display: inline-flex;
  background: #E2E8F0;
  padding: 3px;
  border-radius: 8px;
  gap: 3px;
}

.email-view-tab-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.email-view-tab-btn.active {
  background: #FFFFFF;
  color: #1E293B;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Email Template Details Card & Summary */
.template-details-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px 16px;
  transition: all 0.15s ease;
}

.template-summary-row {
  font-weight: 700;
  font-size: 14.5px;
  color: #1E293B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
}

.template-summary-row::-webkit-details-marker {
  display: none;
}

.template-summary-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.template-summary-title {
  word-break: break-word;
  line-height: 1.35;
}

.template-summary-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.template-view-btn {
  font-size: 11px;
  padding: 3px 9px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #334155;
  white-space: nowrap;
}

.template-active-badge {
  font-size: 10.5px;
  padding: 0 8px;
  height: 22px;
  display: inline-flex;
  align-items: center;
}

.template-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.grid-2-col-responsive {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.email-preview-frame-wrap {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.email-preview-header {
  background: #F8FAFC;
  padding: 10px 14px;
  border-bottom: 1px solid #E2E8F0;
  font-size: 12px;
  display: grid;
  gap: 4px;
}

.email-preview-header-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.email-preview-header-label {
  width: 55px;
  color: #64748B;
  font-weight: 600;
  font-size: 11px;
  flex-shrink: 0;
}

.email-preview-header-val {
  color: #1E293B;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-preview-iframe {
  width: 100%;
  height: 440px;
  border: none;
  display: block;
  background: #F8FAFC;
}

/* Responsive Overrides for Email Marketing on Mobile (< 768px) */
@media (max-width: 768px) {
  .template-details-card {
    padding: 12px 10px;
  }

  .template-summary-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .template-summary-title-wrap {
    width: 100%;
  }

  .template-summary-title {
    font-size: 13.5px;
  }

  .template-summary-actions {
    width: 100%;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px dashed #E2E8F0;
  }

  .template-tabs-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .email-view-tabs {
    display: flex;
    width: 100%;
  }

  .email-view-tab-btn {
    flex: 1;
    justify-content: center;
    text-align: center;
    padding: 7px 6px;
    font-size: 11.5px;
  }

  .template-tab-actions {
    width: 100%;
  }

  .template-tab-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 6px 12px;
  }

  .email-preview-header {
    padding: 8px 10px;
    gap: 5px;
  }

  .email-preview-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .email-preview-header-label {
    width: auto;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94A3B8;
  }

  .email-preview-header-val {
    white-space: normal;
    word-break: break-word;
    font-size: 12px;
    line-height: 1.4;
  }

  .email-preview-iframe {
    height: 480px;
  }

  .grid-2-col-responsive {
    grid-template-columns: 1fr;
  }

  .campaign-presets-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Simulator wrapper for modal preview */
.email-phone-frame {
  max-width: 380px;
  margin: 0 auto;
  border: 8px solid #1E293B;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  background: #FFFFFF;
}

.email-phone-notch {
  height: 18px;
  background: #1E293B;
  display: flex;
  justify-content: center;
  align-items: center;
}

.email-phone-notch::after {
  content: '';
  width: 50px;
  height: 4px;
  background: #334155;
  border-radius: 2px;
}

/* Campaign Preset Cards */
.campaign-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.campaign-preset-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.campaign-preset-card:hover {
  border-color: #16A34A;
  background: #F0FDF4;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.campaign-preset-card.active {
  border-color: #16A34A;
  background: #F0FDF4;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.campaign-preset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.campaign-preset-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 6px;
}

.campaign-preset-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: #F1F5F9;
  color: #475569;
  white-space: nowrap;
}

.campaign-preset-desc {
  font-size: 11px;
  color: #64748B;
  line-height: 1.35;
}

.badge-new,
.badge-New {
  background: #FEF3C7;
  color: #854D0E;
  border: 1px solid #F59E0B;
}

.badge-contacted,
.badge-Contacted {
  background: #E0E7FF;
  color: #3730A3;
  border: 1px solid #6366F1;
}

.badge-survey_booked,
.badge-survey-booked,
.badge-Survey\ Booked {
  background: #DBEAFE;
  color: #1E40AF;
  border: 1px solid #3B82F6;
}

.badge-cad_sent,
.badge-cad-sent,
.badge-CAD\ Sent {
  background: #F3E8FF;
  color: #6B21A8;
  border: 1px solid #A855F7;
}

.badge-quote_sent,
.badge-quote-sent,
.badge-Quote\ Sent {
  background: #CCFBF1;
  color: #115E59;
  border: 1px solid #14B8A6;
}

.badge-won,
.badge-Won {
  background: #DCFCE7;
  color: #14532D;
  border: 1px solid #22C55E;
}

.badge-lost,
.badge-Lost {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #EF4444;
}

.badge-cancelled,
.badge-Cancelled {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid #94A3B8;
}

.badge-replied,
.badge-Replied {
  background: #E0F2FE;
  color: #0369A1;
  border: 1px solid #0EA5E9;
}

/* Source Pill & Monospace Badges (Clean & Clickable) */
.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  color: #1E293B;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3.5px 7px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap !important;
  max-width: 120px;
  line-height: 1.3;
  transition: all 0.15s ease;
  box-sizing: border-box;
  flex-shrink: 0;
}

.source-pill span {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
  max-width: 85px;
  vertical-align: middle;
}

.source-pill:hover {
  background: #FFFFFF;
  border-color: #4F6B42;
  color: #2D4A22;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Dashboard Inquiries Leads Table Spacing & Clearance */
.dashboard-leads-table th,
.dashboard-leads-table td {
  padding: 11px 6px;
}

.dashboard-leads-table th:first-child,
.dashboard-leads-table td:first-child {
  padding-left: 14px;
}

.dashboard-leads-table th:last-child,
.dashboard-leads-table td:last-child {
  padding-right: 14px;
  padding-left: 2px;
}

.dashboard-leads-table th:nth-child(6),
.dashboard-leads-table td:nth-child(6) {
  padding-right: 2px;
}

.dashboard-leads-table th:nth-child(7),
.dashboard-leads-table td:nth-child(7) {
  padding-left: 2px;
}

/* Dashboard Main Grid (Optimized for 13-inch Laptops and Desktops) */
.dashboard-main-grid {
  display: grid;
  grid-template-columns: 1fr 285px;
  gap: 18px;
  margin-top: 20px;
  align-items: start;
}

@media (max-width: 1200px) {
  .dashboard-main-grid,
  .panel-grid-2-1 {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

.mono-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: #F1F5F9;
  padding: 2px 6px;
  border-radius: 4px;
  color: #475569;
}

/* --------------------------------------------------------------------------
   Buttons & Controls
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn-primary {
  background: var(--p-primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--p-primary-hover);
  box-shadow: 0 4px 10px rgba(79, 107, 66, 0.25);
}

.btn-secondary {
  background: #FFFFFF;
  border-color: #CBD5E0;
  color: #2D3748;
}

.btn-secondary:hover {
  background: #F8FAFC;
  border-color: #A0AEC0;
}

/* Form Controls */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #2D3748;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid #CBD5E0;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #1A202C;
  background: #FFFFFF;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--p-primary);
  box-shadow: 0 0 0 3px rgba(79, 107, 66, 0.15);
}

/* Flash Alerts */
.flash-alert {
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 20px;
}

.flash-success {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
}

.flash-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */
.panel-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
}

.panel-modal-card {
  background: #FFFFFF;
  border-radius: 10px;
  padding: 28px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--p-shadow-lg);
  position: relative;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 24px;
  color: #718096;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}

.btn-close-modal:hover {
  color: #1A202C;
}

/* --------------------------------------------------------------------------
   Site Switcher Dropdown (Multi-Site Master Engine)
   -------------------------------------------------------------------------- */
.site-switcher-wrap {
  position: relative;
  display: inline-block;
}
.site-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  padding: 6px 13px;
  border-radius: 9999px;
  font-family: var(--font-sans) !important;
  font-size: 12.5px;
  font-weight: 600;
  color: #1E293B;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.15s ease;
  letter-spacing: -0.01em;
}
.site-switcher-btn:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
  color: #0F172A;
}
.site-switcher-text {
  font-family: var(--font-sans) !important;
  font-weight: 600;
  color: inherit;
  letter-spacing: -0.01em;
}
.site-switcher-globe-icon {
  display: inline-flex;
  align-items: center;
  color: #0F172A;
}
.site-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.site-switcher-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  width: 290px;
  z-index: 99999;
  overflow: hidden;
  display: none;
}
.site-switcher-dropdown.is-open {
  display: block;
  animation: fadeInDown 0.15s ease;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.site-dropdown-header {
  padding: 10px 14px 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94A3B8;
  border-bottom: 1px solid #F1F5F9;
}
.site-switcher-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: #1E293B;
  font-size: 13px;
  transition: background 0.12s;
  border-bottom: 1px solid #F8FAFC;
}
.site-switcher-item:hover {
  background: #F8FAFC;
}
.site-switcher-item:last-child {
  border-bottom: none;
}
.site-switcher-item.active {
  background: #F1F5F9;
}
.site-dropdown-footer {
  padding: 8px 12px;
  background: #F8FAFC;
  border-top: 1px solid #F1F5F9;
}
.site-manage-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s;
}
.site-manage-link:hover {
  color: var(--p-primary);
}

/* ==========================================================================
   Luxury Minimalist Workspace & Platform Switcher System
   ========================================================================== */
.sidebar-header-workspace {
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
  flex-shrink: 0;
}

.workspace-switcher-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 9px 12px;
  border-radius: 10px;
  color: #FFFFFF;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  font-family: inherit;
}

.workspace-switcher-trigger:hover,
.workspace-switcher-trigger.is-open {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.workspace-mark {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: -0.3px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.workspace-switcher-trigger:hover .workspace-mark {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.workspace-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.workspace-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.workspace-sub {
  font-size: 10.5px;
  color: #94A3B8;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.workspace-chevron {
  color: #64748B;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.workspace-switcher-trigger.is-open .workspace-chevron {
  transform: rotate(180deg);
  color: #FFFFFF;
}

/* Luxury Workspace Popover Menu */
.workspace-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 12px;
  right: 12px;
  background: #0F172A;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.6), 0 10px 15px -5px rgba(0, 0, 0, 0.3);
  z-index: 999999;
  overflow: hidden;
  display: none;
  backdrop-filter: blur(16px);
}

.workspace-popover.is-open {
  display: block;
  animation: popoverFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.workspace-popover-header {
  padding: 10px 14px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748B;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.workspace-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #E2E8F0;
  text-decoration: none;
  font-size: 12.5px;
  transition: all 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.workspace-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.workspace-item:last-child {
  border-bottom: none;
}

.workspace-item.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.workspace-item-mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 10.5px;
  flex-shrink: 0;
}

.workspace-item-title {
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1.2;
}

.workspace-item-desc {
  font-size: 10.5px;
  color: #94A3B8;
  margin-top: 2px;
}

.workspace-popover-footer {
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.workspace-footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #94A3B8;
  padding: 6px 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
}

.workspace-footer-link:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   Luxury Minimalist Dashboard Components
   ========================================================================== */
.luxury-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.luxury-header-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  color: #0F172A;
  letter-spacing: -0.3px;
  margin: 0;
}

.luxury-header-sub {
  font-size: 13px;
  color: #64748B;
  margin-top: 4px;
}

.luxury-network-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.luxury-restore-btn {
  background: #FFFFFF !important;
  border-color: #CBD5E1 !important;
  color: #334155 !important;
  transition: all 0.15s ease !important;
}

.luxury-restore-btn:hover {
  background: #F1F5F9 !important;
  color: #0F172A !important;
  border-color: #94A3B8 !important;
}

.dashboard-operations-row {
  display: flex;
  gap: 20px;
  align-items: stretch;
  margin-top: 20px;
}

.dashboard-leads-card {
  margin-top: 20px;
}

.luxury-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.luxury-kpi-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.luxury-kpi-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.luxury-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.luxury-kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748B;
}

.luxury-kpi-val {
  font-size: 32px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.8px;
  line-height: 1.1;
  font-family: var(--font-sans);
  margin-bottom: 8px;
}

.luxury-kpi-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748B;
}

.luxury-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.luxury-chip-green {
  background: #F0FDF4;
  color: #16A34A;
  border: 1px solid #DCFCE7;
}

.luxury-chip-purple {
  background: #FAF5FF;
  color: #9333EA;
  border: 1px solid #F3E8FF;
}

.luxury-chip-blue {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #DBEAFE;
}

.luxury-chip-amber {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FEF3C7;
}

/* Slim Segmented Platform Share Bar */
.luxury-share-strip {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.luxury-share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
}

.luxury-share-track {
  height: 8px;
  background: #F1F5F9;
  border-radius: 999px;
  display: flex;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 12px;
}

.luxury-share-seg {
  height: 100%;
  transition: width 0.3s ease;
}

.luxury-share-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #475569;
}

.luxury-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.luxury-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Luxury Agenda & Timeline List */
.luxury-agenda-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.luxury-agenda-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  transition: all 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.luxury-agenda-item:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.luxury-agenda-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  flex-shrink: 0;
  line-height: 1;
}

.luxury-agenda-day {
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
  font-family: var(--font-mono);
}

.luxury-agenda-mo {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748B;
  margin-top: 2px;
}

.luxury-agenda-info {
  flex: 1;
  min-width: 0;
}

.luxury-agenda-name {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.luxury-agenda-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #64748B;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.luxury-agenda-badge {
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
}

/* Luxury Filter Status Banner */
.luxury-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 18px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.luxury-filter-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #475569;
}

.luxury-filter-indicator strong {
  color: #0F172A;
}

.luxury-quick-action-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  text-decoration: none;
  color: #1E293B;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.luxury-quick-action-link:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;
  color: #0F172A;
  box-shadow: 0 3px 8px rgba(0,0,0,0.04);
}

.luxury-quick-action-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   Universal Modern Confirmation Modal (Premium Alert / Action Dialog)
   -------------------------------------------------------------------------- */
.panel-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
}
.panel-confirm-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}
.panel-confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.panel-confirm-dialog {
  position: relative;
  background: #FFFFFF;
  width: 100%;
  max-width: 440px;
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transform: scale(0.92) translateY(10px);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}
.panel-confirm-overlay.is-visible .panel-confirm-dialog {
  transform: scale(1) translateY(0);
}
.panel-confirm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #F1F5F9;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  z-index: 2;
}
.panel-confirm-close:hover {
  background: #E2E8F0;
  color: #0F172A;
}
.panel-confirm-content {
  padding: 28px 24px 20px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.panel-confirm-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
/* Danger / Delete Icon */
.panel-confirm-icon-wrap.danger {
  background: #FEE2E2;
  color: #DC2626;
  border: 2px solid #FECACA;
}
/* Warning / Spam Icon */
.panel-confirm-icon-wrap.warning {
  background: #FEF3C7;
  color: #D97706;
  border: 2px solid #FDE68A;
}
/* Info / Primary Icon */
.panel-confirm-icon-wrap.info,
.panel-confirm-icon-wrap.primary {
  background: #EBF2E7;
  color: #2D4428;
  border: 2px solid #C8DEC2;
}
.panel-confirm-title {
  font-size: 19px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 10px 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.panel-confirm-message {
  font-size: 14px;
  color: #64748B;
  line-height: 1.6;
  margin: 0;
}
.panel-confirm-alert-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  background: #FFF1F2;
  border: 1px solid #FFE4E6;
  color: #BE123C;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
}
.panel-confirm-footer {
  padding: 16px 24px 24px 24px;
  background: #F8FAFC;
  border-top: 1px solid #F1F5F9;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}
.panel-confirm-btn-cancel {
  flex: 1;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.panel-confirm-btn-cancel:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  color: #0F172A;
}
.panel-confirm-btn-action {
  flex: 1;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.panel-confirm-btn-action.danger {
  background: #DC2626;
  border-color: #B91C1C;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}
.panel-confirm-btn-action.danger:hover {
  background: #B91C1C;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.45);
}
.panel-confirm-btn-action.warning {
  background: #EA580C;
  border-color: #C2410C;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
}
.panel-confirm-btn-action.warning:hover {
  background: #C2410C;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.45);
}
.panel-confirm-btn-action.primary,
.panel-confirm-btn-action.info {
  background: #2D4428;
  border-color: #1F2E1B;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(45, 68, 40, 0.35);
}
.panel-confirm-btn-action.primary:hover,
.panel-confirm-btn-action.info:hover {
  background: #1F2E1B;
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .panel-confirm-dialog {
    border-radius: 18px;
    margin: 6px;
  }
  .panel-confirm-content {
    padding: 24px 18px 16px 18px;
  }
  .panel-confirm-icon-wrap {
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
  }
  .panel-confirm-footer {
    padding: 14px 18px 20px 18px;
    gap: 10px;
  }
  .panel-confirm-title {
    font-size: 17px;
  }
  .panel-confirm-message {
    font-size: 13.5px;
  }
  .panel-confirm-btn-cancel,
  .panel-confirm-btn-action {
    padding: 11px 14px;
    font-size: 13.5px;
  }
}

/* --------------------------------------------------------------------------
   Mobile App Native Dock & Alert Components (Hidden on Desktop)
   -------------------------------------------------------------------------- */
.mobile-app-dock {
  display: none;
}

.mobile-priority-alert {
  display: none;
}

.mobile-sticky-lead-bar {
  display: none;
}

.mobile-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-mark-sm {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--p-primary);
  color: #FFFFFF;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}

.mobile-brand-subtitle {
  display: none;
  font-size: 11px;
  color: var(--p-text-muted);
  font-weight: 500;
  line-height: 1.1;
}

.mobile-back-header {
  display: none;
}

/* --------------------------------------------------------------------------
   Interactive Booking Calendar (Desktop Default)
   -------------------------------------------------------------------------- */
.calendar-header-card {
  margin-bottom: 24px;
}

.calendar-header-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.calendar-title-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.calendar-month-title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 28px;
  margin: 0;
  color: #1A1A1A;
  font-weight: 400;
}

.calendar-appointments-badge {
  font-size: 12px;
  padding: 4px 10px;
}

.calendar-controls-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-nav-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-nav-text-desktop {
  display: inline;
}

.cal-nav-text-mobile {
  display: none;
}

.calendar-grid-card {
  padding: 0;
  overflow: hidden;
}

.calendar-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  text-align: center;
  font-weight: 700;
  font-size: 12.5px;
  color: #4A5568;
  padding: 12px 0;
}

.cal-day-header-cell {
  text-align: center;
}

.cal-day-header-cell .day-full {
  display: inline;
}

.cal-day-header-cell .day-short {
  display: none;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #E2E8F0;
}

.cal-day-empty {
  min-height: 110px;
  background: #FAFAFA;
  padding: 8px;
}

.cal-day-cell {
  min-height: 120px;
  background: #FFFFFF;
  padding: 10px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background 0.15s ease;
}

.cal-day-cell.cal-day-sunday {
  background: #FDFDFD;
}

.cal-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cal-day-number {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #2D3748;
}

.cal-day-sunday .cal-day-number {
  color: #A0AEC0;
}

.cal-badge-full {
  background: #FED7D7;
  color: #C53030;
  font-size: 9.5px;
  padding: 2px 4px;
}

.cal-badge-booked {
  background: #C6F6D5;
  color: #22543D;
  font-size: 9.5px;
  padding: 2px 4px;
}

.cal-badge-booked .booked-full {
  display: inline;
}

.cal-badge-booked .booked-short {
  display: none;
}

.cal-bookings-list {
  display: grid;
  gap: 4px;
  margin-top: auto;
}

.cal-lead-pill {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 4px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 11.5px;
  color: #166534;
  line-height: 1.3;
  transition: all 0.15s ease;
}

.cal-lead-pill:hover {
  background: #DCFCE7;
  border-color: #86EFAC;
}

.cal-lead-slot-row {
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cal-lead-postcode {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
}

.cal-lead-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  color: #15803D;
}

.cal-mobile-booking-pill {
  display: none;
}

/* --------------------------------------------------------------------------
   Responsive Mobile Native App Shell (<= 991px)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  /* Bookings Master-Detail Mobile View Switcher */
  .mobile-back-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
  }

  .btn-mobile-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #FFFFFF;
    border: 1px solid #CBD5E0;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13.5px;
    color: #2D3748;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: background 0.15s ease;
  }

  .btn-mobile-back:active {
    background: #F7FAFC;
    transform: scale(0.97);
  }

  .show-list-mobile .leads-list-col {
    display: block !important;
    width: 100% !important;
  }

  .show-list-mobile .lead-details-col {
    display: none !important;
  }

  .show-details-mobile .leads-list-col {
    display: none !important;
  }

  .show-details-mobile .filter-search-card {
    display: none !important;
  }

  .show-details-mobile .lead-details-col {
    display: block !important;
    width: 100% !important;
  }

  .panel-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 270px !important;
    max-width: 82vw !important;
    bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important;
    height: calc(100vh - 62px - env(safe-area-inset-bottom, 0px)) !important;
    height: calc(100dvh - 62px - env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(100dvh - 62px - env(safe-area-inset-bottom, 0px)) !important;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    z-index: 1040; /* Sits right above backdrop (1030), below/aligned above dock (1050) */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .panel-sidebar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .panel-sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1030 !important;
  }

  .panel-sidebar .sidebar-footer-toggle-btn {
    display: none !important; /* Hide Compact mode toggle on mobile phones */
  }

  .panel-sidebar .sidebar-footer {
    margin-top: auto;
    padding: 10px 12px 14px !important;
    background: var(--p-sidebar-bg) !important;
  }

  .panel-main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .panel-sidebar.open {
    transform: translateX(0);
  }

  .panel-sidebar-backdrop.open {
    display: block;
  }

  .sidebar-close-btn {
    display: block;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .panel-topbar {
    padding: 8px 12px !important;
    height: 52px !important;
    background: #FFFFFF;
    border-bottom: 1px solid #E2E8F0;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    box-sizing: border-box !important;
  }

  .topbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }

  .mobile-topbar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .brand-logo-mark-sm {
    display: flex !important;
    width: 26px !important;
    height: 26px !important;
    font-size: 11px !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  .mobile-brand-subtitle {
    display: none !important; /* Hide cluttered 2nd line subtitle on mobile */
  }

  .topbar-title {
    font-family: var(--font-sans) !important;
    font-size: 15.5px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    letter-spacing: -0.015em !important;
    color: #0F172A !important;
  }

  .topbar-title-full {
    display: none !important;
  }

  .topbar-title-mobile {
    display: inline !important;
  }

  .topbar-right {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .topbar-right .btn-topbar-quick {
    display: none !important; /* Calendar is permanently accessible via bottom dock */
  }

  .topbar-live-status {
    display: none !important; /* Hide lone green dot on mobile */
  }

  .site-switcher-btn {
    padding: 5px 10px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    font-family: var(--font-sans) !important;
    gap: 6px !important;
    border-radius: 9999px !important;
  }

  .site-switcher-dropdown {
    width: 270px !important;
    max-width: 90vw !important;
    right: 0 !important;
    left: auto !important;
  }

  .luxury-export-csv-btn {
    display: none !important; /* Hide Export CSV on mobile devices */
  }

  .panel-content {
    padding: 14px 14px 96px !important;
  }

  .panel-grid-2-1 {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .dashboard-operations-row {
    flex-direction: column !important;
    gap: 14px !important;
    margin-top: 14px !important;
  }

  .dashboard-leads-card {
    margin-top: 14px !important;
  }

  .dashboard-main-grid {
    margin-top: 14px !important;
    gap: 14px !important;
  }

  .dashboard-main-grid > div:last-child {
    gap: 14px !important;
  }

  /* Priority Alert Banner on Mobile */
  .mobile-priority-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 14px 0;
    padding: 12px 14px;
    background: #141C12;
    color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(20, 28, 18, 0.2);
    border: 1px solid rgba(79, 107, 66, 0.4);
    animation: fadeInSlide 0.3s ease-out;
  }

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

  .mobile-alert-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .mobile-alert-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #E53E3E;
    box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.7);
    animation: pulseRing 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
    flex-shrink: 0;
  }

  @keyframes pulseRing {
    to {
      box-shadow: 0 0 0 10px rgba(229, 62, 62, 0);
    }
  }

  .mobile-alert-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .mobile-alert-title {
    font-size: 13px;
    color: #FFFFFF;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-alert-sub {
    font-size: 11px;
    color: #9AE6B4;
    font-family: var(--font-mono);
    margin-top: 1px;
  }

  .mobile-alert-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--p-primary);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    transition: background 0.15s;
  }

  .mobile-alert-cta:active {
    background: var(--p-primary-hover);
    transform: scale(0.96);
  }

  /* Fixed Native App Bottom Dock */
  .mobile-app-dock {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: rgba(20, 28, 18, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    align-items: center;
    justify-content: space-around;
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  }

  .dock-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: #A0AEC0;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .dock-icon-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
  }

  .dock-title {
    font-size: 10px;
    font-weight: 600;
    margin-top: 3px;
    letter-spacing: 0.02em;
  }

  .dock-tab.active {
    color: #8C9C87;
  }

  .dock-tab.active .dock-icon-box svg {
    stroke: #8C9C87;
  }

  .dock-tab.active .dock-title {
    color: #8C9C87;
    font-weight: 800;
  }

  .dock-tab:active {
    transform: scale(0.93);
  }

  .dock-badge-pulse {
    position: absolute;
    top: -5px;
    right: -10px;
    background: #E53E3E;
    color: #FFFFFF;
    font-size: 9px;
    font-weight: 800;
    height: 16px;
    min-width: 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #141C12;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  }

  /* Sticky Lead Action Toolbar (Above Dock) */
  .mobile-sticky-lead-bar {
    display: flex;
    position: fixed;
    bottom: calc(62px + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid #E2E8F0;
    padding: 10px 16px;
    z-index: 1040;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  }

  .btn-mobile-call-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(135deg, #2E7D32, #1B5E20);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.3);
    -webkit-tap-highlight-color: transparent;
  }

  .btn-mobile-call-action:active {
    transform: scale(0.98);
    opacity: 0.92;
  }

  /* Luxury Executive Dashboard Header on Mobile */
  .luxury-dashboard-header {
    gap: 10px !important;
    margin-bottom: 14px !important;
  }

  .luxury-header-title {
    font-size: 20px !important;
    letter-spacing: -0.3px !important;
    line-height: 1.25 !important;
  }

  .luxury-header-sub {
    font-size: 11.5px !important;
    line-height: 1.35 !important;
  }

  .luxury-network-pill {
    padding: 4px 10px !important;
    font-size: 11px !important;
  }

  /* Luxury Segmented Share Strip on Mobile */
  .luxury-share-strip {
    padding: 12px 14px !important;
    margin-bottom: 14px !important;
    border-radius: 10px !important;
  }

  .luxury-share-header {
    font-size: 12px !important;
    margin-bottom: 8px !important;
  }

  .luxury-share-legend {
    gap: 6px 12px !important;
    font-size: 11px !important;
  }

  /* Luxury Minimalist KPI Matrix on Mobile: Native 2x2 Grid */
  .luxury-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
  }

  .luxury-kpi-card {
    padding: 12px 12px !important;
    border-radius: 10px !important;
  }

  .luxury-kpi-top {
    margin-bottom: 4px !important;
    gap: 4px !important;
  }

  .luxury-kpi-label {
    font-size: 9.5px !important;
    letter-spacing: 0.04em !important;
  }

  .luxury-chip {
    font-size: 10px !important;
    padding: 1px 5px !important;
  }

  .luxury-kpi-val {
    font-size: 22px !important;
    margin-bottom: 3px !important;
    letter-spacing: -0.5px !important;
  }

  .luxury-kpi-footer {
    font-size: 10.5px !important;
    line-height: 1.25 !important;
    color: #64748B !important;
  }

  /* Touch-Friendly Metric Cards on Mobile */
  .metrics-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .metric-card {
    padding: 16px 14px !important;
  }

  .metric-value {
    font-size: 24px !important;
    margin: 6px 0 2px !important;
  }

  .metric-title {
    font-size: 11.5px !important;
  }

  .metric-sub {
    font-size: 11px !important;
  }

  /* Table Cards Touch Optimization */
  .panel-card {
    border-radius: 10px !important;
    padding: 14px !important;
    overflow: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .panel-card-header {
    margin-bottom: 12px !important;
  }

  .panel-card-title {
    font-size: 15.5px !important;
  }

  .form-input {
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
  }

  /* --------------------------------------------------------------------------
     Mobile Table-to-Card Transformation (Eliminates Horizontal Scrolling)
     -------------------------------------------------------------------------- */
  .table-responsive {
    overflow-x: visible !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 1. Dashboard Leads Table Cards (Optimized 7-Column Mobile Card Shell) */
  .dashboard-leads-table,
  .dashboard-leads-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .dashboard-leads-table thead {
    display: none !important;
  }

  .dashboard-leads-table tbody tr {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 11px !important;
    padding: 12px 14px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: visible !important;
  }

  .dashboard-leads-table tbody tr:hover {
    background: #FFFFFF !important;
  }

  .dashboard-leads-table tbody tr td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 1: Customer info (Name & Phone) with safe right clearance for pinned status */
  .dashboard-leads-table tbody tr td:nth-child(1) {
    padding-right: 95px !important;
    word-break: break-word !important;
  }

  /* 5: Status Badge pinned in top right corner of card */
  .dashboard-leads-table tbody tr td:nth-child(5) {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    width: auto !important;
    z-index: 5 !important;
    display: inline-flex !important;
  }

  /* 2: Platform Badge */
  .dashboard-leads-table tbody tr td:nth-child(2) {
    display: flex !important;
    align-items: center !important;
    padding: 1px 0 !important;
  }

  /* 3: Property type & Postcode row */
  .dashboard-leads-table tbody tr td:nth-child(3) {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    padding: 6px 0 !important;
    border-top: 1px solid #F1F5F9 !important;
    border-bottom: 1px solid #F1F5F9 !important;
    font-size: 12.5px !important;
  }

  /* 4: Preferred Date & Slot */
  .dashboard-leads-table tbody tr td:nth-child(4) {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    font-size: 12px !important;
  }

  .dashboard-leads-table tbody tr td:nth-child(4)::before {
    content: 'Survey Date:';
    font-weight: 600;
    color: #64748B;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    padding-left: 17px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 13px 13px;
    flex-shrink: 0;
  }

  /* 6: Source Page link */
  .dashboard-leads-table tbody tr td:nth-child(6) {
    padding-top: 2px !important;
  }

  .dashboard-leads-table tbody tr td:nth-child(6) .source-pill {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
  }

  /* 7: Actions row: Full-width tap-friendly Review button */
  .dashboard-leads-table tbody tr td:nth-child(7) {
    padding-top: 4px !important;
    display: block !important;
    width: 100% !important;
    text-align: left !important;
  }

  .dashboard-leads-table tbody tr td:nth-child(7) .btn {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 8px 12px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    background: #F1F5F9 !important;
    color: #2D3748 !important;
    border: 1px solid #CBD5E0 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
  }
  .dashboard-leads-table tbody tr td:nth-child(7) .btn:hover {
    background: var(--p-primary) !important;
    color: #FFFFFF !important;
    border-color: var(--p-primary) !important;
  }

  /* 2. Bookings Page Leads Table Cards */
  .bookings-leads-table,
  .bookings-leads-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .bookings-leads-table thead {
    display: none !important;
  }

  .bookings-leads-table tbody tr {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    position: relative !important;
  }

  .bookings-leads-table tbody tr td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
  }

  .bookings-leads-table tbody tr td:nth-child(1) {
    padding-right: 115px !important;
  }

  .bookings-leads-table tbody tr td:nth-child(4) {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    width: auto !important;
  }

  .bookings-leads-table tbody tr td:nth-child(2) {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 0 !important;
    border-top: 1px solid #F1F5F9 !important;
    font-size: 13px !important;
  }

  .bookings-leads-table tbody tr td:nth-child(3) {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 12px !important;
  }

  .bookings-leads-table tbody tr td:nth-child(3)::before {
    content: 'Survey Slot:';
    font-weight: 600;
    color: #64748B;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    padding-left: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 13px 13px;
  }

  /* 3. Contacts Table Cards */
  .contacts-table,
  .contacts-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .contacts-table thead {
    display: none !important;
  }

  .contacts-table tbody tr {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
  }

  .contacts-table tbody tr td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
  }

  .contacts-table tbody tr td:nth-child(1) {
    padding-right: 115px !important;
  }

  .contacts-table tbody tr td:nth-child(4) {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: auto !important;
  }

  /* 4. Analytics Table Cards */
  .analytics-table,
  .analytics-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .analytics-table thead {
    display: none !important;
  }

  .analytics-table tbody tr {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .analytics-table tbody tr td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
  }

  /* 5. Calendar Mobile Layout & Weekdays Abbreviation */
  .calendar-days-header {
    padding: 9px 0 !important;
    background: #F8FAFC !important;
  }

  .cal-day-header-cell .day-full {
    display: none !important;
  }

  .cal-day-header-cell .day-short {
    display: block !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #334155 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
  }

  .calendar-header-card {
    padding: 12px 14px !important;
    margin-bottom: 12px !important;
  }

  .calendar-header-flex {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .calendar-title-box {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
  }

  .calendar-month-title {
    font-size: 20px !important;
  }

  .calendar-appointments-badge {
    font-size: 11px !important;
    padding: 3px 8px !important;
  }

  .calendar-controls-box {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .calendar-nav-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1.2fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .cal-nav-btn {
    padding: 7px 4px !important;
    font-size: 12px !important;
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    border-radius: 8px !important;
  }

  .cal-nav-text-desktop {
    display: none !important;
  }

  .cal-nav-text-mobile {
    display: inline !important;
    font-weight: 600 !important;
  }

  .cal-reserve-btn {
    width: 100% !important;
    padding: 9px 12px !important;
    justify-content: center !important;
    font-size: 13px !important;
    border-radius: 8px !important;
  }

  .calendar-grid-card {
    border-radius: 12px !important;
  }

  .calendar-days-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    grid-auto-rows: 52px !important;
    gap: 1px !important;
    background: #E2E8F0 !important;
  }

  .cal-day-cell,
  .cal-day-empty {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 4px 2px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    background: #FFFFFF !important;
    transition: transform 0.1s ease, background 0.15s ease !important;
  }

  .cal-day-empty {
    background: #F8FAFC !important;
  }

  .cal-day-top {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 0 !important;
    width: 100% !important;
  }

  .cal-day-number {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    line-height: 1.1 !important;
  }

  .cal-day-cell.cal-day-sunday .cal-day-number {
    color: #94A3B8 !important;
  }

  /* Days With Bookings (Highlighted in Rich Green) */
  .cal-day-cell.has-bookings {
    background: #DCFCE7 !important;
    border: 1.5px solid #22C55E !important;
    box-shadow: 0 1px 3px rgba(34, 197, 94, 0.25) !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .cal-day-cell.has-bookings:active {
    background: #BBF7D0 !important;
    transform: scale(0.92) !important;
  }

  .cal-day-cell.has-bookings .cal-day-number {
    color: #14532D !important;
    font-weight: 800 !important;
    font-size: 14px !important;
  }

  /* Mobile Booking Numbering / Count Badge */
  .cal-mobile-booking-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #15803D !important;
    color: #FFFFFF !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    padding: 1px 6px !important;
    min-width: 16px !important;
    height: 15px !important;
    line-height: 1 !important;
    margin-top: 2px !important;
    box-shadow: 0 1px 2px rgba(21, 128, 61, 0.35) !important;
  }

  /* Hide bulky details pills & badges inside cell on mobile */
  .cal-day-cell .cal-bookings-list {
    display: none !important;
  }

  .cal-day-top .cal-badge-booked,
  .cal-day-top .cal-badge-full {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   In-Panel Analytics Dashboard Styles
   -------------------------------------------------------------------------- */
.analytics-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.analytics-header-title {
  font-size: 22px;
  font-weight: 800;
  color: #1A202C;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.analytics-header-sub {
  font-size: 13.5px;
  color: #64748B;
  margin: 0;
}

/* Date Range Filter Pills */
.date-range-pills {
  display: inline-flex;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
  gap: 4px;
  flex-wrap: wrap;
}

.range-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748B;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.range-pill:hover {
  color: #1E293B;
  background: rgba(255,255,255,0.6);
}

.range-pill.active {
  background: #FFFFFF;
  color: #15803D;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  font-weight: 700;
}

/* GA4 Live Sync Status Banner */
.ga4-sync-banner {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--p-radius);
  padding: 16px 22px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(15,23,42,0.15);
}

.ga4-sync-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ga4-sync-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F59E0B;
  flex-shrink: 0;
}

.ga4-sync-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 2px;
}

.ga4-sync-sub {
  font-size: 12px;
  color: #94A3B8;
}

.ga4-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ADE80;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

/* Funnel Visualization */
.funnel-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.funnel-step {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--p-radius);
  padding: 18px 20px;
  position: relative;
  transition: all 0.2s ease;
}

.funnel-step:hover {
  border-color: #CBD5E0;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.funnel-step-num {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  margin-bottom: 6px;
}

.funnel-step-val {
  font-size: 26px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.1;
  margin-bottom: 4px;
}

.funnel-step-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
}

.funnel-bar-bg {
  width: 100%;
  height: 8px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
}

.funnel-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.funnel-step-rate {
  font-size: 11.5px;
  font-weight: 700;
  color: #15803D;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Interactive SVG / CSS Daily Chart */
.chart-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--p-radius);
  padding: 22px;
  margin-bottom: 24px;
}

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

.chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: #475569;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.chart-bars-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  height: 180px;
  padding: 16px 0 0;
  border-bottom: 2px solid #E2E8F0;
  position: relative;
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  group: chart-col;
}

.chart-bars-pair {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100%;
  width: 100%;
  max-width: 44px;
  justify-content: center;
}

.chart-bar {
  flex: 1;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease, opacity 0.15s ease;
  position: relative;
}

.chart-bar-visitors {
  background: #94A3B8;
}

.chart-bar-conversions {
  background: #16A34A;
}

.chart-col:hover .chart-bar {
  opacity: 0.85;
}

.chart-col-date {
  font-size: 11px;
  color: #64748B;
  margin-top: 8px;
  text-align: center;
  white-space: nowrap;
  font-weight: 500;
}

.chart-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0F172A;
  color: #FFFFFF;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.chart-col:hover .chart-tooltip {
  opacity: 1;
}

/* Analytics Filter Tabs for Activity */
.activity-filter-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
  overflow-x: auto;
}

.act-tab-btn {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.act-tab-btn:hover {
  color: #1E293B;
  background: #EDF2F7;
}

.act-tab-btn.active {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #CBD5E0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  font-weight: 700;
}

/* Call Number Split Pills */
.call-split-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.call-split-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FFEDD5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 900px) {
  .funnel-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .analytics-header-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .date-range-pills {
    width: 100%;
    overflow-x: auto;
  }

  .chart-bars-wrapper {
    height: 140px;
    gap: 4px;
  }

  .chart-col:nth-child(even) .chart-col-date {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Analytics Stream Visuals, Traffic Sources & Duration Badges
   -------------------------------------------------------------------------- */
.traffic-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2.5px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.source-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.traffic-source-pill.source-google {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #DBEAFE;
}
.source-dot.google { background: #2563EB; }

.traffic-source-pill.source-ads {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}
.source-dot.ads { background: #D97706; }

.traffic-source-pill.source-social {
  background: #FDF2F8;
  color: #BE185D;
  border: 1px solid #FCE7F3;
}
.source-dot.social { background: #DB2777; }

.traffic-source-pill.source-direct {
  background: #F8FAFC;
  color: #475569;
  border: 1px solid #E2E8F0;
}
.source-dot.direct { background: #64748B; }

.traffic-source-pill.source-referral {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #DCFCE7;
}
.source-dot.referral { background: #16A34A; }

.duration-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  background: #F1F5F9;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.stream-visual-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 16px 20px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.stream-metric-box {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px 14px;
}

.stream-metric-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stream-metric-val {
  font-size: 19px;
  font-weight: 800;
  color: #1E293B;
  margin-top: 4px;
  line-height: 1.2;
}

.stream-metric-sub {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
}

.source-bar-strip {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: #E2E8F0;
  margin-top: 8px;
}

.source-bar-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.stream-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px;
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
}

.btn-stream-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--p-border);
  background: #FFFFFF;
  color: var(--p-text);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-stream-action:hover {
  background: var(--p-surface-2);
  border-color: var(--p-border-dark);
}

.stream-row-extra {
  display: none;
}

.stream-row-extra.is-expanded {
  display: table-row !important;
}


