/* ======================================================================
   SERVICE INFO PLATFORM — DESIGN SYSTEM (LIGHT THEME, BANGLA-FIRST)
   ====================================================================== */

/* ---------- Mobile: prevent horizontal scroll and layout flow ---------- */
html {
  overflow-x: hidden;
  max-width: 100%;
}
.app-viewport {
  overflow-x: hidden;
  max-width: 100%;
  min-width: 0;
}
.app-content {
  min-width: 0;
  max-width: 100%;
}
/* Contain images and media */
img, video {
  max-width: 100%;
  height: auto;
}
img { display: block; }
iframe, embed, object {
  max-width: 100%;
}
/* Long text/URLs wrap instead of overflowing */
pre, code, .app-body, .app-label, .app-card-title, .app-service-name, .app-service-meta,
.app-notice-text, .app-footer-strip, .contact-card .form-control, .noti-content, .noti-title {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}
/* Bootstrap containers inside app: no overflow on small screens */
.app-viewport .container {
  max-width: 100%;
  padding-left: var(--space-page);
  padding-right: var(--space-page);
}
@media (max-width: 767px) {
  .app-viewport .container {
    padding-left: 10px;
    padding-right: 10px;
  }
}
/* Tables: scroll wrapper or shrink on mobile */
.app-viewport table {
  max-width: 100%;
  table-layout: fixed;
}
.app-viewport .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

:root {
  /* Background & surface */
  --app-bg: #f4f6f9;
  --app-surface: #ffffff;
  --app-surface-elevated: #ffffff;

  /* Primary (teal scale) */
  --primary-50: #e6f7f7;
  --primary-100: #b3eeec;
  --primary-500: #0EB7B2;
  --primary-600: #0A9A96;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #64748b;

  /* Border */
  --border: #e2e8f0;

  /* Shadow */
  --shadow-soft: 0 10px 30px rgba(2, 6, 23, 0.06);
  --shadow-header: 0 2px 12px rgba(2, 6, 23, 0.06);

  /* Radius */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  /* Spacing (tighter for less vertical/horizontal whitespace) */
  --space-page: 16px;
  --space-page-lg: 20px;
  --space-section: 20px;
  --space-card: 12px;
  --space-card-lg: 16px;

  /* Header */
  --header-height: 68px;
  --header-bg: #ffffff;
  --header-border: 1px solid var(--border);

  /* Bottom nav */
  --nav-height: 76px;
  --nav-margin: 16px;
  --bar-margin: 8px; /* shared left/right spacing for header + bottom nav (minimal, matching) */
  --nav-radius: 24px;
  --nav-shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Motion */
  --motion-fast: 120ms;
  --motion-normal: 180ms;
  --motion-slow: 220ms;
}

