/* ==========================================================================
   Design System - HmongPR (Romantic Warm Pink Companion Platform)
   Mobile-First, Modern, Friendly, Warm, Non-leery Aesthetic
   ========================================================================== */

:root {
  /* Core Romantic Warm Pink Palette */
  --primary: #FF4B7D;
  --primary-hover: #E6396B;
  --primary-light: #FFE4EC;
  --primary-soft: #FFF0F4;
  --primary-gradient: linear-gradient(135deg, #FF4B7D 0%, #FF6B8B 100%);
  --primary-gradient-subtle: linear-gradient(135deg, #FFF0F4 0%, #FFE4EC 100%);
  --gold-accent: #E8A838;
  --gold-gradient: linear-gradient(135deg, #F5C57A 0%, #E8A838 100%);

  /* Neutrals & Surfaces */
  --bg-app: #FFF8F9;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-glass-dark: rgba(26, 29, 36, 0.75);

  /* Typography Colors */
  --text-main: #1C1E26;
  --text-secondary: #5E6375;
  --text-muted: #959AA9;
  --text-light: #FFFFFF;

  /* Borders & Dividers */
  --border-light: #F2E3E8;
  --border-active: #FFB3C6;

  /* Status Colors */
  --status-online: #10B981;
  --status-offline: #9CA3AF;
  --status-danger: #EF4444;
  --status-warning: #F59E0B;
  --status-info: #3B82F6;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(255, 75, 125, 0.06);
  --shadow-md: 0 8px 24px rgba(255, 75, 125, 0.10);
  --shadow-lg: 0 14px 36px rgba(255, 75, 125, 0.16);
  --shadow-glow: 0 0 20px rgba(255, 75, 125, 0.35);

  /* Layout Dimensions */
  --max-width: 520px;
  --topbar-height: 64px;
  --bottomnav-height: 70px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: 'Prompt', 'Noto Sans Lao', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #F5EBF0;
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* App Container */
#app-root {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-app);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.08);
}

/* Scrollbar Custom */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-active);
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Top App Bar (100% Fixed Pinned Top Header)
   ========================================================================== */
.top-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 500;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
  transition: var(--transition-fast);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: 900;
  font-size: 1.38rem;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, #FF4B7D 0%, #FF2A65 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.18s ease;
}

.brand-logo:active {
  transform: scale(0.96);
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition-fast);
}

.location-pill:hover {
  background: var(--primary-light);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--border-active);
}

.icon-btn .badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-surface);
}

/* Online Provider Switch Pill in Top Bar */
.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

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

.status-pill.offline {
  background: #F3F4F6;
  color: #6B7280;
  border: 1px solid #E5E7EB;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

.status-pill.online .status-dot {
  background: var(--status-online);
  box-shadow: 0 0 8px var(--status-online);
  animation: pulse-dot 1.8s infinite;
}

.status-pill.offline .status-dot {
  background: var(--status-offline);
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==========================================================================
   Bottom Navigation Bar (Mobile-first Glass Bar)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: var(--bottomnav-height);
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  z-index: 40;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  position: relative;
  cursor: pointer;
  border: none;
  background: transparent;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  transition: var(--transition-fast);
}

.nav-item.active {
  color: var(--primary);
  font-weight: 700;
}

.nav-item.active svg {
  stroke: var(--primary);
  transform: translateY(-2px);
}

.nav-item .nav-badge {
  position: absolute;
  top: 3px;
  left: 50%;
  margin-left: 2px;
  background: #FF4B7D;
  color: #FFFFFF;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 0 4px;
  border-radius: var(--radius-full);
  min-width: 17px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(255, 75, 125, 0.4);
  pointer-events: none;
  box-sizing: border-box;
}

/* Main SPA Viewport Container */
#main-viewport {
  flex: 1;
  padding: calc(var(--topbar-height) + 12px) 14px calc(var(--bottomnav-height) + 20px) 14px;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Persistent Permission Gate Overlay (Mandatory Lockout)
   ========================================================================== */
.permission-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(28, 30, 38, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.permission-gate-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px 20px;
  text-align: center;
  animation: slideUp 0.35s ease-out;
}

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

.permission-icon-hero {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: var(--radius-full);
  background: var(--primary-gradient-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: 0 0 24px var(--romantic-glow);
}

.permission-gate-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.permission-gate-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.permission-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  text-align: left;
}

.permission-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  border: 1px solid var(--border-light);
}

