/* ==========================================================================
   WebLead Design System (Following DESIGN.md Vercel Specification)
   ========================================================================== */

:root {
  /* Colors */
  --ds-primary: #171717;
  --ds-on-primary: #ffffff;
  --ds-ink: #171717;
  --ds-body: #4d4d4d;
  --ds-mute: #888888;
  --ds-hairline: #ebebeb;
  --ds-hairline-strong: #a1a1a1;
  --ds-canvas: #ffffff;
  --ds-canvas-soft: #fafafa;
  --ds-canvas-soft-2: #f5f5f5;

  /* Semantics */
  --ds-link: #0070f3;
  --ds-link-deep: #0761d1;
  --ds-link-soft: #d3e5ff;
  --ds-error: #ee0000;
  --ds-error-soft: #f7d4d6;
  --ds-warning: #f5a623;
  --ds-warning-soft: #ffefcf;
  --ds-success: #10b981;
  --ds-success-soft: #d1fae5;
  --ds-info: #0070f3;
  --ds-info-soft: #e0f2fe;

  /* Typography */
  --ds-font-sans: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --ds-font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Radius */
  --ds-radius-xs: 4px;
  --ds-radius-sm: 6px;
  --ds-radius-md: 8px;
  --ds-radius-lg: 12px;
  --ds-radius-xl: 16px;
  --ds-radius-pill: 100px;
  --ds-radius-full: 9999px;

  /* Shadows (Stacked) */
  --ds-shadow-1: 0 0 0 1px rgba(0, 0, 0, 0.08);
  --ds-shadow-2: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.08);
  --ds-shadow-3: 0 4px 12px rgba(0,0,0,0.05), 0 0 0 1px rgba(0,0,0,0.08);
  --ds-shadow-4: 0 12px 24px -6px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.08);
  --ds-shadow-modal: 0 24px 48px -12px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.1);

  /* Layout */
  --sidebar-width: 240px;
  --header-height: 60px;
}

/* Base Reset & Core Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: var(--ds-font-sans);
  background-color: var(--ds-canvas-soft);
  color: var(--ds-ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--ds-link);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--ds-link-deep);
}

/* App Shell Structure */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background-color: var(--ds-canvas);
  border-right: 1px solid var(--ds-hairline);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  transition: transform 0.25s ease;
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ds-hairline);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ds-ink);
  letter-spacing: -0.5px;
}

