/* ==========================================
   BHOOMIGUARD CORE VISUAL DESIGN SYSTEM
   ========================================== */

:root {
  /* Brand color palette */
  --primary-green: #2E7D32;
  --light-green: #66BB6A;
  --primary-blue: #1976D2;
  --warning-yellow: #F9A825;
  --danger-red: #D32F2F;
  --bg-light: #F8FAFC;
  --card-white: #FFFFFF;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --border-color: #E2E8F0;
  
  /* Elevational Shadows */
  --shadow-subtle: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 10px 20px -3px rgba(30, 41, 59, 0.04), 0 4px 8px -4px rgba(30, 41, 59, 0.04);
  --shadow-premium: 0 20px 25px -5px rgba(30, 41, 59, 0.08), 0 8px 10px -6px rgba(30, 41, 59, 0.08);
  --shadow-hud: 0 12px 24px -4px rgba(0, 0, 0, 0.15), 0 4px 12px -2px rgba(0, 0, 0, 0.1);
  
  /* Roundness standards */
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  
  /* Typography standards */
  --font-headings: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Motion rules */
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ================= DARK THEME VARIABLES ================= */
body.dark-theme {
  --bg-light: #0B0F19;
  --card-white: #161F30;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --border-color: #334155;
  --shadow-card: 0 10px 20px -3px rgba(0, 0, 0, 0.3);
  --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

/* ================= RESET AND LAYOUT ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: #0F172A; /* Outer desktop bg */
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  transition: background-color var(--transition-smooth);
}

/* ================= RESPONSIVE WEB WRAPPER ================= */
.web-frame-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  max-width: 1200px;
  width: 100%;
  padding: 20px;
}

.web-sidebar {
  flex: 1;
  max-width: 420px;
  color: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-badge {
  background-color: var(--primary-green);
  color: white;
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 24px;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.2);
}

.web-sidebar h1 {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.5px;
}

.tagline {
  color: var(--light-green);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.desc {
  color: #94A3B8;
  font-size: 15px;
  line-height: 1.6;
}

.info-features {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 10px;
}

.feature-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.feat-icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.05);
}
.feat-icon.success { color: var(--light-green); }
.feat-icon.primary { color: var(--primary-blue); }
.feat-icon.danger { color: var(--danger-red); }

.feature-item strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
  font-family: var(--font-headings);
}

.feature-item p {
  color: #94A3B8;
  font-size: 13px;
  line-height: 1.4;
}

.sidebar-footer {
  margin-top: 20px;
  font-size: 13px;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--light-green);
  box-shadow: 0 0 10px var(--light-green);
}

/* ================= SMARTPHONE MOCKUP FRAME ================= */
.phone-mockup {
  position: relative;
  width: 410px;
  height: 840px;
  background-color: var(--bg-light);
  border: 12px solid #1E293B;
  border-radius: 48px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border var(--transition-smooth), background-color var(--transition-smooth);
}

/* Camera Notch */
.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 28px;
  background-color: #1E293B;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  z-index: 1000;
}

/* Status Bar */
.phone-status-bar {
  height: 38px;
  padding: 0 28px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  z-index: 999;
  user-select: none;
  background-color: transparent;
}

.phone-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bar-icon {
  width: 14px;
  height: 14px;
}

/* Home Indicator Bar */
.phone-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 5px;
  background-color: var(--text-primary);
  border-radius: 3px;
  z-index: 1000;
  opacity: 0.6;
}

/* ================= VIEWPORT SHELL ================= */
.app-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  flex-direction: column;
  background-color: var(--bg-light);
  overflow: hidden;
  animation: screenFadeIn 0.35s ease;
}

.app-screen.active {
  display: flex;
}

@keyframes screenFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.screen-content {
  flex: 1;
  overflow-y: auto;
  padding: 15px 20px 100px 20px; /* space for tabs bottom navigation + extra breathing room */
  -webkit-overflow-scrolling: touch;
}

.screen-content.scrollable {
  scrollbar-width: none; /* Firefox */
}

.screen-content.scrollable::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}

/* ================= GENERAL TYPOGRAPHY & BUTTONS ================= */
.screen-header {
  padding: 15px 24px 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  z-index: 90;
}

.greeting-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.greeting-title {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 22px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.sub-page-header {
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
}

.sub-page-title {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 18px;
  color: var(--text-primary);
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--card-white);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.icon-button:hover {
  background-color: var(--bg-light);
  transform: scale(1.05);
}

.icon-button .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--danger-red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-light);
}

.section-title {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 22px 0 12px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 12px 0;
}

.section-title-text {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary-green);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-smooth);
  min-height: 48px; /* WCAG 2.5.5 minimum touch target */
  position: relative;
  overflow: hidden;
  user-select: none;
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background-color: var(--primary-green);
  color: white;
  box-shadow: 0 4px 10px rgba(46, 125, 50, 0.2);
}

.btn-primary:hover {
  background-color: #246327;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--primary-blue);
  color: white;
  box-shadow: 0 4px 10px rgba(25, 118, 210, 0.2);
}

.btn-secondary:hover {
  background-color: #145ca5;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.btn-danger {
  background-color: var(--danger-red);
  color: white;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 10px 16px; /* Raised from 8px to meet 44dp minimum */
  font-size: 12px;
  min-height: 44px;
}

.btn-loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  display: inline-block;
}

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

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.mt-15 { margin-top: 15px; }
.pb-20 { padding-bottom: 20px; }