/* Typography — Bangla-first */
body {
  font-family: "Noto Sans Bengali", "Noto Sans", system-ui, sans-serif;
  background: var(--app-bg);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

.app-meta { font-size: 12px; color: var(--text-secondary); line-height: 1.45; }
.app-label { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.app-body { font-size: 16px; color: var(--text-primary); line-height: 1.55; }
.app-card-title { font-size: 18px; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
.app-section-title { font-size: 20px; font-weight: 600; color: var(--text-primary); line-height: 1.35; }
@media (min-width: 480px) {
  .app-section-title { font-size: 22px; }
}

/* ========== APP LAYOUT ========== */
.app-viewport {
  min-height: 100vh;
  position: relative;
  padding-top: calc(var(--header-height) + var(--bar-margin) * 2 + env(safe-area-inset-top, 0px));
  padding-bottom: calc(var(--nav-height) + var(--nav-margin) * 2 + 56px + var(--safe-bottom));
}
.app-content {
  padding-left: var(--space-page);
  padding-right: var(--space-page);
}
@media (min-width: 480px) {
  .app-content { padding-left: var(--space-page-lg); padding-right: var(--space-page-lg); }
}
@media (min-width: 768px) {
  .app-content { padding-left: var(--space-page); padding-right: var(--space-page); }
}
@media (max-width: 767px) {
  .app-content { padding-left: 10px; padding-right: 10px; }
}

/* ========== APP HEADER (match bottom nav: same width + same left/right spacing) ========== */
.app-header {
  height: var(--header-height);
  min-height: var(--header-height);
  background: var(--header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  position: fixed;
  top: calc(var(--bar-margin) + env(safe-area-inset-top, 0px));
  left: var(--bar-margin);
  right: var(--bar-margin);
  width: calc(100% - var(--bar-margin) * 2);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  z-index: 1000;
  border-radius: var(--nav-radius);
  box-shadow: var(--nav-shadow);
  border: 1px solid var(--border);
  transition: box-shadow var(--motion-normal) ease;
}
.app-header.scrolled { box-shadow: var(--shadow-header); }
@media (min-width: 769px) {
  .app-header {
    left: 50%;
    right: auto;
    width: 428px;
    max-width: 428px;
    margin-left: -214px;
  }
}

.app-header-left,
.app-header-right {
  display: flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
}
.app-header-left { justify-content: flex-start; }
.app-header-right { justify-content: flex-end; }

.app-header-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--motion-fast) ease, background var(--motion-fast) ease;
  -webkit-tap-highlight-color: transparent;
}
.app-header-btn:active { transform: scale(0.96); }
.app-header-btn:hover { background: var(--app-bg); }

.app-header-title {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.app-header-title img { height: 28px; max-width: 140px; object-fit: contain; }

.notification-wrap { position: relative; }
.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--header-bg);
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.1); }
}

/* ========== FLOATING BOTTOM NAV ========== */
.app-bottom-nav-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 var(--bar-margin) calc(var(--nav-margin) + var(--safe-bottom));
  z-index: 1000;
  pointer-events: none;
}
.app-bottom-nav {
  pointer-events: auto;
  height: var(--nav-height);
  max-width: 480px;
  margin: 0 auto;
  background: var(--app-surface);
  border-radius: var(--nav-radius);
  box-shadow: var(--nav-shadow);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
}

.app-nav-item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  transition: color var(--motion-fast) ease, transform var(--motion-fast) ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 56px;
}
.app-nav-item i, .app-nav-item svg { font-size: 22px; }
.app-nav-item:active { transform: scale(0.96); }
.app-nav-item.active { color: var(--primary-500); }
.app-nav-item.active .app-nav-dot { opacity: 1; }
.app-nav-dot {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 2px;
  background: var(--primary-500);
  opacity: 0;
  transition: opacity var(--motion-fast) ease;
}

.app-nav-center-wrap {
  position: relative;
  flex: 0 0 auto;
  margin-top: -28px;
}
.app-nav-center-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-500);
  color: #fff;
  border: 4px solid var(--app-bg);
  box-shadow: 0 4px 16px rgba(14, 183, 178, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
  -webkit-tap-highlight-color: transparent;
  animation: nav-center-idle 3s ease-in-out infinite;
}
.app-nav-center-btn i, .app-nav-center-btn svg { font-size: 24px; }
.app-nav-center-btn:active { transform: scale(0.92); }
@keyframes nav-center-idle {
  0%, 100% { box-shadow: 0 4px 16px rgba(14, 183, 178, 0.4); }
  50% { box-shadow: 0 6px 20px rgba(14, 183, 178, 0.35); }
}

/* Footer copyright strip above nav */
/* Footer copyright: floating pill above bottom nav (matches nav style), centered */
.app-footer-strip {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--nav-margin) * 2 + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - var(--bar-margin) * 2);
  max-width: 480px;
  padding: 10px 16px;
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
  z-index: 999;
  background: var(--app-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  box-sizing: border-box;
}
.app-footer-strip a {
  color: var(--primary-500);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}
.app-footer-strip a:hover { color: var(--primary-600); }
.app-footer-strip .app-footer-sep {
  color: var(--border);
  font-weight: 300;
  user-select: none;
}