.permission-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.permission-item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.permission-item-text .title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.permission-item-text .sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.permission-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.permission-badge.granted {
  background: #DCFCE7;
  color: #16A34A;
}

.permission-badge.pending {
  background: #FEE2E2;
  color: #DC2626;
}

.permission-denied-guide {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
  text-align: left;
  display: none;
}

.permission-denied-guide.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.permission-denied-guide h4 {
  font-size: 0.85rem;
  color: #92400E;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.permission-denied-guide ol {
  font-size: 0.78rem;
  color: #B45309;
  padding-left: 18px;
  line-height: 1.5;
}

/* ==========================================================================
   UI Components & Elements
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  width: 100%;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 75, 125, 0.28);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(255, 75, 125, 0.36);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #FFFFFF;
  border-radius: 9999px;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

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

/* ==========================================================================
   Ultra-Smooth Shimmer Wave Skeleton Loading System
   GPU-Accelerated 60fps Animation, Zero Layout Shift
   ========================================================================== */
.skeleton-box {
  position: relative;
  overflow: hidden;
  background: #EEF2F6;
  border-radius: 8px;
  will-change: transform;
}

.skeleton-box::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 20%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0.4) 80%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmerWave 1.4s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes shimmerWave {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.skeleton-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #F1F5F9;
  animation: skeletonFadeIn 0.2s ease-out;
}

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

.fade-in-content {
  animation: contentFadeIn 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn-secondary:hover {
  background: var(--primary-soft);
  border-color: var(--border-active);
  color: var(--primary);
}

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

.btn-outline-primary:hover {
  background: var(--primary-soft);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.78rem;
  border-radius: var(--radius-full);
  width: auto;
}

/* Form Controls */
.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-family: inherit;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-main);
  transition: var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
  background: #FFF;
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  margin-bottom: 16px;
  transition: var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-active);
}

/* Header Filter Pill Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.radius-pill-group {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.radius-pill {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.radius-pill.active {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(255, 75, 125, 0.25);
}

/* Feed Category Filter Chips */
.category-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-chip {
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1.5px solid var(--border-light);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.category-chip:hover {
  border-color: var(--border-active);
  background: var(--primary-soft);
  color: var(--primary-hover);
}

.category-chip.active {
  background: #FFF0F4;
  color: var(--primary-hover);
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(255, 75, 125, 0.18);
}

/* Discovery Provider Card */
.provider-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 16px;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.provider-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-active);
}

.provider-card-cover {
  height: 140px;
  background: var(--primary-gradient-subtle);
  position: relative;
  overflow: hidden;
}

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

.provider-online-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--status-online);
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.provider-distance-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(28, 30, 38, 0.78);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.provider-card-body {
  padding: 16px;
}

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

.provider-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.provider-rate {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.provider-bio {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.provider-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tag {
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
}

.tag-lak {
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FFEDD5;
  font-weight: 700;
}

.provider-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ==========================================================================
   Chat & Ephemeral Voice Room
   ========================================================================== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-height) - 10px);
  position: relative;
}

.chat-header {
  padding: 10px 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

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

.chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 2px solid var(--primary-light);
  object-fit: cover;
}

.chat-user-details h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.chat-user-details span {
  font-size: 0.72rem;
  color: var(--status-online);
  font-weight: 600;
}

.chat-privacy-banner {
  background: var(--primary-soft);
  border: 1px dashed var(--border-active);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--primary-hover);
  text-align: center;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 80px;
}

.message-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 18px;
  position: relative;
  font-size: 0.88rem;
  line-height: 1.45;
  animation: fadeIn 0.2s ease;
}

.message-bubble.out {
  align-self: flex-end;
  background: var(--primary-gradient);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 3px 12px rgba(255, 75, 125, 0.2);
}

.message-bubble.in {
  align-self: flex-start;
  background: var(--bg-surface);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.message-time {
  font-size: 0.65rem;
  opacity: 0.75;
  margin-top: 4px;
  text-align: right;
}

/* Voice Message Audio Player Bubble */
.voice-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 170px;
}

.voice-play-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: var(--transition-fast);
}

.message-bubble.in .voice-play-btn {
  background: var(--primary);
  color: #fff;
}