.brand-badge {
  background-color: var(--ds-primary);
  color: var(--ds-on-primary);
  width: 26px;
  height: 26px;
  border-radius: var(--ds-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.brand-logo-img {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.lead-profile-link {
  color: var(--ds-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.lead-profile-link:hover {
  color: var(--ds-link);
  text-decoration: underline;
}

.lead-profile-link-icon {
  font-size: 11px;
  color: var(--ds-link);
  opacity: 0.85;
}

.sidebar-nav {
  padding: 16px 10px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-label {
  font-family: var(--ds-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ds-mute);
  padding: 12px 10px 4px;
  letter-spacing: 0.5px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--ds-radius-sm);
  color: var(--ds-body);
  font-weight: 450;
  font-size: 13.5px;
  transition: all 0.15s ease;
  min-height: 38px;
}

.nav-item:hover {
  background-color: var(--ds-canvas-soft-2);
  color: var(--ds-ink);
}

.nav-item.active {
  background-color: var(--ds-canvas-soft-2);
  color: var(--ds-ink);
  font-weight: 600;
}

.nav-item .nav-icon-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-badge {
  font-size: 11px;
  font-family: var(--ds-font-mono);
  padding: 2px 6px;
  border-radius: var(--ds-radius-pill);
  background-color: var(--ds-canvas-soft);
  color: var(--ds-body);
  border: 1px solid var(--ds-hairline);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--ds-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--ds-radius-full);
  background-color: var(--ds-canvas-soft-2);
  border: 1px solid var(--ds-hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ds-ink);
}

/* Main Content Area */
.app-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: calc(100vw - var(--sidebar-width));
}

.page-header {
  background-color: var(--ds-canvas);
  border-bottom: 1px solid var(--ds-hairline);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.page-title-box h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.6px;
  color: var(--ds-ink);
}

.page-title-box p {
  font-size: 13px;
  color: var(--ds-body);
  margin-top: 2px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  height: 36px;
  border-radius: var(--ds-radius-sm);
  font-family: var(--ds-font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--ds-primary);
  color: var(--ds-on-primary);
  border-color: var(--ds-primary);
}

.btn-primary:hover {
  background-color: #333333;
}

.btn-secondary {
  background-color: var(--ds-canvas);
  color: var(--ds-ink);
  border-color: var(--ds-hairline);
}

.btn-secondary:hover {
  background-color: var(--ds-canvas-soft-2);
  border-color: var(--ds-hairline-strong);
}

.btn-pill {
  border-radius: var(--ds-radius-pill);
  padding: 0 20px;
  height: 40px;
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: var(--ds-radius-xs);
}

.btn-danger {
  background-color: var(--ds-canvas);
  color: var(--ds-error);
  border-color: var(--ds-error-soft);
}

.btn-danger:hover {
  background-color: var(--ds-error-soft);
  color: var(--ds-error);
}

/* Cards */
.card {
  background-color: var(--ds-canvas);
  border: 1px solid var(--ds-hairline);
  border-radius: var(--ds-radius-md);
  box-shadow: var(--ds-shadow-1);
  overflow: hidden;
  margin-bottom: 24px;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ds-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--ds-ink);
}

.card-body {
  padding: 20px;
}

/* Metric / Stat Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background-color: var(--ds-canvas);
  border: 1px solid var(--ds-hairline);
  border-radius: var(--ds-radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--ds-shadow-1);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-label {
  font-size: 12px;
  font-family: var(--ds-font-mono);
  color: var(--ds-mute);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -1px;
  color: var(--ds-ink);
}

.stat-desc {
  font-size: 12px;
  color: var(--ds-body);
}

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

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.data-table th {
  background-color: var(--ds-canvas-soft);
  font-family: var(--ds-font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ds-mute);
  padding: 10px 16px;
  border-bottom: 1px solid var(--ds-hairline);
  border-top: 1px solid var(--ds-hairline);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--ds-hairline);
  font-size: 13px;
  color: var(--ds-ink);
  vertical-align: middle;
}

.data-table tr:hover td {
  background-color: var(--ds-canvas-soft);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--ds-radius-pill);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}

.badge-processing {
  background-color: var(--ds-info-soft);
  color: var(--ds-info);
  border: 1px solid rgba(0, 112, 243, 0.2);
}

.badge-completed {
  background-color: var(--ds-success-soft);
  color: var(--ds-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-failed {
  background-color: var(--ds-error-soft);
  color: var(--ds-error);
  border: 1px solid rgba(238, 0, 0, 0.2);
}

.badge-not-called {
  background-color: var(--ds-canvas-soft-2);
  color: var(--ds-body);
  border: 1px solid var(--ds-hairline);
}

.badge-not-received {
  background-color: var(--ds-warning-soft);
  color: var(--ds-warning);
  border: 1px solid rgba(245, 166, 35, 0.2);
}

.badge-interested {
  background-color: var(--ds-success-soft);
  color: var(--ds-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-not-interested {
  background-color: var(--ds-error-soft);
  color: var(--ds-error);
  border: 1px solid rgba(238, 0, 0, 0.2);
}

.badge-closed {
  background-color: #f3e8ff;
  color: #7928ca;
  border: 1px solid rgba(121, 40, 202, 0.2);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ds-ink);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  height: 38px;
  border: 1px solid var(--ds-hairline);
  border-radius: var(--ds-radius-sm);
  background-color: var(--ds-canvas);
  color: var(--ds-ink);
  font-family: var(--ds-font-sans);
  font-size: 13.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-textarea {
  height: auto;
  min-height: 100px;
  line-height: 1.5;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--ds-primary);
  box-shadow: 0 0 0 1px var(--ds-primary);
}

.form-hint {
  font-size: 11.5px;
  color: var(--ds-mute);
  margin-top: 4px;
}

/* Filters & Search Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.search-input-group {
  position: relative;
  min-width: 260px;
}

.search-input-group input {
  padding-left: 34px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ds-mute);
  pointer-events: none;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background-color: var(--ds-canvas);
  border-radius: var(--ds-radius-lg);
  border: 1px solid var(--ds-hairline);
  box-shadow: var(--ds-shadow-modal);
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--ds-mute);
  padding: 4px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  background-color: var(--ds-canvas-soft);
  border-top: 1px solid var(--ds-hairline);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background-color: var(--ds-primary);
  color: var(--ds-on-primary);
  padding: 12px 18px;
  border-radius: var(--ds-radius-sm);
  box-shadow: var(--ds-shadow-4);
  font-size: 13px;
  font-weight: 450;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.2s ease;
  min-width: 250px;
  max-width: 400px;
}

.toast.toast-error {
  background-color: var(--ds-error);
}

.toast.toast-success {
  background-color: #15803d;
}

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

/* Empty States */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--ds-body);
}

.empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  color: var(--ds-mute);
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ds-ink);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 13px;
  color: var(--ds-mute);
  max-width: 360px;
  margin: 0 auto 20px;
}

/* Progress Indicator */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background-color: var(--ds-canvas-soft-2);
  border-radius: var(--ds-radius-pill);
  overflow: hidden;
  margin-top: 12px;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--ds-link);
  border-radius: var(--ds-radius-pill);
  transition: width 0.4s ease;
}

.eta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--ds-font-mono);
  font-size: 11px;
  color: var(--ds-ink);
  background: var(--ds-canvas-soft-2);
  border: 1px solid var(--ds-hairline);
  padding: 2px 8px;
  border-radius: var(--ds-radius-pill);
  font-weight: 500;
  white-space: nowrap;
}

.eta-box {
  padding: 8px 14px;
  background: var(--ds-canvas-soft-2);
  border: 1px solid var(--ds-hairline);
  border-radius: var(--ds-radius-sm);
  min-width: 130px;
}

.d-none {
  display: none !important;
}

.live-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--ds-link);
  box-shadow: 0 0 0 rgba(0, 112, 243, 0.4);
  animation: pulse 1.8s infinite;
  margin-right: 6px;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 112, 243, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(0, 112, 243, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 112, 243, 0); }
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.pagination-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--ds-radius-sm);
  background-color: var(--ds-canvas);
  border: 1px solid var(--ds-hairline);
  font-size: 13px;
  color: var(--ds-ink);
}

.pagination-item:hover {
  background-color: var(--ds-canvas-soft-2);
}

.pagination-item.active {
  background-color: var(--ds-primary);
  color: var(--ds-on-primary);
  border-color: var(--ds-primary);
}

/* Mobile Header & Bottom Navigation */
.mobile-top-bar {
  display: none;
  height: var(--header-height);
  background-color: var(--ds-canvas);
  border-bottom: 1px solid var(--ds-hairline);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 99;
}

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--ds-canvas);
  border-top: 1px solid var(--ds-hairline);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
}

.mobile-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ds-body);
  font-size: 11px;
  padding: 6px;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

.mobile-bottom-item.active {
  color: var(--ds-primary);
  font-weight: 600;
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 190;
}

/* ==========================================================================
   Responsive Adaptations (Tablet & Mobile Phone - 100% Fully Responsive)
   ========================================================================== */