/* ========== HERO BANNER ========== */
.app-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  margin: 0 calc(-1 * var(--space-page) + 10px);
  margin-bottom: var(--space-section);
}
.app-hero img { width: 100%; height: 160px; object-fit: cover; display: block; }
.app-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-card);
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}

/* ========== SEARCH FIELD ========== */
.app-search-wrap {
  position: sticky;
  top: var(--header-height);
  z-index: 100;
  background: var(--app-bg);
  padding: 8px 0;
  margin: 0 calc(-1 * var(--space-page));
  padding-left: var(--space-page);
  padding-right: var(--space-page);
}
@media (max-width: 767px) {
  .app-search-wrap { margin: 0 -10px; padding-left: 10px; padding-right: 10px; padding-top: 6px; padding-bottom: 6px; }
}
.app-search-inner {
  display: flex;
  align-items: center;
  background: var(--app-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  gap: 8px;
}
@media (max-width: 767px) {
  .app-search-inner { padding: 8px 10px; }
}
.app-search-inner:focus-within { border-color: var(--primary-500); box-shadow: 0 0 0 3px var(--primary-50); }
.app-search-inner i { color: var(--text-secondary); font-size: 18px; flex-shrink: 0; }
.app-search-inner input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text-primary);
  background: transparent;
}
.app-search-inner input::placeholder { color: var(--text-secondary); }
.app-search-clear {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--motion-fast), color var(--motion-fast);
}
.app-search-clear:active { transform: scale(0.96); }

/* ========== NOTICE STRIP ========== */
.app-notice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--app-surface);
  border-radius: var(--radius-md);
  padding: 12px var(--space-card);
  margin-bottom: var(--space-section);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
.app-notice-card:active { transform: scale(0.99); }
.app-notice-chip {
  flex-shrink: 0;
  background: var(--primary-500);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}
.app-notice-text {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Notice marquee: scrolling text */
.app-notice-marquee .app-notice-marquee-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
}
.app-notice-marquee .app-notice-marquee-wrap::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  background: linear-gradient(to left, var(--app-surface), transparent);
  pointer-events: none;
  z-index: 1;
}
.app-notice-marquee .app-notice-marquee-content {
  display: inline-block;
  white-space: nowrap;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.45;
  padding-right: 40px;
  animation: app-notice-scroll 35s linear infinite;
}
.app-notice-marquee:hover .app-notice-marquee-content {
  animation-play-state: paused;
}
.app-notice-marquee .app-notice-sep {
  opacity: 0.6;
  margin: 0 6px;
}
.app-notice-marquee .app-notice-arrow {
  flex-shrink: 0;
  color: var(--text-secondary);
}
@keyframes app-notice-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========== CATEGORY CARD ========== */
.app-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: var(--space-section);
}

.app-category-card {
  background: var(--app-surface);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 108px;
}
.app-category-card:active { transform: scale(0.96); }
.app-category-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--primary-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.app-category-icon-wrap img { width: 52px; height: 52px; object-fit: contain; }
.app-category-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  display: block;
}

/* Mobile only: larger icons and text for readability */
@media (max-width: 479px) {
  .app-category-card { min-height: 120px; padding: 12px 10px; }
  .app-category-icon-wrap { width: 72px; height: 72px; margin-bottom: 10px; }
  .app-category-icon-wrap img { width: 60px; height: 60px; }
  .app-category-title { font-size: 17px; }
  #home-view .app-category-card { min-height: 124px; padding: 14px 10px; }
  #home-view .app-category-icon-wrap { margin-bottom: 10px; }
  .app-nav-item { font-size: 13px; }
  .app-nav-item i, .app-nav-item svg { font-size: 24px; }
}

@media (min-width: 480px) {
  .app-category-grid { gap: 8px; }
  .app-category-card { padding: 12px 10px; min-height: 118px; }
  .app-category-icon-wrap { width: 64px; height: 64px; margin-bottom: 8px; }
  .app-category-icon-wrap img { width: 52px; height: 52px; }
  .app-category-title { font-size: 15px; }
}