.voice-waveform {
  flex: 1;
  height: 20px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.wave-bar {
  flex: 1;
  background: currentColor;
  opacity: 0.5;
  border-radius: var(--radius-full);
  min-height: 4px;
  height: 10px;
  transition: height 0.15s ease;
}

.voice-player.playing .wave-bar {
  animation: wavePulse 0.8s infinite ease-in-out alternate;
}

@keyframes wavePulse {
  0% { height: 4px; }
  100% { height: 18px; }
}

.voice-duration {
  font-size: 0.72rem;
  font-weight: 600;
}

.chat-room-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: fixed;
  inset: 0;
  background: #FFF9FA;
  z-index: 1000;
  overflow: hidden;
}

.chat-input-dock-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: #FFFFFF;
  border-top: 1.5px solid #F1F5F9;
  padding: 10px 12px max(12px, env(safe-area-inset-bottom)) 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.chat-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: #FFF0F4;
  color: #FF4B7D;
  border: 1px solid #FFE4EC;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.chat-action-btn:active {
  transform: scale(0.92);
  background: #FFE4EC;
}

.chat-input-field {
  flex: 1;
  min-width: 0;
  height: 40px;
  border-radius: 9999px;
  padding: 0 16px;
  font-size: 0.92rem;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  color: #1E293B;
  outline: none;
  font-family: inherit;
}

.chat-input-field:focus {
  border-color: #FF4B7D;
  background: #FFFFFF;
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #FF4B7D 0%, #FF6B8B 100%);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(255, 75, 125, 0.35);
}

.chat-send-btn:active {
  transform: scale(0.92);
}


@keyframes pulse-mic {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==========================================================================
   Provider Mode Toggle Card
   ========================================================================== */
.provider-mode-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 22px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.provider-switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--primary-soft);
  border: 1.5px solid var(--border-active);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-top: 14px;
}

.provider-switch-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: left;
}

.provider-switch-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Big Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 30px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #CBD5E1;
  transition: .3s;
  border-radius: 30px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

input:checked + .slider {
  background: var(--status-online);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* ==========================================================================
   Admin Panel Layout & Enhanced Management
   ========================================================================== */
.admin-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.admin-tab-btn {
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.admin-tab-btn.active {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(255, 75, 125, 0.25);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-card .num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 4px;
}

.stat-card .lbl {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* 7-Day Activity Bar Chart Component */
.activity-chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.activity-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.activity-chart-title {
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--text-main);
}

.activity-chart-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.chart-bars-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 140px;
  padding: 10px 4px 0 4px;
  border-bottom: 1.5px solid var(--border-light);
  gap: 6px;
}

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

.chart-bar-value {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.chart-bar {
  width: 100%;
  max-width: 24px;
  border-radius: 6px 6px 0 0;
  background: var(--primary-gradient-subtle);
  border: 1px solid var(--border-active);
  transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-height: 8px;
}

.chart-bar.today {
  background: var(--primary-gradient);
  box-shadow: 0 4px 12px rgba(255, 75, 125, 0.35);
  border-color: transparent;
}

.chart-bar.today + .chart-bar-label {
  color: var(--primary);
  font-weight: 800;
}

.chart-bar-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 8px;
}

/* User & Report Cards in Admin */
.admin-user-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 14px;
  margin-bottom: 10px;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-user-card:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-sm);
}

.admin-report-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid #FECDD3;
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid var(--status-danger);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.admin-report-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.admin-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.report-reason-badge {
  background: #FEE2E2;
  color: #DC2626;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

/* Fullscreen / Drawer Inspection Modal */
.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 17, 23, 0.65);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.admin-modal-content {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

/* Safety Ban Confirmation Dialog Modal */
.confirm-modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid #FECDD3;
  max-width: 420px;
  width: 100%;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

.confirm-icon-danger {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: var(--radius-full);
  background: #FEE2E2;
  color: #DC2626;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.admin-gallery-item {
  height: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.admin-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 400px;
}

.toast {
  background: rgba(28, 30, 38, 0.92);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  text-align: center;
  animation: toastIn 0.3s ease-out;
  pointer-events: auto;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Gender Toggle Segmented Button Style (Left / Right) */
.gender-toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gender-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  background: #F8FAFC;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-fast);
  outline: none;
}

.gender-toggle-btn:hover {
  border-color: var(--border-active);
}

.gender-toggle-btn.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-weight: 750;
  box-shadow: 0 4px 14px rgba(255, 75, 125, 0.2);
}

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

@keyframes scaleIn {
  0% { transform: scale(0.75); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.chat-location-card:active {
  transform: scale(0.97) !important;
}

#chat-text-input {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

#chat-text-input::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

@keyframes splashPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