/* ================= PORTFOLIO & SUMMARY ================= */
.portfolio-card {
  background-color: var(--primary-green);
  color: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 10px 25px rgba(46, 125, 50, 0.15);
  margin-top: 5px;
}

.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-headings);
  font-weight: 500;
  font-size: 14px;
  opacity: 0.9;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.success-badge {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.portfolio-main {
  display: flex;
  gap: 30px;
  margin: 18px 0;
}

.portfolio-stat {
  display: flex;
  flex-direction: column;
}

.stat-lbl {
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 4px;
}

.stat-val {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 26px;
}

.stat-val small {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.85;
}

.portfolio-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 12px;
}

.val-icon {
  width: 16px;
  height: 16px;
}

/* ================= QUICK ACTIONS ================= */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.action-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.action-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-subtle);
  transition: transform var(--transition-fast);
}

.action-btn:hover .action-icon-wrap {
  transform: translateY(-2px);
}

.primary-bg { background-color: var(--primary-green); }
.success-bg { background-color: var(--light-green); }
.blue-bg { background-color: var(--primary-blue); }
.warning-bg { background-color: var(--warning-yellow); }

.action-btn span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

/* ================= ALERTS BANNER ================= */
.alert-banner {
  background-color: rgba(211, 47, 47, 0.06);
  border: 1px solid rgba(211, 47, 47, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.alert-banner:hover {
  background-color: rgba(211, 47, 47, 0.1);
}

.alert-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.danger-color {
  color: var(--danger-red);
}

.primary-color {
  color: var(--primary-blue);
}

.warning-color {
  color: var(--warning-yellow);
}

.alert-text strong {
  display: block;
  font-size: 13px;
  color: var(--danger-red);
  font-weight: 700;
}

.alert-text p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.alert-chevron {
  color: var(--text-secondary);
  width: 18px;
}

/* ================= MAP PREVIEW ================= */
.map-preview-card {
  background-color: var(--card-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.map-preview-img-fallback {
  height: 110px;
  background-image: url('https://images.unsplash.com/photo-1524661135-423995f22d0b?auto=format&fit=crop&w=400&q=80');
  background-size: cover;
  background-position: center;
  position: relative;
}

.preview-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(1px);
}

.btn-primary-mini {
  background-color: white;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.map-preview-footer {
  padding: 10px 15px;
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-preview-footer i {
  width: 14px;
  height: 14px;
  color: var(--primary-green);
}

/* ================= PROPERTY CARDS ================= */
.properties-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.property-card {
  background-color: var(--card-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 16px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.property-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-premium);
}

.prop-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap; /* Allow wrapping on narrow screens */
}

.prop-badge-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.survey-badge {
  background-color: rgba(25, 118, 210, 0.08);
  color: var(--primary-blue);
}

.verified-badge {
  background-color: rgba(46, 125, 50, 0.08);
  color: var(--primary-green);
  display: flex;
  align-items: center;
  gap: 4px;
}

.verified-badge i {
  width: 12px;
  height: 12px;
}

.risk-indicator-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.risk-indicator-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.risk-indicator-pill.low-risk {
  background-color: rgba(46, 125, 50, 0.1);
  color: var(--primary-green);
}
.risk-indicator-pill.low-risk .dot { background-color: var(--primary-green); }

.risk-indicator-pill.medium-risk {
  background-color: rgba(249, 168, 37, 0.1);
  color: var(--warning-yellow);
}
.risk-indicator-pill.medium-risk .dot { background-color: var(--warning-yellow); }

.risk-indicator-pill.danger-risk {
  background-color: rgba(211, 47, 47, 0.1);
  color: var(--danger-red);
}
.risk-indicator-pill.danger-risk .dot { background-color: var(--danger-red); }

.prop-card-body {
  margin-top: 12px;
}

.prop-card-body h3 {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
}

.prop-loc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.prop-specs {
  display: flex;
  gap: 15px;
  margin-top: 10px;
  font-size: 12px;
}

.prop-card-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
}

.prop-card-footer .chevron {
  width: 14px;
  height: 14px;
}

.alert-text-span {
  color: var(--warning-yellow);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}
.alert-text-span i {
  width: 12px;
  height: 12px;
}

/* ================= SAFETY TIP CARD ================= */
.safety-tip-card {
  background-color: var(--card-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 16px;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  box-shadow: var(--shadow-card);
}

.tip-icon {
  background-color: rgba(46, 125, 50, 0.08);
  color: var(--primary-green);
  padding: 10px;
  border-radius: var(--radius-md);
}

.tip-content strong {
  font-family: var(--font-headings);
  font-size: 14px;
  color: var(--text-primary);
}

.tip-content p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

/* ================= TIMELINE ================= */
.activity-timeline {
  display: flex;
  flex-direction: column;
  padding-left: 10px;
  border-left: 2px solid var(--border-color);
  margin-left: 8px;
  gap: 20px;
}

.timeline-item {
  position: relative;
  padding-left: 15px;
}

.timeline-bullet {
  position: absolute;
  left: -17px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary-green);
  border: 3px solid var(--bg-light);
}

.timeline-info strong {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
}

.timeline-info p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.timeline-info .time {
  display: block;
  font-size: 11px;
  color: #94A3B8;
  margin-top: 4px;
}

/* ================= BOTTOM TAB NAVIGATION ================= */
.phone-nav-bar {
  height: 64px;
  background-color: var(--card-white);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: absolute;
  bottom: 12px; /* floating above the home indicator */
  left: 12px;
  right: 12px;
  border-radius: 30px;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.03), 0 8px 20px rgba(0,0,0,0.08);
  z-index: 95;
  padding: 0 10px;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

body.dark-theme .phone-nav-bar {
  background-color: rgba(22, 31, 48, 0.95);
}

/* Boundary Walk is a dedicated full-screen HUD with its own bottom controls
   (Exit Mode / Start Walk Sim) — the floating tab bar sat directly on top of
   them (z-index 400 vs 95, but same bottom-anchored region), making the HUD
   buttons look cut off and cramped. Hide the tab bar while that screen is active. */
.app-viewport:has(#screen-boundary-walk.active) ~ .phone-nav-bar {
  display: none;
}

.nav-tab {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 20px;
  transition: all var(--transition-fast);
}

.nav-tab i {
  width: 20px;
  height: 20px;
}

.nav-tab span {
  font-size: 10px;
  font-weight: 600;
}

.nav-tab:hover {
  color: var(--primary-green);
}

.nav-tab.active {
  color: var(--primary-green);
  background-color: rgba(46, 125, 50, 0.08);
}

/* ================= MAP PAGE COMPONENT SPECIFICS ================= */
.map-search-container {
  position: absolute;
  top: 16px;
  left: 12px;
  right: 12px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-bar-wrap {
  display: flex;
  align-items: center;
  background-color: var(--card-white);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-premium);
  border-radius: 30px;
  height: 48px;
  padding: 0 8px 0 16px;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

body.dark-theme .search-bar-wrap {
  background-color: rgba(22, 31, 48, 0.95);
}

.search-icon {
  width: 18px;
  color: var(--text-secondary);
  margin-right: 10px;
}

.search-bar-wrap input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
}

.filter-layer-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  border: none;
  background-color: var(--primary-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  transition: background-color var(--transition-fast);
  flex-shrink: 0;
}

.filter-layer-btn:hover {
  background-color: #246327;
}

.search-chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}

.search-chips-row::-webkit-scrollbar {
  display: none;
}

.search-chip {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 30px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  backdrop-filter: blur(5px);
}

.search-chip:hover {
  background-color: white;
}

.full-screen-map {
  flex: 1;
  width: 100%;
  z-index: 10;
}

/* Custom styles for Leaflet elements inside mobile view */
.leaflet-control-zoom {
  display: none !important; /* Replaced by .zoom-control-group, styled to match our own FAB design */
}

/* Permanent survey-number labels drawn directly on cadastral parcels */
.parcel-label {
  background: rgba(15, 23, 42, 0.75) !important;
  border: none !important;
  border-radius: 6px !important;
  color: white !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 2px 6px !important;
  box-shadow: none !important;
}

.parcel-label::before {
  display: none !important; /* Remove Leaflet's default tooltip arrow */
}

/* Running total distance readout, anchored just above the most recently placed point */
.measure-distance-badge {
  background-color: var(--primary-green);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: var(--shadow-premium);
  white-space: nowrap;
  transform: translate(-50%, -100%);
}

.gps-accuracy-hud {
  position: absolute;
  top: 118px; /* below the search bar + chips row (measured: 16px top + 87px content + 15px gap) */
  left: 12px;
  z-index: 400;
  background-color: rgba(30, 41, 59, 0.85);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(5px);
  white-space: nowrap;
}

.gps-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: var(--light-green);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.5; }
}