/* Homepage only: restore original spacing (category/service pages keep tighter spacing) */
#home-view .app-hero {
  margin: 0 calc(-1 * var(--space-page) + 12px);
  margin-top: 12px;
  margin-bottom: 32px;
}
#home-view .app-notice-card {
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 32px;
}
#home-view .app-section {
  margin-bottom: 32px;
}
#home-view .app-category-grid {
  gap: 10px;
  margin-bottom: 32px;
}
#home-view .app-category-card {
  padding: 12px 10px;
  min-height: 118px;
}
#home-view .app-category-icon-wrap {
  margin-bottom: 8px;
}
@media (min-width: 480px) {
  #home-view .app-category-grid { gap: 12px; }
  #home-view .app-category-card { padding: 14px 12px; min-height: 128px; }
  #home-view .app-category-icon-wrap { margin-bottom: 10px; }
}

/* Stagger reveal */
.app-stagger > * {
  opacity: 0;
  animation: stagger-in var(--motion-slow) ease forwards;
}
.app-stagger > *:nth-child(1) { animation-delay: 0ms; }
.app-stagger > *:nth-child(2) { animation-delay: 40ms; }
.app-stagger > *:nth-child(3) { animation-delay: 80ms; }
.app-stagger > *:nth-child(4) { animation-delay: 120ms; }
.app-stagger > *:nth-child(5) { animation-delay: 160ms; }
.app-stagger > *:nth-child(6) { animation-delay: 200ms; }
.app-stagger > *:nth-child(7) { animation-delay: 240ms; }
.app-stagger > *:nth-child(8) { animation-delay: 280ms; }
.app-stagger > *:nth-child(9) { animation-delay: 320ms; }
.app-stagger > *:nth-child(n+10) { animation-delay: 360ms; }
@keyframes stagger-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== SERVICE LIST CARD ========== */
.app-service-card {
  background: var(--app-surface);
  border-radius: var(--radius-md);
  padding: var(--space-card-lg);
  margin-bottom: 8px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
@media (max-width: 767px) {
  .app-service-card { padding: var(--space-card); margin-bottom: 6px; }
}
.app-service-card:active { transform: scale(0.99); }

.app-service-card-inner { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
@media (max-width: 767px) {
  .app-service-card-inner { gap: 10px; margin-bottom: 6px; }
}
.app-service-avatar {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--app-bg);
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .app-service-avatar { width: 56px; height: 56px; border-radius: var(--radius-sm); }
}
.app-service-details { flex: 1; min-width: 0; }
.app-service-name { font-size: 17px; font-weight: 600; color: var(--text-primary); margin: 0 0 4px 0; line-height: 1.35; }
@media (max-width: 767px) {
  .app-service-name { font-size: 15px; }
}
.app-service-subtitle { font-size: 14px; color: var(--text-secondary); margin: 0 0 6px 0; line-height: 1.45; }
.app-service-meta { font-size: 14px; color: var(--text-primary); margin: 0; line-height: 1.5; }
@media (max-width: 767px) {
  .app-service-subtitle, .app-service-meta { font-size: 13px; }
}
.app-service-meta i { color: var(--text-secondary); margin-right: 6px; width: 18px; text-align: center; }
.app-service-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 767px) {
  .app-service-actions { gap: 8px; }
}
.app-btn-call {
  flex: 1;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--primary-500);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--motion-fast) ease, background var(--motion-fast) ease;
}
.app-btn-call:active { transform: scale(0.98); }
.app-btn-call:hover { background: var(--primary-600); color: #fff; }
@media (max-width: 767px) {
  .app-btn-call { padding: 12px 14px; font-size: 13px; min-width: 100px; }
  .app-btn-outline { padding: 10px 12px; font-size: 13px; }
}
.app-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  color: var(--primary-500);
  border: 2px solid var(--primary-500);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--motion-fast) ease, background var(--motion-fast) ease, color var(--motion-fast) ease;
}
.app-btn-outline:active { transform: scale(0.98); }
.app-btn-outline:hover { background: var(--primary-500); color: #fff; }

/* ========== PAGE TOP (BACK + TITLE) ========== */
.app-page-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  margin-bottom: 12px;
}
@media (max-width: 767px) {
  .app-page-top { padding: 6px 0; margin-bottom: 10px; }
}
.app-back-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--app-bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform var(--motion-fast) ease, background var(--motion-fast) ease;
}
.app-back-btn:active { transform: scale(0.96); }
.app-page-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin: 0 0 2px 0; }
.app-breadcrumb { font-size: 12px; color: var(--text-secondary); }
.app-breadcrumb a { color: var(--text-secondary); text-decoration: none; }