/* Prevent any accidental horizontal scrolling across all viewports */
html, body {
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

@media (max-width: 1023px) {
  .page-header {
    padding: 16px 20px;
  }
  .page-content {
    padding: 16px 20px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
    box-shadow: var(--ds-shadow-4);
  }

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

  .mobile-overlay.open {
    display: block;
  }

  .app-main {
    margin-left: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding-bottom: 76px; /* Space for bottom nav bar */
  }

  .mobile-top-bar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 99;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
  }

  .page-header .page-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .page-header .page-actions .btn {
    flex: 1 1 calc(50% - 4px);
    min-height: 44px;
    justify-content: center;
    font-size: 13px;
  }

  .page-content {
    padding: 12px 14px;
  }

  /* Stats grid on mobile */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Filter bar on mobile: scrollable pills + full-width search */
  .filter-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .filter-bar > div:first-child {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-bar > div:first-child::-webkit-scrollbar {
    display: none;
  }

  .filter-bar > div:first-child .btn {
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 38px;
    padding: 0 12px;
  }

  .filter-bar form {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .filter-bar form .search-input-group {
    flex: 1 1 180px;
    min-width: 0;
    width: 100%;
  }

  .filter-bar form .btn {
    min-height: 44px;
    padding: 0 14px;
  }

  /* Responsive Table: transforms cleanly to Card List on mobile */
  .table-responsive {
    border: none;
    overflow: visible;
    background: transparent;
  }

  .data-table, 
  .data-table thead, 
  .data-table tbody, 
  .data-table th, 
  .data-table td, 
  .data-table tr {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .data-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
    height: 0;
    overflow: hidden;
  }

  .data-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .data-table tr {
    background-color: var(--ds-canvas);
    border: 1px solid var(--ds-hairline);
    border-radius: var(--ds-radius-lg);
    padding: 14px 16px;
    box-shadow: var(--ds-shadow-1);
    margin-bottom: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .data-table td {
    border-bottom: 1px solid var(--ds-canvas-soft-2);
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 13.5px;
    text-align: left !important;
    max-width: 100% !important;
  }

  .data-table td:last-child {
    border-bottom: none;
    padding-top: 12px;
    padding-bottom: 0;
  }

  .data-table td::before {
    content: attr(data-label);
    font-family: var(--ds-font-mono);
    font-size: 10.5px;
    text-transform: uppercase;
    color: var(--ds-mute);
    font-weight: 600;
    letter-spacing: 0.5px;
    display: block;
  }

  .data-table td > * {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Compact row-style for concise metadata cells */
  .data-table td[data-label="Rating"],
  .data-table td[data-label="Timestamp"],
  .data-table td[data-label="Created"],
  .data-table td[data-label="#"],
  .data-table td[data-label="Yield"] {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .data-table td[data-label="Rating"] > *,
  .data-table td[data-label="Timestamp"] > *,
  .data-table td[data-label="Created"] > *,
  .data-table td[data-label="#"] > *,
  .data-table td[data-label="Yield"] > * {
    width: auto;
    text-align: right;
  }

  /* Full-width touch-friendly inputs & selects in mobile cards */
  .data-table td select.lead-status-select,
  .data-table td input.lead-notes-input {
    width: 100% !important;
    min-width: 100% !important;
    min-height: 44px;
    font-size: 14px;
  }

  /* Mobile buttons inside table cards */
  .data-table td .btn {
    min-height: 44px !important;
    height: auto !important;
    padding: 8px 12px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
    width: 100%;
  }

  .data-table td div[style*="display: inline-flex"],
  .data-table td div[style*="display:flex"] {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .data-table td div[style*="display: inline-flex"] .btn,
  .data-table td div[style*="display:flex"] .btn {
    width: 100% !important;
    justify-content: center;
  }

  /* Toast notification positioned safely above mobile bottom nav */
  .toast-container {
    bottom: 74px;
    left: 14px;
    right: 14px;
    max-width: calc(100vw - 28px);
  }

  .toast {
    width: 100%;
    box-sizing: border-box;
    font-size: 13px;
    padding: 12px 16px;
    box-shadow: var(--ds-shadow-3);
  }

  /* Mobile touch targets meeting 44px standards */
  .btn, .form-input, .form-select, .mobile-bottom-item {
    min-height: 44px;
  }

  /* Preformatted code blocks on mobile */
  pre, code {
    max-width: 100%;
    word-break: break-all;
    white-space: pre-wrap;
  }
}

/* Specific Phone Optimizations (<= 480px, e.g. iPhone, Pixel, Samsung Galaxy) */
@media (max-width: 480px) {
  .page-header .page-actions .btn {
    flex: 1 1 100%;
  }

  /* Bottom sheet modal styling for phones */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-box {
    border-radius: var(--ds-radius-xl) var(--ds-radius-xl) 0 0;
    max-height: 88vh;
    max-width: 100%;
    width: 100%;
    box-shadow: var(--ds-shadow-modal);
  }

  .modal-header {
    padding: 16px 18px;
  }

  .modal-body {
    padding: 16px 18px;
    max-height: 60vh;
    overflow-y: auto;
  }

  .modal-footer {
    padding: 14px 18px;
    flex-direction: column;
    gap: 8px;
  }

  .modal-footer .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  /* Forms on small phone screens */
  .form-group {
    margin-bottom: 16px;
  }

  .card {
    padding: 14px 16px;
  }
}

/* ==========================================================================
   SEO Landing Page & Utility Helpers
   ========================================================================== */
.faq-item {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.faq-item:hover {
  border-color: var(--ds-hairline-strong) !important;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
}