@keyframes animate-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.animate-pulse {
  animation: animate-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.floating-controls-column {
  position: absolute;
  right: 12px;
  top: 118px; /* aligned with GPS HUD */
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-fab-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--card-white);
  color: var(--text-primary);
  box-shadow: var(--shadow-premium);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.map-fab-btn:hover {
  background-color: var(--bg-light);
}

.map-fab-btn.active {
  background-color: var(--primary-green);
  color: white;
  border-color: var(--primary-green);
}

.map-fab-btn i {
  width: 18px;
}

/* Zoom +/- grouped into one connected pill, matching common map-app conventions
   instead of two separate floating circles. */
.zoom-control-group {
  display: flex;
  flex-direction: column;
  border-radius: 21px;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
}

.zoom-control-group .zoom-btn {
  border-radius: 0;
  box-shadow: none;
  border: 1px solid var(--border-color);
}

.zoom-control-group .zoom-btn:first-child {
  border-bottom: none;
  border-top-left-radius: 21px;
  border-top-right-radius: 21px;
}

.zoom-control-group .zoom-btn:last-child {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 21px;
  border-bottom-right-radius: 21px;
}

/* Sliding layer switcher drawer panel overlay */
.map-layers-panel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background-color: var(--card-white);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
  z-index: 450;
  padding: 20px;
  max-height: 70%;
  overflow-y: auto;
  scrollbar-width: none;
  transform: translateY(105%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.map-layers-panel::-webkit-scrollbar {
  display: none;
}

.map-layers-panel.open {
  transform: translateY(0);
}

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

.panel-header h3 {
  font-family: var(--font-headings);
  font-size: 16px;
  font-weight: 700;
}

.close-icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.layers-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.layer-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 5px;
}

.layers-row {
  display: flex;
  gap: 10px;
}

.layer-card-option {
  flex: 1;
  cursor: pointer;
}

.layer-card-option input {
  display: none;
}

.layer-card-box {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  transition: all var(--transition-fast);
}

.layer-card-box i {
  width: 22px;
  color: var(--text-secondary);
}

.layer-card-box span {
  font-size: 12px;
  font-weight: 600;
}

.layer-card-option input:checked + .layer-card-box {
  border-color: var(--primary-green);
  background-color: rgba(46, 125, 50, 0.05);
}

.layer-card-option input:checked + .layer-card-box i {
  color: var(--primary-green);
}

.overlays-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.switch-lbl {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.switch-lbl i {
  width: 16px;
}
.ico-green { color: var(--light-green); }
.ico-red { color: var(--danger-red); }
.ico-yellow { color: var(--warning-yellow); }
.ico-blue { color: var(--primary-blue); }
.ico-gray { color: var(--text-secondary); }

/* Map legend (lives inside the layers panel, next to the toggles it explains) */
.map-legend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.custom-switch {
  width: 38px;
  height: 20px;
  appearance: none;
  background-color: #CBD5E1;
  border-radius: 10px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.custom-switch:checked {
  background-color: var(--primary-green);
}

.custom-switch::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: white;
  top: 2px;
  left: 2px;
  transition: transform var(--transition-fast);
}

.custom-switch:checked::before {
  transform: translateX(18px);
}

/* Survey detail drawer bottom sheet popup */
.bottom-map-survey-card {
  position: absolute;
  bottom: 90px; /* above the tab nav bar with breathing room */
  left: 12px;
  right: 12px;
  background-color: var(--card-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hud);
  border: 1px solid var(--border-color);
  padding: 16px;
  z-index: 400;
  transform: translateY(150%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-map-survey-card.open {
  transform: translateY(0);
}

.sheet-drag-handle {
  width: 40px;
  height: 4px;
  background-color: var(--border-color);
  border-radius: 2px;
  margin: -8px auto 10px auto;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.sheet-header h3 {
  font-family: var(--font-headings);
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}

.sheet-quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 15px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
}

.quick-stat {
  display: flex;
  flex-direction: column;
}

.quick-stat .lbl {
  font-size: 11px;
  color: var(--text-secondary);
}

.quick-stat strong {
  font-size: 13px;
  color: var(--text-primary);
  margin-top: 2px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.sheet-actions {
  display: flex;
  gap: 10px;
}

/* ================= PROPERTY DETAILS PAGE SPECIFICS ================= */
.detail-hero-section {
  height: clamp(160px, 22vh, 220px); /* Responsive, no longer fixed */
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 15px;
}

#detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0) 100%);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.survey-badge.large {
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-blue);
  color: white;
  font-weight: 700;
}

.detail-card-row {
  display: flex;
  margin-bottom: 15px;
}

.risk-score-card {
  width: 100%;
  background-color: var(--card-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-card);
}

.risk-circular-wrap {
  width: 64px;
  height: 64px;
  position: relative;
}

.risk-svg {
  width: 100%;
  height: 100%;
}

.circle-bg {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 3.2;
}

.circle-fill-green {
  fill: none;
  stroke: var(--primary-green);
  stroke-width: 3.2;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.score-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.score-number {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  line-height: 1;
}

.score-lbl {
  font-size: 8px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.risk-desc h4 {
  font-family: var(--font-headings);
  font-size: 14px;
  font-weight: 700;
}

.risk-desc p {
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}

.risk-desc small {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.3;
}

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

.detail-info-card {
  background-color: var(--card-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

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

.info-cell .lbl {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.info-cell .val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.verification-checklist-card {
  background-color: var(--card-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  box-shadow: var(--shadow-card);
}

.checklist-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.checklist-row .status-icon {
  width: 20px;
  margin-top: 2px;
}

.check-body strong {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
}

.check-body p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.timeline-detailed-card {
  background-color: var(--card-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 16px 16px 24px;
  box-shadow: var(--shadow-card);
}

.detail-timeline-item {
  position: relative;
  padding-left: 18px;
  padding-bottom: 18px;
}

.detail-timeline-item:last-child {
  padding-bottom: 0;
}

.detail-timeline-item .date {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-blue);
  display: block;
  margin-bottom: 4px;
}

.detail-timeline-item .line {
  position: absolute;
  left: -12px;
  top: 15px;
  bottom: 0;
  width: 2px;
  background-color: var(--border-color);
}

.detail-timeline-item:last-child .line {
  display: none;
}

.detail-timeline-item::before {
  content: '';
  position: absolute;
  left: -17px;
  top: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--primary-blue);
  border: 2px solid var(--card-white);
}

.detail-timeline-item .info strong {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
  display: block;
}

.detail-timeline-item .info p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

.actions-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

/* ================= BOUNDARY NAVIGATION HUDS ================= */

/* Floats the Boundary Walk header over the full-bleed map instead of taking its own
   layout row, so the HUD map fills the entire screen behind it. */
.overlay-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0));
  border-bottom: none;
}

.overlay-header .sub-page-title,
.overlay-header .icon-button {
  color: white;
}

.overlay-header .icon-button {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.gps-lock-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--light-green);
  background-color: rgba(102, 187, 106, 0.18);
  padding: 6px 10px;
  border-radius: 20px;
}

.navigation-hud-container {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hud-mini-map {
  flex: 1;
  width: 100%;
}

.hud-glass-overlay {
  position: absolute;
  top: 90px;
  left: 12px; right: 12px;
  background-color: rgba(15, 23, 42, 0.82);
  color: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-hud);
  backdrop-filter: blur(10px);
  z-index: 400;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.hud-center-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.distance-ticker-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.distance-number {
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 48px;
  color: var(--light-green);
  line-height: 1;
}

.distance-unit {
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.direction-pointer-lbl {
  font-size: 12px;
  font-weight: 500;
  color: #94A3B8;
}

.hud-accuracy-box {
  display: flex;
  justify-content: space-around;
  margin-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  font-size: 12px;
}

.accuracy-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.accuracy-item i {
  width: 16px;
  color: var(--light-green);
}

.accuracy-divider {
  width: 1px;
  background-color: rgba(255, 255, 255, 0.1);
}

.hud-bottom-controls {
  position: absolute;
  bottom: 24px;
  left: 12px; right: 12px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.waypoint-indicator {
  background-color: rgba(15, 23, 42, 0.85);
  border-radius: 30px;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wp-bubble {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  color: #94A3B8;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wp-bubble.active {
  background-color: var(--primary-green);
  color: white;
}

.wp-bubble.current {
  background-color: var(--primary-blue);
  color: white;
  box-shadow: 0 0 10px var(--primary-blue);
}

.wp-line {
  flex: 1;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.15);
  margin: 0 6px;
}

.wp-line.active {
  background-color: var(--primary-green);
}

.hud-btn-row {
  display: flex;
  gap: 10px;
}

/* ================= ENCROACHMENT COMPARATIVE SLIDER ================= */
.slider-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* Responsive — replaces fixed 230px height */
  min-height: 180px;
  max-height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
  user-select: none;
  touch-action: none; /* Prevents scroll interference during drag */
}

.image-container-before,
.image-container-after {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}

.slider-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-container-after {
  width: 100%;
  overflow: hidden;
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
  border-right: none;
}

/* Label badges */
.slider-label {
  position: absolute;
  bottom: 12px;
  background-color: rgba(15, 23, 42, 0.85);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(5px);
  white-space: nowrap;
}

.before-lbl {
  right: 12px;
}

.after-lbl {
  left: 12px;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background-color: white;
  transform: translateX(180px); /* default middle positions */
  cursor: ew-resize;
  z-index: 50;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-arrow-left,
.slider-arrow-right {
  width: 0;
  height: 0;
  border-style: solid;
  position: absolute;
}

.slider-line {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-line::before {
  content: '↔';
  color: var(--text-primary);
  font-weight: 700;
  font-size: 18px;
}

.slider-alert-summary-card {
  background-color: var(--card-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  margin-top: 15px;
}

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

.danger-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.danger-title-wrap h3 {
  font-family: var(--font-headings);
  font-size: 15px;
  font-weight: 700;
  color: var(--danger-red);
}

.danger-badge {
  background-color: var(--danger-red);
  color: white;
}

.alert-desc {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.4;
}

.alert-metadata {
  margin-top: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.monitoring-timeline-card {
  background-color: var(--card-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  box-shadow: var(--shadow-card);
}

.mon-log-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

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

.mon-log-row.highlight {
  background-color: rgba(211, 47, 47, 0.02);
}

.log-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.log-left i {
  width: 14px;
  margin-top: 3px;
}

.log-left strong {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
}

.log-left p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
}

/* ================= LAND SECURITY REPORT DETAIL ================= */
.security-score-hero-card {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-premium);
  margin-bottom: 15px;
}

.report-org {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--light-green);
  font-weight: 700;
}

.report-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 15px 0;
}

.score-lg {
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 56px;
  color: white;
  line-height: 1;
}

.score-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 6px;
}

.security-score-hero-card h3 {
  font-family: var(--font-headings);
  font-size: 16px;
  font-weight: 700;
}

.security-score-hero-card p {
  font-size: 12px;
  color: #94A3B8;
  margin-top: 2px;
}

.report-date-uid {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  margin-top: 15px;
  font-size: 11px;
  color: #64748B;
}

.checklist-detailed-card {
  background-color: var(--card-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  box-shadow: var(--shadow-card);
}

.check-item-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

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

.check-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-title i {
  width: 18px;
  color: var(--primary-green);
}

.check-title h4 {
  font-family: var(--font-headings);
  font-size: 13px;
  font-weight: 700;
}

.check-item-row .badge {
  position: absolute;
  top: 10px; right: 0;
}

.check-comment {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
  padding-left: 26px;
  line-height: 1.4;
}

.observations-card {
  background-color: var(--card-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.obs-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.obs-item i {
  width: 18px;
}

.obs-item strong {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
}

.obs-item p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

/* ================= VERIFY BEFORE YOU BUY ================= */
.verify-intro-card {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: white;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-premium);
  margin-bottom: 18px;
}

.verify-intro-card i {
  width: 22px;
  flex-shrink: 0;
  color: var(--light-green);
  margin-top: 2px;
}

.verify-intro-card strong {
  display: block;
  font-family: var(--font-headings);
  font-size: 14px;
  margin-bottom: 4px;
}

.verify-intro-card p {
  font-size: 12px;
  color: #94A3B8;
  line-height: 1.5;
}

.verify-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--card-white);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-subtle);
  border-radius: 30px;
  height: 48px;
  padding: 0 6px 0 16px;
  margin-bottom: 12px;
}

.verify-search-wrap input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
}

.verify-search-wrap .btn {
  height: 38px;
  padding: 0 18px;
  min-height: auto;
}

/* Search chips reused from the map screen, adapted for a light card background */
.search-chips-row.light-chips {
  margin-bottom: 20px;
}

.light-chips .search-chip {
  background-color: var(--bg-light);
  box-shadow: none;
}

.light-chips .search-chip:hover {
  background-color: var(--card-white);
}

.verify-match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.verify-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background-color: var(--card-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
}

.verify-match-row strong {
  font-size: 13px;
  color: var(--text-primary);
}

.verify-match-row p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.verify-match-row i {
  width: 18px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* ================= REPORTS TAB LIST ================= */
.reports-search-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  background-color: var(--card-white);
  border-radius: var(--radius-md);
  padding: 0 12px;
  height: 42px;
  box-shadow: var(--shadow-subtle);
  margin-bottom: 15px;
}

.reports-search-wrap input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 13px;
  color: var(--text-primary);
  margin-left: 8px;
}

.reports-search-wrap .search-ico {
  width: 16px;
  color: var(--text-secondary);
}

.report-doc-card {
  background-color: var(--card-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}

.report-doc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-premium);
  border-color: var(--primary-blue);
}

.doc-left {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex: 1;
}

.doc-icon-wrap {
  background-color: rgba(25, 118, 210, 0.05);
  padding: 8px;
  border-radius: var(--radius-sm);
}

.doc-icon-wrap i {
  width: 20px;
}

.doc-info h4 {
  font-family: var(--font-headings);
  font-size: 13px;
  font-weight: 700;
}

.doc-info p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.doc-meta {
  font-size: 10px;
  color: #94A3B8;
  display: block;
  margin-top: 4px;
}

.doc-actions-row {
  display: flex;
  gap: 6px;
}

.doc-action-btn {
  width: 40px; /* Raised from 32px to meet 44dp minimum touch target */
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--card-white);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.doc-action-btn:hover {
  background-color: var(--bg-light);
  color: var(--text-primary);
  border-color: var(--primary-blue);
}

.gov-records-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gov-sync-card {
  background-color: var(--card-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-subtle);
}

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

.sync-left i {
  width: 16px;
}

.sync-left strong {
  display: block;
  font-size: 12px;
  color: var(--text-primary);
}

.sync-left p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.sync-status {
  font-size: 11px;
  font-weight: 600;
}
.text-success { color: var(--primary-green); }

/* ================= LEGAL SERVICES ================= */
.legal-hero-banner {
  background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
  border-radius: var(--radius-lg);
  padding: 20px;
  color: white;
  box-shadow: var(--shadow-premium);
  margin-bottom: 15px;
}

.banner-content h3 {
  font-family: var(--font-headings);
  font-size: 16px;
  font-weight: 700;
}

.banner-content p {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 4px;
  line-height: 1.4;
}

.expert-filters-pills {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.filter-pill {
  flex: 1;
  background-color: var(--card-white);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-subtle);
}

.filter-pill.active {
  background-color: var(--primary-green);
  color: white;
  border-color: var(--primary-green);
}

.experts-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 20px;
}

.expert-card {
  background-color: var(--card-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

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

.expert-avatar {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.name-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.expert-info h4 {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 14px;
}

.verified-lbl-check {
  font-size: 10px;
  font-weight: 600;
  color: var(--primary-green);
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}

.verified-lbl-check i {
  width: 12px;
}

.expert-role {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.star-filled {
  width: 12px;
  height: 12px;
  color: #F59E0B;
  fill: #F59E0B;
}

.expert-meta-grid {
  display: flex;
  flex-direction: column; /* Changed from 3-col grid to vertical list — prevents text clipping */
  gap: 6px;
  margin: 12px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  font-size: 12px;
}

.expert-meta-grid span {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  line-height: 1.4;
  color: var(--text-secondary);
}

.expert-meta-grid span strong {
  color: var(--text-primary);
}

.expert-actions {
  display: flex;
  gap: 8px;
}

/* ================= PROFILE PAGE ================= */
.profile-header-card {
  background-color: var(--card-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
  margin-bottom: 15px;
}

.profile-avatar-initials {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary-green);
  color: white;
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px auto;
  box-shadow: 0 4px 10px rgba(46,125,50,0.25);
}

.profile-header-card h3 {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 17px;
}

.profile-header-card p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.profile-meta-chips {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.chip-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chip-badge i {
  width: 12px;
}

.profile-menu-section {
  background-color: var(--card-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.profile-menu-item {
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-primary);
  transition: background-color var(--transition-fast);
}

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

.profile-menu-item:hover {
  background-color: var(--bg-light);
}

.menu-lbl-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.menu-lbl-wrap i {
  width: 16px;
  color: var(--text-secondary);
}

.menu-value-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  color: white;
}

.switch-item {
  cursor: default;
}

.switch-item:hover {
  background-color: transparent;
}

.profile-select-dropdown {
  border: 1px solid var(--border-color);
  background-color: var(--card-white);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  outline: none;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}

.border-danger {
  border-color: var(--danger-red);
}

/* ================= FLOATING AI ASSISTANT LAYOUTS ================= */
.ai-assistant-wrapper {
  position: absolute;
  bottom: 100px; /* Raised 4px more to clear the 64px nav bar + 12px offset + 24px gap */
  right: 16px;
  z-index: 500;
}

.ai-fab-toggle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-green) 0%, #1b5e20 100%);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-bounce);
}

.ai-fab-toggle:hover {
  transform: scale(1.08);
}

.fab-pulse {
  animation: pulse-light 2s infinite;
}

@keyframes pulse-light {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.ai-chat-drawer {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: min(320px, calc(100vw - 48px)); /* Constrained so drawer never overflows phone edge */
  height: clamp(300px, 50vh, 420px); /* Responsive height */
  background-color: var(--card-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-premium);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 510;
  animation: chatPopUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-chat-drawer.open {
  display: flex;
}

@keyframes chatPopUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chat-drawer-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header-title h3 {
  font-family: var(--font-headings);
  font-size: 13px;
  font-weight: 700;
}

.chat-header-title .active-badge {
  font-size: 10px;
  color: var(--primary-green);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-header-title .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--primary-green);
}

.chat-logs-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none;
}

.chat-logs-container::-webkit-scrollbar {
  display: none;
}

.chat-bubble {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  line-height: 1.45;
  max-width: 85%;
  word-wrap: break-word;
}

.ai-msg {
  background-color: var(--bg-light);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  border: 1px solid var(--border-color);
}

.user-msg {
  background-color: var(--primary-green);
  color: white;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.chat-suggestions-area {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px;
  border-top: 1px solid var(--border-color);
  scrollbar-width: none;
  white-space: nowrap;
}

.chat-suggestions-area::-webkit-scrollbar {
  display: none;
}

.chat-suggestion-chip {
  background-color: var(--bg-light);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-size: 10px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.chat-suggestion-chip:hover {
  background-color: var(--border-color);
}

.chat-input-row {
  padding: 8px 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
  background-color: var(--card-white);
}

.chat-input-row input {
  flex: 1;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 0 12px;
  outline: none;
  font-size: 12px;
  color: var(--text-primary);
  background-color: var(--bg-light);
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background-color: var(--primary-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ================= NATIVE DIALOG MODALS ================= */
.booking-dialog {
  border: none;
  background-color: transparent;
  outline: none;
  width: 100%;
  max-width: 410px; /* fit phone screen exactly */
  margin: auto;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  align-items: flex-end; /* pop up from bottom */
  z-index: 1000;
}

/* Base state - closed */
.booking-dialog {
  display: none;
  opacity: 0;
  transform: translateY(100px);
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-behavior: allow-discrete;
}

.booking-dialog[open] {
  display: flex;
  opacity: 1;
  transform: translateY(0);

  @starting-style {
    opacity: 0;
    transform: translateY(100px);
  }
}

.booking-dialog::backdrop {
  background-color: rgba(15, 23, 42, 0);
  transition: display 0.3s allow-discrete, overlay 0.3s allow-discrete, background-color 0.3s ease-out;
}

.booking-dialog[open]::backdrop {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);

  @starting-style {
    background-color: rgba(15, 23, 42, 0);
  }
}

.dialog-box-wrap {
  width: 100%;
  background-color: var(--card-white);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  box-shadow: 0 -15px 40px rgba(0,0,0,0.2);
  padding: 20px 20px 30px 20px;
  border-top: 1px solid var(--border-color);
}

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

.dialog-header h3 {
  font-family: var(--font-headings);
  font-size: 16px;
  font-weight: 700;
}

.dialog-body {
  display: flex;
  flex-direction: column;
}

.selected-expert-summary-card {
  background-color: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.expert-badge-lbl {
  font-size: 11px;
  color: var(--text-secondary);
}

.expert-cost-fee {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-green);
  margin-top: 2px;
}

.form-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.form-input {
  width: 100%;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-light);
  color: var(--text-primary);
  padding: 0 12px;
  outline: none;
  font-family: var(--font-body);
  font-size: 13px;
  margin-bottom: 14px;
  display: block;
}

textarea.form-input {
  height: auto;
  padding: 8px 12px;
}

/* Notification dialog extra styles */
.scrollable-y {
  overflow-y: auto;
  scrollbar-width: none; /* Hide native scrollbar on desktop */
  -webkit-overflow-scrolling: touch;
}

.scrollable-y::-webkit-scrollbar {
  display: none;
}

.max-h-400 {
  max-height: 380px;
}
.notification-list-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notif-item {
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  position: relative;
  transition: all var(--transition-fast);
}

.notif-item.clickable {
  cursor: pointer;
}
.notif-item.clickable:hover {
  border-color: var(--primary-green);
}

.notif-item.unread {
  background-color: rgba(46, 125, 50, 0.03);
  border-color: rgba(46, 125, 50, 0.2);
}

.notif-bullet {
  position: absolute;
  top: 12px; left: 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background-color: var(--primary-green);
}

.notif-content {
  padding-left: 6px;
}

.notif-content strong {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
}

.notif-content p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

.notif-content .time {
  display: block;
  font-size: 10px;
  color: #94A3B8;
  margin-top: 4px;
}

/* ================= COMPACT DESKTOP SIDEBAR REMOVAL IN MOBILE ================= */
@media screen and (max-width: 820px) {
  .web-frame-container {
    padding: 0;
    gap: 0;
  }
  
  .web-sidebar {
    display: none; /* Hide desktop description sidebar */
  }
  
  .phone-mockup {
    width: 100vw;
    height: 100vh;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  
  .phone-notch {
    display: none; /* Hide hardware bezels on native mobile viewports */
  }
  
  .phone-status-bar {
    /* Real devices already show their own clock/signal/battery — this fake
       status bar row would just duplicate (and conflict with) it, so on an
       actual mobile viewport we keep only the safe-area spacer, not the content. */
    height: env(safe-area-inset-top, 0);
    padding: 0;
    background-color: var(--bg-light);
  }

  .phone-status-bar .phone-time,
  .phone-status-bar .phone-icons {
    display: none;
  }
  
  .phone-home-indicator {
    display: none;
  }

  .phone-nav-bar {
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    height: calc(68px + env(safe-area-inset-bottom, 0));
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  /* Raise screen content padding for safe area */
  .screen-content {
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0));
  }

  /* Safe area for screen header on real mobile */
  .screen-header {
    padding-top: max(15px, env(safe-area-inset-top, 15px));
  }

  /* Map search accounts for dynamic status bar height */
  .map-search-container {
    top: calc(env(safe-area-inset-top, 0) + 16px);
  }

  .ai-assistant-wrapper {
    bottom: calc(88px + env(safe-area-inset-bottom, 0));
    right: 15px;
  }

  .booking-dialog {
    max-width: 100%;
  }

  /* AI chat drawer full-width friendly on small phones */
  .ai-chat-drawer {
    width: calc(100vw - 32px);
    right: 0;
  }

  /* Slider wrapper use fixed height on mobile for consistency */
  .slider-wrapper {
    aspect-ratio: auto;
    height: 220px;
  }
}

/* Support for prefers-reduced-motion standard */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01s !important;
    scroll-behavior: auto !important;
  }
  
  .ai-chat-drawer {
    animation: none;
  }

  .booking-dialog {
    transform: none;
    transition-duration: 0.1s;
  }
  
  @starting-style {
    .booking-dialog[open] {
      transform: none;
    }
  }
}

/* =========================================================
   REFACTORED SKELETON SCREENS, PERFORMANCE & ACCESSIBILITY
   ========================================================= */

/* Hardware accelerated layouts layering (will-change optimization) */
/* NOTE: transform: translateZ(0) intentionally REMOVED from .app-screen — 
   applying transform to a screen creates a new stacking context that breaks
   position:fixed children (dialogs, toasts, AI drawer). Only transitioning 
   elements should get will-change. */
.ai-chat-drawer,
.bottom-map-survey-card,
.map-layers-panel {
  will-change: transform;
}

.app-screen {
  will-change: opacity;
}

/* Skeleton Loading Shimmer design style */
.skeleton-card {
  pointer-events: none;
  background-color: var(--card-white) !important;
  border-color: var(--border-color) !important;
}

.skeleton-shimmer {
  /* Use CSS variables for dark mode compatibility */
  background: linear-gradient(
    90deg,
    var(--skeleton-base, rgba(226, 232, 240, 0.5)) 25%,
    var(--skeleton-highlight, rgba(203, 213, 225, 0.8)) 50%,
    var(--skeleton-base, rgba(226, 232, 240, 0.5)) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* Dark mode skeleton colors */
body.dark-theme {
  --skeleton-base: rgba(51, 65, 85, 0.6);
  --skeleton-highlight: rgba(71, 85, 105, 0.8);
}

.doc-icon-shim,
.doc-text-shim,
.avatar-shim,
.text-line-shim,
.button-shim {
  background: var(--skeleton-base, #E2E8F0);
}

@keyframes skeleton-shimmer-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Specific Shimmer Layout grids */
.header-shim {
  height: 14px;
  width: 40%;
  margin-bottom: 12px;
}

.title-shim {
  height: 18px;
  width: 75%;
  margin-bottom: 8px;
}

.desc-shim {
  height: 12px;
  width: 90%;
  margin-bottom: 14px;
}

.footer-shim {
  height: 10px;
  width: 30%;
}

.doc-icon-shim {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.doc-text-shim {
  flex: 1;
  height: 40px;
  border-radius: var(--radius-sm);
  margin-left: 12px;
}

.avatar-shim {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.text-line-shim {
  height: 30px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.button-shim {
  height: 36px;
  border-radius: var(--radius-sm);
}

/* Pull to Refresh layout simulation */
.pull-refresh-indicator {
  transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pull-refresh-indicator .spinner {
  width: 14px;
  height: 14px;
  animation: spin-spin 1s linear infinite;
  display: inline-block;
  margin-right: 6px;
}

.pull-refresh-indicator.loading .spinner {
  animation: spin-spin 0.6s linear infinite;
}

@keyframes spin-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Accessibility: Large Touch Targets & Outlines */
.phone-nav-bar .nav-tab {
  min-height: 48px;
  min-width: 48px;
  padding: 8px 16px;
}

.quick-actions-grid .action-btn {
  min-height: 48px;
}

/* Ensure focus states for keyboard-only navigation */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2.5px solid var(--primary-green) !important;
  outline-offset: 2px;
}

/* Ripple layout wrap */
.btn-ripple-span {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-growth 0.5s ease-out;
  background-color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

@keyframes ripple-growth {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ================= EMPTY STATES ================= */
.empty-state-card {
  background-color: var(--card-white);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  box-shadow: var(--shadow-subtle);
}

.empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  line-height: 1;
}

.empty-state-card h4 {
  font-family: var(--font-headings);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 240px;
  margin: 0 auto;
}

/* ================= DANGER BG UTILITY ================= */
.danger-bg {
  background-color: var(--danger-red);
}

/* ================= TOAST POSITIONING FIX ================= */
/* Ensure toast container is at document root — not affected by stacking contexts */
#toast-container {
  max-width: 340px;
  width: calc(100vw - 40px);
}

/* Visually hidden — accessible but not visible (for aria-live regions) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