/* ========== FLOATING ACTION BUTTON ========== */
.app-fab {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--nav-margin) + 60px + var(--safe-bottom));
  right: var(--space-page);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-500);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 1001;
  text-decoration: none;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
  -webkit-tap-highlight-color: transparent;
}
.app-fab:active { transform: scale(0.92); }
.app-fab:hover { box-shadow: 0 12px 28px rgba(14, 183, 178, 0.25); }

/* Install / PWA FAB */
.app-fab-install {
  bottom: calc(var(--nav-height) + var(--nav-margin) + 60px + var(--safe-bottom));
  animation: fab-pulse 2s ease-in-out infinite;
}
@keyframes fab-pulse {
  0%, 100% { box-shadow: var(--shadow-soft); }
  50% { box-shadow: 0 10px 28px rgba(14, 183, 178, 0.2); }
}

/* ========== SECTION CONTAINER ========== */
.app-section { margin-bottom: var(--space-section); }
.app-section-title-wrap { margin-bottom: 12px; }

/* ========== UTILITIES ========== */
.app-tap-scale:active { transform: scale(0.96); }
.app-no-results {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-secondary);
}
.app-no-results i { font-size: 40px; color: var(--border); margin-bottom: 8px; display: block; }
.service-item.hidden { display: none !important; }

/* Filter pills (services page) */
.app-filter-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; justify-content: center; min-height: 32px; }
@media (max-width: 767px) {
  .app-filter-row { margin-top: 4px; gap: 4px; }
}
.app-filter-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--app-surface);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: background var(--motion-fast), color var(--motion-fast), border-color var(--motion-fast);
}
.app-filter-btn.active { background: var(--primary-500); color: #fff; border-color: var(--primary-500); }

/* Tighter margins for Bootstrap spacing inside app content */
.app-content .mb-3 { margin-bottom: 10px !important; }
.app-content .mb-4 { margin-bottom: 14px !important; }
.app-content .mb-5 { margin-bottom: 18px !important; }
.app-content .py-5 { padding-top: 24px !important; padding-bottom: 24px !important; }

/* ========== CHAT PAGE (matches app layout) ========== */
.app-chat-wrap {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-height) - var(--nav-height) - var(--nav-margin) * 2 - 80px);
  padding-bottom: 140px;
}
.app-chat-container {
  flex: 1;
  padding: var(--space-card);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}
.app-chat-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 1.5;
  word-wrap: break-word;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.app-chat-msg.bot {
  background: var(--app-surface);
  color: var(--text-primary);
  align-self: flex-start;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.app-chat-msg.user {
  background: var(--primary-500);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.app-chat-msg .chat-img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  display: block;
}
.app-chat-copy {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--app-bg);
  transition: background var(--motion-fast), color var(--motion-fast);
}
.app-chat-copy:hover { color: var(--primary-500); }
.app-chat-copy:active { transform: scale(0.98); }

/* Chat input bar: fixed above bottom nav */
.app-chat-footer {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--nav-margin) * 2 + var(--safe-bottom));
  left: 0;
  right: 0;
  background: var(--app-surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(2, 6, 23, 0.06);
  z-index: 100;
  display: flex;
  flex-direction: column;
}
@media (min-width: 769px) {
  .app-chat-footer {
    left: 50%;
    transform: translateX(-50%);
    width: 428px;
    max-width: calc(100% - var(--nav-margin) * 2);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}
.app-chat-suggestions {
  display: flex;
  gap: 8px;
  padding: 10px var(--space-card);
  overflow-x: auto;
  white-space: nowrap;
  background: var(--app-bg);
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.app-chat-toolbar {
  padding: 8px var(--space-card);
  border-bottom: 1px solid var(--border);
  background: var(--app-surface);
}
.app-chat-new-btn {
  background: none;
  border: none;
  color: var(--primary-500);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  font-family: inherit;
  transition: color var(--motion-fast);
}
.app-chat-new-btn:hover { color: var(--primary-600); }
.app-chat-new-btn:active { transform: scale(0.98); }
.app-chat-suggestions::-webkit-scrollbar { display: none; }
.app-chat-chip {
  flex-shrink: 0;
  background: var(--app-surface);
  color: var(--primary-500);
  border: 1px solid var(--primary-500);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--motion-fast), color var(--motion-fast);
}
.app-chat-chip:active { background: var(--primary-500); color: #fff; }
.app-chat-input-row {
  padding: var(--space-card);
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-chat-input-wrap {
  flex: 1;
  background: var(--app-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 6px 12px 6px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}
.app-chat-input-wrap:focus-within {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-50);
}
.app-chat-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 8px;
  outline: none;
  font-size: 15px;
  color: var(--text-primary);
  font-family: inherit;
}
.app-chat-input-wrap input::placeholder { color: var(--text-secondary); }
.app-chat-voice-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--primary-500);
  font-size: 18px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--motion-fast);
  -webkit-tap-highlight-color: transparent;
}
.app-chat-voice-btn:active { transform: scale(0.94); }
.app-chat-voice-btn.voice-active { color: #ef4444; animation: chat-voice-pulse 1s ease-in-out infinite; }
@keyframes chat-voice-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.app-chat-send-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-500);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(14, 183, 178, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--motion-fast), background var(--motion-fast);
  -webkit-tap-highlight-color: transparent;
}
.app-chat-send-btn:active { transform: scale(0.92); }
.app-chat-send-btn:hover { background: var(--primary-600); }

/* Chat modal (new chat confirm) */
.app-chat-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--motion-normal) ease, visibility var(--motion-normal) ease;
  backdrop-filter: blur(4px);
}
.app-chat-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.app-chat-modal-card {
  background: var(--app-surface);
  padding: var(--space-section);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 340px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  transform: scale(0.9);
  transition: transform var(--motion-normal) cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.app-chat-modal-overlay.active .app-chat-modal-card { transform: scale(1); }
.app-chat-modal-icon {
  font-size: 40px;
  color: var(--primary-500);
  margin-bottom: 16px;
}
.app-chat-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.app-chat-modal-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}
.app-chat-modal-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.app-chat-modal-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--motion-fast), transform var(--motion-fast);
  border: none;
  font-family: inherit;
}
.app-chat-modal-btn-cancel {
  background: var(--app-bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.app-chat-modal-btn-cancel:active { transform: scale(0.98); }
.app-chat-modal-btn-confirm {
  background: var(--primary-500);
  color: #fff;
}
.app-chat-modal-btn-confirm:hover { background: var(--primary-600); }
.app-chat-modal-btn-confirm:active { transform: scale(0.98); }

/* PC view: centered column */
@media (min-width: 769px) {
  .app-viewport {
    max-width: 428px;
    margin: 0 auto;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
    background: var(--app-bg);
  }
  .app-bottom-nav-wrap { left: 50%; right: auto; transform: translateX(-50%); width: 428px; max-width: 428px; padding-left: var(--bar-margin); padding-right: var(--bar-margin); }
  .app-footer-strip { width: calc(428px - var(--bar-margin) * 2); }
  .app-header { width: calc(428px - var(--bar-margin) * 2); max-width: none; margin-left: calc(-1 * (428px - var(--bar-margin) * 2) / 2); }
  .app-fab, .app-fab-install { right: calc(50% - 214px + var(--space-page)); }
  .add-service-fab { right: calc(50% - 214px + 20px) !important; }
}
