/* ==========================================================================
   Sourashtra Matrimony - Global Styling & Design System
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
  /* Colors */
  --primary: #E05A47;
  --primary-hover: #C54736;
  --primary-gradient: linear-gradient(135deg, #E05A47 0%, #C54736 100%);
  --secondary: #E6C79C;
  --secondary-hover: #D5B48B;
  --bg-app: #FAFAF9;
  --bg-card: #FFFFFF;
  --text-main: #1C1917;
  --text-sub: #44403C;
  --text-muted: #78716C;
  --border: #E7E5E4;
  --border-dark: #D6D3D1;
  --border-focus: #E05A47;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --magic-gradient: linear-gradient(135deg, #6366F1 0%, #EC4899 50%, #F43F5E 100%);
  
  /* Fonts */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-tamil: 'Noto Sans Tamil', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Radii */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 16px -8px rgba(0,0,0,0.08);
  
  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  overscroll-behavior-y: contain;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-tap-highlight-color: transparent;
}

/* WebView Native App Ergonomics: Prevent Accidental Text Selection & Callouts */
button,
.btn,
.nav-item,
.app-bottom-nav,
.app-header,
.app-sidebar,
.card,
.profile-card,
.tab-btn,
.chip,
.card-tag,
.tag,
.badge,
.dropdown-item,
.profile-menu-item,
.step-dot,
.unit-btn,
.mode-tab {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

img {
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

input,
textarea,
[contenteditable="true"] {
  user-select: text;
  -webkit-user-select: text;
}

body.lang-ta {
  font-family: var(--font-tamil);
  line-height: 1.45;
  letter-spacing: 0.005em;
  font-size: 0.84rem; /* Scaled down ~18% so Tamil glyphs optically match English Outfit */
}

/* Tamil Typography & Spacing Standardization (Scaled down to prevent double-size appearance) */
body.lang-ta h1 {
  font-size: 1.65rem;
  line-height: 1.3;
  letter-spacing: 0.005em;
}

body.lang-ta h2 {
  font-size: 1.30rem;
  line-height: 1.3;
  letter-spacing: 0.005em;
}

body.lang-ta h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: 0.005em;
}

body.lang-ta h4 {
  font-size: 0.90rem;
  line-height: 1.3;
}

body.lang-ta h5 {
  font-size: 0.82rem;
  line-height: 1.3;
}

body.lang-ta h6 {
  font-size: 0.75rem;
  line-height: 1.3;
}

body.lang-ta p {
  line-height: 1.45;
  font-size: 0.82rem;
}

body.lang-ta .header-title {
  font-size: 1.08rem;
  line-height: 1.45;
  letter-spacing: -0.01em;
  padding: 4px 0 2px 0;
}

body.lang-ta .btn {
  font-size: 0.78rem;
  line-height: 1.25;
}

body.lang-ta .btn-sm {
  font-size: 0.70rem;
  padding: 0.3rem 0.45rem;
  line-height: 1.2;
}

body.lang-ta .form-group label,
body.lang-ta .filter-group label {
  line-height: 1.35;
  margin-bottom: 0.25rem;
  font-size: 0.76rem;
}

body.lang-ta .form-control {
  line-height: 1.35;
  font-size: 0.78rem;
  padding: 0.5rem 0.7rem;
}

body.lang-ta .dropdown-item,
body.lang-ta option {
  font-size: 0.76rem;
}

body.lang-ta .card-name {
  font-size: 0.96rem;
}

body.lang-ta .card-meta,
body.lang-ta .card-meta-row {
  font-size: 0.76rem;
}

body.lang-ta .card-tag,
body.lang-ta .tag {
  line-height: 1.25;
  padding: 0.15rem 0.4rem;
  font-size: 0.64rem;
}

body.lang-ta .recommended-tag {
  font-size: 0.58rem;
  padding: 1px 4px;
}

body.lang-ta .badge {
  line-height: 1.25;
  padding: 0.18rem 0.45rem;
  font-size: 0.65rem;
}

body.lang-ta .card-status-badge {
  font-size: 0.65rem;
  padding: 0.18rem 0.45rem;
}

body.lang-ta .profile-menu-item {
  padding: 0.72rem 0.88rem;
  gap: 0.75rem;
}

body.lang-ta .profile-menu-item .menu-label h4 {
  line-height: 1.3;
  margin-bottom: 0.12rem;
  font-size: 0.78rem;
  font-weight: 600;
}

body.lang-ta .profile-menu-item .menu-label p {
  line-height: 1.32;
  font-size: 0.68rem;
}

body.lang-ta .settings-section-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.75rem 0.25rem;
}

body.lang-ta .tabs-header .tab-btn {
  padding: 0.55rem 0.65rem;
  font-size: 0.74rem;
  line-height: 1.3;
}

body.lang-ta .detail-title-row h2 {
  font-size: 1.35rem;
}

body.lang-ta #detail-profile-job-location {
  font-size: 0.84rem;
}

body.lang-ta .detail-card h3 {
  font-size: 0.98rem;
}

body.lang-ta .detail-card p {
  font-size: 0.80rem;
}

body.lang-ta .detail-table td {
  padding: 0.45rem 0.35rem;
  line-height: 1.35;
  font-size: 0.75rem;
}

body.lang-ta .wizard-field-guide {
  line-height: 1.4;
  font-size: 0.70rem;
}

body.lang-ta .step-title {
  font-size: 1.05rem;
  line-height: 1.3;
}

body.lang-ta .step-subtitle {
  font-size: 0.75rem;
  line-height: 1.35;
}

body.lang-ta .field-hint,
body.lang-ta .field-meta {
  font-size: 0.68rem;
  line-height: 1.35;
}

body.lang-ta .filter-section-title {
  font-size: 0.82rem;
  line-height: 1.35;
  margin-top: 0.85rem;
  margin-bottom: 0.5rem;
}

body.lang-ta .banner-info h3,
body.lang-ta .horo-banner-info h3 {
  font-size: 0.95rem !important;
  line-height: 1.3 !important;
  margin-bottom: 0.2rem;
}

body.lang-ta .banner-info p,
body.lang-ta .horo-banner-info p {
  line-height: 1.4 !important;
  font-size: 0.8rem !important;
}

body.lang-ta .app-bottom-nav .nav-item span {
  font-size: 0.58rem;
  line-height: 1.15;
}

/* Language Selector Styles */
.app-lang-select {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.app-lang-select:hover,
.app-lang-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(224, 90, 71, 0.12);
}

.header-lang-wrapper {
  display: inline-flex;
  align-items: center;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--text-main);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Utility Classes & Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.14s ease, background-color 0.14s ease;
  gap: 0.5rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(224, 90, 71, 0.2);
}

.btn-secondary {
  background-color: #E7E5E4;
  color: var(--text-sub);
}

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

.btn-white {
  background-color: #FFFFFF;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.btn-white:hover {
  background-color: #F5F5F4;
}

.btn-magic {
  background: var(--magic-gradient);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-magic:hover {
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
  transform: translateY(-1px);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-text {
  color: var(--primary);
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}

.btn-text:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.btn-sm {
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  line-height: 1.25;
  border-radius: var(--radius-sm);
  min-height: 38px;
}

.btn-flex {
  flex: 1 1 0%;
  min-width: 0;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.hidden {
  display: none !important;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 0.375rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: #FFFFFF;
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(224, 90, 71, 0.1);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .col {
  flex: 1;
}

/* ==========================================================================
   SPA View Routing Layer
   ========================================================================== */

.view {
  display: none;
  min-height: 100vh;
}

.view.active {
  display: block;
}

/* ==========================================================================
   Welcome / Login Screen
   ========================================================================== */

.welcome-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: 100vh;
}

.welcome-hero-panel {
  position: relative;
  background-image: url('https://images.unsplash.com/photo-1595853035070-59a39fe84de3?w=1000&auto=format&fit=crop'); /* Aesthetic Indian wedding background */
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4rem;
  color: #FFFFFF;
}

.hero-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(28, 25, 23, 0.9) 0%, rgba(28, 25, 23, 0.3) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.welcome-badge {
  display: inline-block;
  background-color: var(--primary);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.welcome-logo {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.1;
  color: #FFFFFF;
}

.welcome-tagline {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
}

.welcome-action-panel {
  background-color: #FFFFFF;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.welcome-form-header {
  margin-bottom: 2.5rem;
}

.welcome-heading {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.welcome-subtext {
  color: var(--text-sub);
  font-size: 1rem;
}

.welcome-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.welcome-footer-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

/* ==========================================================================
   Authentication Screen
   ========================================================================== */

.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background-color: var(--bg-app);
  position: relative;
}

.auth-header-bar {
  width: 100%;
  max-width: 480px;
}

.btn-back {
  position: absolute;
  top: 2rem;
  left: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--text-sub);
  transition: var(--transition);
}

.btn-back:hover {
  color: var(--primary);
  transform: translateX(-3px);
}

.auth-card {
  background-color: #FFFFFF;
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--text-sub);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.auth-forgot-row {
  text-align: right;
  margin-top: -0.25rem;
  margin-bottom: 1.25rem;
}

.auth-forgot-row a {
  font-size: 0.85rem;
  color: var(--primary, #D9381E);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.auth-forgot-row a:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-switch a {
  font-weight: 600;
}

/* ==========================================================================
   Multi-Step Profile Creation Wizard
   ========================================================================== */

.wizard-container {
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 680px;
  width: 90%;
  margin: 3rem auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wizard-header {
  background-color: var(--bg-app);
  padding: 2rem;
  border-bottom: 1px solid var(--border);
}

.wizard-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.wizard-title-bar h2 {
  font-size: 1.35rem;
  font-weight: 700;
  flex: 1;
}

.wizard-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

#wizard-step-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Exit button — subtle outlined style */
.btn-wizard-exit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-wizard-exit:hover {
  border-color: var(--danger);
  color: var(--danger);
  background-color: rgba(239, 68, 68, 0.05);
}

/* Home button — ghost primary style */
.btn-wizard-home {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(224, 90, 71, 0.3);
  color: var(--primary);
  background: rgba(224, 90, 71, 0.05);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-wizard-home:hover {
  background-color: rgba(224, 90, 71, 0.12);
  border-color: var(--primary);
}

.wizard-progress-bar-container {
  height: 6px;
  background-color: var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.wizard-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 10px;
  transition: width 0.3s ease;
}

.wizard-field-guide {
  margin: 0.85rem 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Required field asterisk */
.required-star {
  color: #e53935;
  font-weight: 700;
  margin-left: 2px;
  font-size: 0.95em;
  line-height: 1;
}

/* Recommended optional field tag */
.recommended-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(var(--primary-rgb, 99, 60, 180), 0.08);
  border: 1px solid rgba(var(--primary-rgb, 99, 60, 180), 0.2);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.field-recommended {
  color: var(--primary);
  font-size: 0.8em;
  font-weight: 600;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.4rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.filter-section-title {
  margin: 1.25rem 0 0.7rem;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filters-form .filter-section-title:first-child {
  margin-top: 0;
}

.completeness-breakdown {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.wizard-step-dots {
  display: flex;
  justify-content: flex-start;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}

.wizard-step-dots::-webkit-scrollbar {
  display: none;
}

.step-dot.tab-mode {
  width: auto;
  height: auto;
  border-radius: 20px;
  background-color: var(--border);
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text-muted);
  transition: var(--transition);
}

.step-dot.tab-mode:hover {
  background-color: #e2e8f0;
}

.step-dot.tab-mode.active {
  background-color: var(--primary);
  color: #ffffff;
  transform: scale(1);
}

/* Fallback for regular dots if needed */
.step-dot:not(.tab-mode) {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border);
  transition: var(--transition);
}

.step-dot:not(.tab-mode).active {
  background-color: var(--primary);
  transform: scale(1.2);
}

.wizard-step {
  display: none;
  padding: 2.5rem;
}

.wizard-step.active {
  display: block;
}

.step-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.step-subtitle {
  color: var(--text-sub);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.avatar-selection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.avatar-option {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.avatar-option img {
  border-radius: 50%;
  margin: 0 auto 0.5rem auto;
  width: 60px;
  height: 60px;
  object-fit: cover;
}

.avatar-option span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-sub);
  display: block;
}

.avatar-option.selected {
  border-color: var(--primary);
  background-color: rgba(224, 90, 71, 0.04);
}

.photo-upload-box {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.photo-upload-box:hover {
  border-color: var(--primary);
  background-color: rgba(224, 90, 71, 0.02);
}

.upload-icon {
  color: var(--text-muted);
}

.photo-upload-box:hover .upload-icon {
  color: var(--primary);
}

.upload-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-sub);
}

.private-preferences-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
  border-left: 4px solid #6366F1;
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 2rem;
}

.banner-badge {
  background: var(--magic-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.private-box {
  position: relative;
}

.private-label {
  display: flex !important;
  align-items: center;
  gap: 0.35rem;
  color: #6366F1 !important;
  font-weight: 600 !important;
}

.private-help {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-muted);
}

.wizard-footer {
  padding: 2rem;
  background-color: var(--bg-app);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   Main Application View Shell (App Shell)
   ========================================================================== */

#view-app {
  padding-top: 70px; /* spacing for fixed header */
  min-height: 100vh;
}

/* Top App Header */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s ease, border-color 0.25s ease;
}

.app-header.scrolled {
  box-shadow: 0 4px 16px rgba(28, 25, 23, 0.08);
  border-bottom-color: rgba(231, 229, 228, 0.9);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-symbol {
  font-size: 1.5rem;
}

.header-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 4px 0 2px 0;
  background: var(--magic-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-completeness-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(224, 90, 71, 0.08);
  border: 1px solid rgba(224, 90, 71, 0.2);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-text {
  color: var(--text-sub);
}

.badge-percentage {
  color: var(--primary);
}

.btn-icon-header {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  transition: var(--transition);
}

.btn-icon-header:hover {
  background-color: var(--bg-app);
  color: var(--primary);
}

/* Main Content Dynamic Panels Routing */
.app-main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 70px);
}

.subview {
  display: none;
}

.subview.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

/* ==========================================================================
   Home Sub-view Details
   ========================================================================== */

/* ==========================================================================
   Language Selector Segmented Buttons / Toggle Group
   ========================================================================== */
.lang-toggle-group {
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 2px;
  gap: 2px;
}

.btn-lang-toggle {
  background: transparent;
  border: none;
  color: var(--text-sub);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.2;
  white-space: nowrap;
  font-family: inherit;
}

.btn-lang-toggle:hover {
  color: var(--text-main);
}

.btn-lang-toggle.active {
  background-color: var(--primary);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(224, 90, 71, 0.25);
}

.btn-lang-toggle .lang-full {
  display: inline-block;
}

.btn-lang-toggle .lang-short {
  display: none;
}

body.lang-ta .btn-lang-toggle {
  font-size: 0.76rem;
  padding: 0.22rem 0.6rem;
}

/* ==========================================================================
   Home Sub-view Details (Compact & Sleek for Above-the-Fold Recommendations)
   ========================================================================== */

.home-completeness-mini-bar {
  margin-bottom: 0.85rem;
}

.mini-bar-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(224, 90, 71, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

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

.mini-bar-bolt {
  font-size: 0.95rem;
  margin-right: 0.4rem;
  color: #D97706;
}

.mini-bar-text {
  flex: 1;
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-badge-pill {
  position: absolute;
  top: -4px;
  right: -8px;
  background: #D97706;
  color: #FFFFFF;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  line-height: 1.2;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.4);
}

/* AI Magic Match banner & Flagship Horoscope Hub Banner on Home (Unified Symmetrical Architecture) */
.home-magic-match-banner,
.home-horoscope-banner {
  position: relative;
  border-radius: 18px;
  padding: 1.15rem 1.35rem;
  margin-bottom: 1rem;
  overflow: hidden;
  box-sizing: border-box;
  transition: var(--transition);
}

.home-magic-match-banner {
  background: var(--magic-gradient);
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.22);
}

.home-horoscope-banner {
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.32);
  box-shadow: 0 4px 14px rgba(115, 24, 24, 0.06);
}

.home-horoscope-banner:hover {
  box-shadow: 0 6px 18px rgba(115, 24, 24, 0.1);
  border-color: rgba(212, 175, 55, 0.6);
}

.banner-gradient-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.28) 0%, transparent 65%);
  pointer-events: none;
}

.horo-banner-accent {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #c8892e 0%, #731818 100%);
}

.banner-info,
.horo-banner-info {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
}

.banner-text-content,
.horo-banner-text-content {
  flex: 1;
  min-width: 0;
}

.banner-badge-title,
.horo-banner-badge-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  min-height: 1.6rem;
}

.sparkle-ai {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Symmetrical Titles */
.banner-info h3,
.horo-banner-info h3,
.home-magic-match-banner h3,
.home-horoscope-banner h3 {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  margin-bottom: 0 !important;
  letter-spacing: -0.01em;
}

.banner-info h3,
.home-magic-match-banner h3 {
  color: #FFFFFF !important;
}

.horo-banner-info h3,
.home-horoscope-banner h3 {
  color: #731818 !important;
}

/* Symmetrical Descriptions */
.banner-info p,
.horo-banner-info p,
.home-magic-match-banner p,
.home-horoscope-banner p {
  font-size: 0.82rem !important;
  line-height: 1.45 !important;
  margin-bottom: 0 !important;
}

.banner-info p,
.home-magic-match-banner p {
  color: rgba(255, 255, 255, 0.94) !important;
}

.horo-banner-info p,
.home-horoscope-banner p {
  color: var(--text-sub) !important;
}

/* Symmetrical Action Buttons */
.banner-action-wrapper,
.horo-banner-action-wrapper {
  flex-shrink: 0;
}

.banner-action-wrapper .btn-white,
.horo-banner-action-wrapper .btn-horo {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  padding: 0.5rem 1.15rem !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.banner-action-wrapper .btn-white {
  background: #FFFFFF;
  color: var(--text-main);
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.horo-banner-action-wrapper .btn-horo {
  background: linear-gradient(135deg, #731818 0%, #9e2323 100%);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 2px 8px rgba(115, 24, 24, 0.22);
}

.banner-action-wrapper .btn-white:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.horo-banner-action-wrapper .btn-horo:hover {
  background: linear-gradient(135deg, #5a1212 0%, #831b1b 100%);
  box-shadow: 0 4px 12px rgba(115, 24, 24, 0.3);
  transform: translateY(-1px);
}

.banner-action-wrapper .btn-white:active,
.horo-banner-action-wrapper .btn-horo:active {
  transform: scale(0.96);
}

.home-section {
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.section-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.horizontal-scroll-container {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: thin;
}

.horizontal-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 10px;
}

/* ==========================================================================
   Profile Card Components
   ========================================================================== */

.profile-card {
  background-color: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.06);
  border: 1px solid var(--border);
  transition: transform 0.22s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.22s cubic-bezier(0.2, 0, 0, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}

.profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.12);
}

.profile-card:active {
  transform: scale(0.985);
}

.profile-card.profile-card-last-viewed {
  box-shadow: 0 0 0 2.5px var(--primary, #e11d48), 0 8px 24px rgba(225, 29, 72, 0.22) !important;
  transition: box-shadow 0.4s ease;
}

.card-photo-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: var(--border);
}

.card-photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s cubic-bezier(0.2, 0, 0, 1);
}

.profile-card:hover .card-photo-wrapper img {
  transform: scale(1.03);
}

.card-photo-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 25, 23, 0.72) 0%, rgba(28, 25, 23, 0.22) 38%, transparent 62%);
  pointer-events: none;
}

.card-badges-top {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 2;
  pointer-events: none;
}

.card-status-badge {
  background-color: rgba(16, 185, 129, 0.95);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 50px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  letter-spacing: 0.02em;
  width: fit-content;
}

.badge-viewer-time {
  background-color: rgba(30, 41, 59, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 50px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  letter-spacing: 0.02em;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.card-premium-badge {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 50px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  letter-spacing: 0.02em;
  width: fit-content;
}

.card-sample-badge {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #F8FAFC;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.58rem;
  border-radius: 50px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  letter-spacing: 0.02em;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.profile-detail-sample-banner {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  font-size: 0.8rem;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.card-fav-btn {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  border: none;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, color 0.2s ease;
}

.card-fav-btn:hover {
  background-color: #FFFFFF;
  color: var(--primary);
  transform: scale(1.1);
}

.card-fav-btn:active {
  transform: scale(0.9);
}

.card-fav-btn.active,
.card-fav-btn.shortlisted {
  color: #E05A47;
  background-color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(224, 90, 71, 0.35);
  font-size: 1.25rem;
}

.card-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
  box-sizing: border-box;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 26px;
}

.card-name {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-seeking-tag {
  display: flex;
  align-items: center;
}

.seeking-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(224, 90, 71, 0.08);
  color: var(--primary);
  border: 1px solid rgba(224, 90, 71, 0.25);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  width: 100%;
}

body.lang-ta .seeking-badge {
  font-size: 0.8rem;
}

.card-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 6px;
  row-gap: 3px;
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.35;
  min-height: 20px;
}

.card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

.card-meta-item svg {
  flex-shrink: 0;
  color: var(--primary);
  width: 13px;
  height: 13px;
}

.card-meta-item span,
.card-meta-item .meta-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
}

.card-meta-dot {
  color: var(--border-dark);
  font-size: 0.75rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .card-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    font-size: 0.83rem;
    line-height: 1.35;
  }

  .card-meta-dot {
    display: none !important;
  }

  .card-meta-item {
    width: 100%;
  }
}

.card-meta {
  font-size: 0.82rem;
  color: var(--text-sub);
  margin: 0;
}

.card-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 3px 0 6px 0 !important;
  min-height: auto;
}

.card-tag,
.card-tags .tag {
  background: rgba(230, 199, 156, 0.16);
  color: var(--text-main);
  border: 1px solid rgba(230, 199, 156, 0.38);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  line-height: 1.4;
  letter-spacing: -0.01em;
  display: inline-flex !important;
  align-items: center;
}

.card-tag-community,
.card-tags .card-tag-community {
  background: rgba(224, 90, 71, 0.09) !important;
  color: var(--primary) !important;
  border-color: rgba(224, 90, 71, 0.28) !important;
  font-weight: 600 !important;
}

.card-tag-cnb,
.card-tags .card-tag-cnb,
.detail-quick-tags .card-tag-cnb {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  font-weight: 600 !important;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
  align-items: stretch;
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
}

.card-actions .btn {
  flex: 1 1 0%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 0 0.5rem;
  font-size: 0.80rem;
  font-weight: 600;
  text-align: center;
  justify-content: center;
  align-items: center;
  line-height: 1.2;
  display: inline-flex;
  border-radius: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.15s ease;
}

.card-actions .btn:active {
  transform: scale(0.96);
}

.card-actions .btn-primary {
  background-color: var(--primary) !important;
  background-image: var(--primary-gradient) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(224, 90, 71, 0.28) !important;
}

.card-actions .btn-primary:hover {
  background-color: var(--primary-hover) !important;
  background-image: linear-gradient(135deg, #C54736 0%, #A93B2C 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(224, 90, 71, 0.36) !important;
}

.card-actions .btn-secondary {
  border: 1.5px solid var(--border-dark) !important;
  background: transparent !important;
  color: var(--text-main) !important;
}

.card-actions .btn-secondary:hover {
  background: rgba(28, 25, 23, 0.04) !important;
  border-color: var(--text-sub) !important;
}

body.lang-ta .card-actions .btn {
  font-size: 0.74rem;
  letter-spacing: -0.01em;
  padding: 0 0.35rem;
}

.btn-card-action {
  font-size: 0.85rem;
  padding: 0.6rem;
}

/* Horizontal card size rules */
.horizontal-scroll-container .profile-card {
  width: 310px;
  min-width: 310px;
  flex-shrink: 0;
}

.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* ==========================================================================
   Discover & Search Filtering UI Layout
   ========================================================================== */

.discover-container {
  display: grid;
  grid-template-columns: 255px 1fr;
  gap: 1.5rem;
}

.discover-filter-panel {
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

/* Subtle scrollbars */
.discover-filter-panel::-webkit-scrollbar,
.bottom-sheet-card .sheet-scroll-body::-webkit-scrollbar {
  width: 5px;
}
.discover-filter-panel::-webkit-scrollbar-thumb,
.bottom-sheet-card .sheet-scroll-body::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
.discover-filter-panel::-webkit-scrollbar-track,
.bottom-sheet-card .sheet-scroll-body::-webkit-scrollbar-track {
  background: transparent;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.filter-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.btn-reset-filters {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.btn-reset-filters:hover {
  background-color: rgba(139, 21, 56, 0.08);
  color: var(--primary-dark);
}

/* Section Dividers - Clean & Symmetrical */
.filter-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}

.filter-section-header:first-of-type {
  margin-top: 0.25rem;
}

.filter-section-header .filter-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin: 0;
}

.filter-section-header .filter-section-line {
  flex: 1;
  height: 1px;
  background-color: var(--border-light);
}

/* Filter Groups & Labels */
.filter-group {
  margin-bottom: 1rem;
  width: 100%;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

/* Symmetrical Form Controls with Full Width & No Text Clipping */
.filters-form .form-control {
  width: 100%;
  height: 42px;
  font-size: 0.88rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: #FFFFFF;
  color: var(--text-main);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.filters-form select.form-control {
  cursor: pointer;
  padding-right: 2rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filters-form .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.12);
  outline: none;
}

/* Clean Symmetrical 2-Input Range Row (Age & Height) */
.filter-range-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.filter-range-col {
  flex: 1;
}

.filter-range-col input.form-control {
  text-align: center;
  font-weight: 600;
  padding: 0.5rem;
}

/* Remove number spin buttons */
.filter-range-col input::-webkit-outer-spin-button,
.filter-range-col input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.filter-range-col input[type="number"] {
  -moz-appearance: textfield;
}

.filter-range-dash {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 1rem;
  user-select: none;
}

/* Seeking Badge Card - Full Width & Symmetrical */
.filter-seeking-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 0.6rem 1rem;
  background: rgba(139, 21, 56, 0.04);
  border: 1px solid rgba(139, 21, 56, 0.15);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
}

.filter-seeking-card .seeking-badge {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  white-space: nowrap;
}

/* Shortlisted Only Row */
.filter-shortlist-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 42px;
  padding: 0.65rem 1rem;
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: 0 !important;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.filter-shortlist-row:hover {
  background: #FFFFFF;
  border-color: rgba(139, 21, 56, 0.3);
}

.filter-shortlist-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

.filter-shortlist-row .shortlist-text {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  user-select: none;
}

.btn-apply-filters-desk {
  margin-top: 1.25rem;
  height: 44px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Discover Content Area */
.search-bar-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-input-wrapper {
  flex-grow: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  z-index: 5;
  pointer-events: none;
  width: 18px;
  height: 18px;
}

.search-input-wrapper .form-control.search-input-field,
.search-input-wrapper input.search-input-field,
#discover-search-input,
body.lang-ta .search-input-wrapper .search-input-field,
body.lang-ta #discover-search-input {
  padding-left: 46px !important;
  text-overflow: ellipsis;
}

.btn-mobile-filter {
  display: none;
}

.results-stats-row {
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Interests View Layout
   ========================================================================== */

.interests-container {
  max-width: 1000px;
  margin: 0 auto;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  gap: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.tabs-header::-webkit-scrollbar {
  display: none;
}

.btn-card-interest-sent {
  background-color: var(--bg-app);
  color: var(--text-sub);
  border: 1px solid var(--border);
}

.btn-card-interest-sent:hover {
  background-color: #FEE2E2;
  color: #DC2626;
  border-color: #FCA5A5;
}

.tab-btn {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.75rem 0.25rem;
  position: relative;
  transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.14s ease;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.tab-btn:active {
  transform: scale(0.95);
}

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

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--primary);
  border-radius: 10px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* Interest card modifications */
.interests-grid .profile-card .card-actions {
  flex-direction: row;
}

.interests-grid .profile-card .btn {
  flex: 1 1 0%;
}

.viewer-profile-card .card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.viewer-profile-card .card-actions .btn {
  flex: 1 1 0%;
}

/* ==========================================================================
   Messaging & Chat View
   ========================================================================== */

.messages-layout-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 140px);
  min-height: 520px;
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* Conversations List Left Panel */
.conversations-panel {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.conversations-panel .panel-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.conversations-panel .panel-header h3 {
  font-size: 1.15rem;
}

.conversations-list {
  overflow-y: auto;
  flex-grow: 1;
}

.convo-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--bg-app);
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.convo-item:hover {
  background-color: var(--bg-app);
}

.convo-item.active {
  background-color: rgba(224, 90, 71, 0.03);
  border-left-color: var(--primary);
}

.convo-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--border);
}

.convo-details {
  flex-grow: 1;
  min-width: 0;
}

.convo-name-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.convo-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-badge, .nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--primary);
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.convo-unread-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--primary);
  display: inline-block;
  margin-left: auto;
  flex-shrink: 0;
}

.activity-status-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: #059669;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.notification-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #FFFFFF;
  cursor: pointer;
  transition: var(--transition);
  align-items: flex-start;
}

.notification-item:hover {
  background-color: var(--bg-app);
  border-color: var(--primary);
}

.notification-item.unread {
  background-color: rgba(224, 90, 71, 0.04);
  border-left: 3px solid var(--primary);
}

.btn-clear-single-notif {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0.45;
  transition: all 0.2s ease;
  margin-left: 0.35rem;
  flex-shrink: 0;
  align-self: flex-start;
}

.btn-clear-single-notif:hover {
  opacity: 1;
  color: var(--danger, #ef4444);
  background: rgba(239, 68, 68, 0.08);
}

.convo-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.convo-preview {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chat Main Active Pane Right Panel */
.chat-main-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 3rem;
  text-align: center;
  color: var(--text-muted);
  gap: 1rem;
}

.chat-empty-state h3 {
  font-size: 1.25rem;
  color: var(--text-sub);
}

.chat-active-state {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.chat-header {
  flex-shrink: 0;
  min-height: 64px;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #FFFFFF;
  box-sizing: border-box;
}

.btn-chat-back-mobile {
  display: none;
  margin-right: 0.5rem;
}

.chat-header-profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-header-name {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
}

.chat-header-status {
  font-size: 0.75rem;
  color: var(--success);
}

.chat-header-menu {
  color: var(--text-sub);
}

.chat-message-log {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 1.5rem;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Message Bubbles */
.message-bubble {
  max-width: 65%;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-lg);
  font-size: 0.925rem;
  position: relative;
  word-wrap: break-word;
}

.message-bubble.incoming {
  align-self: flex-start;
  background-color: #FFFFFF;
  color: var(--text-main);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.message-bubble.outgoing {
  align-self: flex-end;
  background-color: var(--primary);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}

.message-time {
  display: block;
  font-size: 0.7rem;
  margin-top: 0.25rem;
  text-align: right;
}

.message-bubble.incoming .message-time {
  color: var(--text-muted);
}

.message-bubble.outgoing .message-time {
  color: rgba(255, 255, 255, 0.7);
}

.chat-input-bar {
  flex-shrink: 0 !important;
  min-height: 72px;
  padding: 0.85rem 1.5rem;
  border-top: 1px solid var(--border);
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-sizing: border-box;
}

.chat-input-field {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  padding: 0.65rem 1.25rem;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background-color: var(--bg-app);
  font-size: 0.95rem;
  color: var(--text-main);
  box-sizing: border-box;
  transition: var(--transition);
}

.chat-input-field:focus {
  border-color: var(--primary);
  background-color: #FFFFFF;
  outline: none;
  box-shadow: 0 0 0 3px rgba(224, 90, 71, 0.12);
}

.btn-chat-send {
  flex-shrink: 0 !important;
  height: 48px;
  min-height: 48px;
  border-radius: 50px;
  padding: 0 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
}

/* ==========================================================================
   My Profile Sub-view Details (Material 3 Grouped Settings & Header)
   ========================================================================== */

.my-profile-container {
  max-width: 620px;
  margin: 0 auto;
  padding: 0.5rem 0.5rem 3rem;
}

/* ─── Modern Profile Header Card ─── */
.my-profile-header-card {
  background-color: #FFFFFF;
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(28, 25, 23, 0.04);
  position: relative;
}

.my-avatar-wrapper,
.my-profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.my-avatar,
.my-profile-avatar-wrap img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--border);
  border: 3px solid #FFFFFF;
  box-shadow: 0 3px 12px rgba(28, 25, 23, 0.12);
  display: block;
}

.my-profile-header-details,
.my-profile-info {
  flex: 1;
  min-width: 0;
}

.my-profile-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.my-profile-header-details h2,
.my-profile-info h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.my-profile-header-details p,
.my-profile-info p {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin: 0;
  line-height: 1.4;
}

.btn-profile-quick-edit {
  padding: 0.48rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid rgba(224, 90, 71, 0.25);
  color: var(--primary);
  background: rgba(224, 90, 71, 0.05);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}

.btn-profile-quick-edit:active {
  transform: scale(0.95);
  background: rgba(224, 90, 71, 0.14);
}

.btn-profile-quick-edit:hover {
  background: rgba(224, 90, 71, 0.1);
  border-color: var(--primary);
}

/* ─── Settings Groups & Cards ─── */
.settings-group {
  margin-bottom: 1.25rem;
}

.settings-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.settings-card {
  background-color: #FFFFFF;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(28, 25, 23, 0.03);
  overflow: hidden;
}

/* ─── Profile Menu Items (Grouped List Rows) ─── */
.profile-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  border: none;
  border-bottom: 1px solid rgba(231, 229, 228, 0.65);
  background: #FFFFFF;
  border-radius: 0;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background-color 0.14s ease, transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}

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

.profile-menu-item:active {
  background-color: rgba(224, 90, 71, 0.05);
  transform: scale(0.99);
}

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

.profile-menu-item.item-static {
  cursor: default;
}

.profile-menu-item.item-static:active {
  background-color: #FFFFFF;
  transform: none;
}

/* ─── Rounded Micro-Container for Vector Icons ─── */
.menu-icon-container {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-menu-item:active .menu-icon-container {
  transform: scale(0.92);
}

.icon-container-terracotta {
  background-color: rgba(224, 90, 71, 0.1);
  color: var(--primary);
}

.icon-container-indigo {
  background-color: rgba(99, 102, 241, 0.1);
  color: #6366F1;
}

.icon-container-amber {
  background-color: rgba(217, 119, 6, 0.1);
  color: #D97706;
}

.icon-container-teal {
  background-color: rgba(13, 148, 136, 0.1);
  color: #0D9488;
}

.icon-container-gold {
  background-color: rgba(230, 199, 156, 0.32);
  color: #B45309;
}

.icon-container-emerald {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10B981;
}

.icon-container-slate {
  background-color: rgba(100, 116, 139, 0.1);
  color: #64748B;
}

.icon-container-blue {
  background-color: rgba(59, 130, 246, 0.1);
  color: #3B82F6;
}

.icon-container-orange {
  background-color: rgba(249, 115, 22, 0.1);
  color: #EA580C;
}

.icon-container-neutral {
  background-color: rgba(107, 114, 128, 0.1);
  color: #4B5563;
}

.icon-container-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #EF4444;
}

/* ─── Menu Text Hierarchy ─── */
.profile-menu-item .menu-label {
  flex: 1;
  min-width: 0;
}

.profile-menu-item .menu-label h4 {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.15rem 0;
  line-height: 1.35;
}

.profile-menu-item .menu-label p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.38;
}

/* ─── Right-Side Affordances (Chevron & Count Chip) ─── */
.menu-chevron {
  color: var(--text-muted);
  opacity: 0.42;
  margin-left: 0.5rem;
  flex-shrink: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.profile-menu-item:hover .menu-chevron {
  opacity: 0.8;
  transform: translateX(2px);
}

.settings-count-chip {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ─── Danger Item ─── */
.profile-menu-item.danger-item:active {
  background-color: rgba(239, 68, 68, 0.06);
}

.profile-menu-item.danger-item .menu-label h4 {
  color: var(--danger);
}

.profile-menu-item.danger-item .menu-chevron {
  color: var(--danger);
  opacity: 0.6;
}

/* ==========================================================================
   Detailed Profile View Page (Prospect Details)
   ========================================================================== */

#view-profile-detail {
  background-color: var(--bg-app);
}

.detail-page-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-bottom: 90px; /* offset sticky actions */
}

.detail-header-nav {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  justify-content: space-between;
  z-index: 100;
  pointer-events: auto;
}

.btn-icon-back, .btn-icon-more {
  position: relative;
  z-index: 105;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.btn-icon-back:hover, .btn-icon-more:hover {
  background-color: #FFFFFF;
  transform: scale(1.05);
}

.more-actions-menu {
  position: absolute;
  top: 55px;
  right: 0;
  background-color: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  width: 170px;
  z-index: 20;
}

.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-sub);
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: var(--bg-app);
}

.dropdown-item.danger {
  color: var(--danger);
}

.detail-profile-hero {
  position: relative;
  background-color: #FFFFFF;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.detail-hero-photo-wrapper {
  position: relative;
  aspect-ratio: 4 / 5;
  background-color: var(--border);
}

.detail-hero-photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-photo-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 40%);
}

.detail-title-card {
  padding: 2rem;
  margin-top: -30px;
  position: relative;
  background-color: #FFFFFF;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.detail-title-row h2 {
  font-size: 1.75rem;
  font-weight: 700;
}

#detail-profile-job-location {
  font-size: 1.05rem;
  color: var(--text-sub);
  margin-bottom: 1.25rem;
}

.detail-managed-by {
  margin: -0.75rem 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.detail-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.detail-quick-tags .tag {
  background-color: var(--bg-app);
  color: var(--text-sub);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.detail-content-sections {
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.magic-match-detail-cta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.07) 0%, rgba(236, 72, 153, 0.07) 100%);
  border: 1.5px dashed rgba(99, 102, 241, 0.35);
  border-radius: 20px;
  padding: 1.35rem 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.magic-match-detail-cta:hover {
  border-color: #6366F1;
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.magic-match-detail-cta:active {
  transform: scale(0.98);
}

.magic-sparkles {
  font-size: 2rem;
}

.magic-cta-text {
  flex-grow: 1;
}

.magic-cta-text h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  background: var(--magic-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.magic-cta-text p {
  font-size: 0.85rem;
  color: var(--text-sub);
}

.detail-card {
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.detail-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--primary);
  padding-left: 0.75rem;
}

.detail-card p {
  font-size: 0.95rem;
  color: var(--text-sub);
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table td {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bg-app);
  font-size: 0.95rem;
}

.detail-table td:first-child {
  color: var(--text-muted);
  width: 40%;
  font-weight: 500;
}

.detail-table td:last-child {
  color: var(--text-main);
  font-weight: 500;
}

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

/* Sticky Action Bar bottom profile page */
.detail-bottom-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  gap: 1rem;
  z-index: 90;
}

/* Desktop sizing constraints on sticky bottom bar */
@media (min-width: 800px) {
  .detail-bottom-sticky-bar {
    width: 800px;
    margin: 0 auto;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
}

.detail-bottom-sticky-bar .btn {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  box-sizing: border-box;
}

.detail-bottom-sticky-bar .btn.hidden,
.detail-bottom-sticky-bar .btn[hidden],
.detail-bottom-sticky-bar .hidden,
.detail-bottom-sticky-bar [hidden] {
  display: none !important;
}

.detail-bottom-sticky-bar .btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.detail-bottom-sticky-bar .btn svg {
  flex-shrink: 0;
}

/* ==========================================================================
   Modals & Overlays Structure
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(28, 25, 23, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeInModal 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Sheet drag handle (hidden on desktop dialogs, shown on mobile bottom sheets) */
.sheet-drag-handle {
  display: none;
}

/* Base modal card structure */
.magic-modal-card, .private-prefs-card, .bottom-sheet-card {
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  width: 90%;
  max-width: 540px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.sheet-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.btn-sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background-color: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition);
}

.btn-sheet-close:hover {
  background-color: var(--border);
  color: var(--text-main);
}

.sheet-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.sheet-actions .btn {
  flex: 1;
}

.btn-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--text-sub);
  transition: var(--transition);
}

.btn-modal-close:hover {
  background-color: var(--border);
  color: var(--text-main);
}

/* Magic Match Modal Phases */
.magic-modal-phase {
  display: none;
}

.magic-modal-phase.active {
  display: block;
}

.magic-modal-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
}

.magic-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
  background: var(--magic-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.magic-modal-text {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-sub);
  margin-bottom: 1.5rem;
}

.magic-modal-card {
  max-width: 440px;
  padding: 1.5rem 1.35rem 1.25rem 1.35rem;
}

#magic-prompt-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: left;
  margin-top: 0;
  margin-bottom: 0.85rem;
  padding-right: 2.25rem;
  line-height: 1.45;
}

/* Magic Match Thoughts Box in Intro Phase */
.magic-thoughts-card {
  background: #FDFEFE;
  border: 1.5px solid rgba(99, 102, 241, 0.22);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.95rem 0.95rem 0.95rem;
  margin-bottom: 1.15rem;
  text-align: left;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.05);
}

.magic-thoughts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.magic-thoughts-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4F46E5;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.magic-confidential-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.magic-textarea {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: 0.75rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-main);
  background: #FFFFFF;
  resize: vertical;
  min-height: 105px;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.magic-textarea:focus {
  outline: none;
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.magic-privacy-card {
  background-color: rgba(99, 102, 241, 0.04);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 2rem;
  text-align: center;
}

.shield-badge {
  color: #6366F1;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 0.35rem;
}

.magic-privacy-card p {
  font-size: 0.85rem;
  color: var(--text-sub);
}

/* Magic Match Loading State */
.magic-animating-ring {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 3rem auto;
}

.ring-pulse {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: #6366F1;
  border-bottom-color: #F43F5E;
  animation: spinRing 1.5s linear infinite;
}

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

.sparkle-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
}

.magic-loading-title {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.magic-loading-subtext {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Magic Match Results Screen */
.magic-result-score-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

.score-circle-outer {
  position: relative;
  width: 130px;
  height: 130px;
  margin-bottom: 1rem;
}

.score-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-bg {
  fill: none;
  stroke: var(--bg-app);
  stroke-width: 3.2;
}

.score-fill {
  fill: none;
  stroke: url(#magic-glow-gradient); /* Will use standard fallbacks or primary */
  stroke: #EC4899;
  stroke-width: 3.2;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease-in-out;
}

.score-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 700;
  background: var(--magic-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.score-label {
  font-size: 1.15rem;
  font-weight: 700;
}

.magic-categories-scores {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.category-score-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.category-score-row span:first-child {
  width: 120px;
  color: var(--text-sub);
}

.bar-track {
  flex-grow: 1;
  height: 8px;
  background-color: var(--bg-app);
  border-radius: 50px;
  overflow: hidden;
}

.category-score-row .bar-fill {
  height: 100%;
  background: var(--magic-gradient);
  border-radius: 50px;
}

.category-score-row .val {
  width: 35px;
  text-align: right;
  font-weight: 600;
}

.magic-verdict-sections {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.verdict-block {
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.verdict-block.positive {
  background-color: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.verdict-block.negative {
  background-color: rgba(245, 158, 11, 0.04);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.verdict-block h5 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.verdict-block.positive h5 {
  color: var(--success);
}

.verdict-block.negative h5 {
  color: var(--warning);
}

.verdict-block ul {
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-sub);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.verdict-block ul li {
  position: relative;
  padding-left: 1.25rem;
}

.verdict-block ul li::before {
  position: absolute;
  left: 0;
}

.verdict-block.positive ul li::before {
  content: '✓';
  color: var(--success);
}

.verdict-block.negative ul li::before {
  content: '•';
  color: var(--warning);
  font-size: 1.25rem;
  top: -3px;
}

.magic-disclaimer {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* Private Preferences Modal Details */
.modal-header-private {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.modal-header-private h3 {
  font-size: 1.25rem;
}

.private-explanation {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-bottom: 1.5rem;
}

.modal-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Community Privacy & 2-Way Visibility Picker */
.two-way-privacy-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.4;
}

.community-tags-input-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.community-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 28px;
}

.community-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  transition: all 0.15s ease;
}

.community-tag-chip.chip-allowed {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #065f46;
}

.community-tag-chip.chip-blocked {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #991b1b;
}

.community-tag-remove {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0 0 2px;
  font-size: 0.85rem;
  line-height: 1;
  color: currentColor;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.community-tag-remove:hover {
  opacity: 1;
}

.radio-label.comm-vis-card {
  transition: border-color 0.2s, background-color 0.2s;
}

.radio-label.comm-vis-card:hover {
  border-color: var(--primary);
}

/* Sibling Count Pill Group & Dynamic Rows */
.sibling-pill-group {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}

.sibling-pill-btn {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sibling-pill-btn:last-child {
  border-right: none;
}

.sibling-pill-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-main);
}

.sibling-pill-btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.sibling-rows-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sibling-row-item {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
  box-sizing: border-box;
}

.sibling-row-item .form-control {
  min-width: 0;
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 0.86rem;
  box-sizing: border-box;
}

.sibling-badge-item {
  display: block;
  margin-bottom: 0.25rem;
  line-height: 1.45;
}

.sibling-badge-item:last-child {
  margin-bottom: 0;
}

/* ================= ========================================================
   General Layout Responsive Adjustments (Desktop Nav Shell Sidebar setup)
   ========================================================================== */

/* Show sidebar on Desktop, hide on mobile */
.app-sidebar {
  display: none;
}

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

@media (min-width: 1000px) {
  /* Set up desktop structural layout with clean 90% proportional sizing */
  html {
    font-size: 14.5px; /* Scales rem-based typography and spacing to match 90% zoom on desktop screens */
  }

  .app-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    background-color: #FFFFFF;
    border-right: 1px solid var(--border);
    z-index: 110;
    padding: 1.5rem 1.25rem;
  }
  
  .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
  }
  
  .sidebar-logo h2 {
    font-size: 1.15rem;
    font-weight: 700;
    background: var(--magic-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-grow: 1;
  }
  
  .sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-sub);
    font-weight: 500;
    transition: var(--transition);
  }
  
  .sidebar-nav .nav-item:hover {
    background-color: var(--bg-app);
    color: var(--primary);
  }
  
  .sidebar-nav .nav-item.active {
    background-color: rgba(224, 90, 71, 0.08);
    color: var(--primary);
  }
  
  .sidebar-user-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
  }
  
  .sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
  }
  
  .sidebar-user-name {
    font-weight: 600;
    font-size: 0.88rem;
    display: block;
    line-height: 1.2;
  }
  
  .sidebar-user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
  }
  .sidebar-user-role.is-premium {
    color: #f59e0b;
    font-weight: 600;
  }
  .sidebar-user-role.is-free {
    color: var(--text-muted);
  }

  /* Shift application main content panel when sidebar is present */
  .app-main-content {
    margin-left: 240px;
    padding: 1.5rem 2rem;
    max-width: 1440px;
  }
  
  .app-header {
    left: 240px; /* shift header */
    height: 62px;
  }

  #view-app {
    padding-top: 62px;
  }

  .header-container {
    padding: 0 1.75rem;
    height: 100%;
  }

  .app-bottom-nav {
    display: none; /* Hide mobile nav */
  }

  /* Discover Desktop Layout & Spacing */
  .discover-container {
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
  }

  .discover-filter-panel {
    padding: 1.15rem 1rem;
    top: 76px;
    max-height: calc(100vh - 95px);
  }

  .search-bar-header {
    margin-bottom: 0.75rem;
  }

  .results-stats-row {
    margin-bottom: 0.85rem;
  }

  /* Card Ergonomics on Desktop */
  .card-info {
    padding: 0.85rem 1rem;
    gap: 6px;
  }

  .card-name {
    font-size: 1.05rem;
  }

  .card-actions {
    min-height: 38px;
    padding-top: 4px;
  }

  .card-actions .btn {
    height: 38px;
    min-height: 38px;
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   Wizard Increments, Tags, Siblings, and Dropdowns Custom Styles
   ========================================================================== */

/* Toggle groups for height/weight units */
.unit-toggle-group {
  display: inline-flex;
  background-color: var(--bg-app);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.unit-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  transition: var(--transition);
}

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

/* Increment control elements */
.increment-control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  width: 100%;
  justify-content: space-between;
}

.increment-control-group input {
  border: none;
  background: transparent;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  width: 50px;
  outline: none;
}

.inc-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-app);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.inc-btn:hover {
  background-color: var(--border);
  color: var(--primary);
}

/* Occupation searchable input dropdown and locations wrapper */
.dropdown-search-wrap {
  position: relative;
}

.dropdown-search-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 250px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: var(--shadow-lg);
  margin-top: 4px;
  display: none;
}

.dropdown-search-options .dropdown-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.dropdown-search-options .dropdown-item:hover {
  background-color: var(--bg-app);
  color: var(--primary);
}

/* Location Tag input styles */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.location-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background-color: rgba(224, 90, 71, 0.08);
  border: 1px solid rgba(224, 90, 71, 0.15);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.tag-remove {
  border: none;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: bold;
}

/* Sibling builder cards */
.siblings-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.sibling-card {
  background-color: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sibling-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.sibling-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-remove-sibling {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(239, 68, 68, 0.08);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.btn-remove-sibling:hover {
  background-color: var(--danger);
  color: #FFFFFF;
}

/* Horoscope preview card */
.horoscope-preview-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-app);
}

#horoscope-preview-img {
  max-width: 150px;
  max-height: 150px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  object-fit: contain;
}

.horoscope-file-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-sub);
}

.btn-danger-outline {
  padding: 0.5rem 1rem;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-danger-outline:hover {
  background-color: var(--danger);
  color: #FFFFFF;
}

/* ==========================================================================
   Skeleton Loading States
   ========================================================================== */

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

.skeleton {
  background: linear-gradient(90deg, #F0EFEE 25%, #E7E5E4 50%, #F0EFEE 75%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* Skeleton card (profile card placeholder) */
.skeleton-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.skeleton-card .skeleton-photo {
  width: 100%;
  height: 220px;
  border-radius: 0;
}

.skeleton-card .skeleton-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skeleton-card .skeleton-line {
  height: 14px;
  border-radius: 4px;
}

.skeleton-card .skeleton-line.short { width: 55%; }
.skeleton-card .skeleton-line.medium { width: 75%; }
.skeleton-card .skeleton-line.full { width: 100%; }

/* Skeleton conversation row */
.skeleton-convo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.skeleton-convo .skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-convo .skeleton-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */

#toast-container {
  position: fixed;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(92%, 420px);
}

@media (min-width: 769px) {
  #toast-container {
    bottom: 24px;
    width: auto;
    min-width: 320px;
    max-width: 440px;
  }

  /* ── Desktop 4:5 Portrait Detail Hero Layout ── */
  .detail-page-container {
    max-width: 740px !important;
  }

  .detail-profile-hero {
    background-color: #0f172a !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    padding-top: 1.25rem !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
  }

  .detail-hero-photo-wrapper {
    max-width: 460px !important;
    margin: 0 auto !important;
    aspect-ratio: 4 / 5 !important;
    height: auto !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
  }

  .detail-title-card {
    margin-top: 1.25rem !important;
    border-radius: 24px 24px 0 0 !important;
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  border-radius: 28px;
  font-size: 0.86rem;
  font-weight: 500;
  color: #FFFFFF;
  background: rgba(30, 26, 25, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22), 0 1px 3px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: auto;
  width: 100%;
  line-height: 1.35;
  box-sizing: border-box;
  animation: toastIn 0.28s cubic-bezier(0.2, 0, 0, 1.2) forwards;
}

.toast-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.toast-badge-success { background: #10B981; color: #FFFFFF; }
.toast-badge-error   { background: #EF4444; color: #FFFFFF; }
.toast-badge-warning { background: #F59E0B; color: #1C1917; }
.toast-badge-info    { background: #E05A47; color: #FFFFFF; }

.toast-msg {
  flex: 1 1 0%;
  min-width: 0;
  word-break: break-word;
}

.toast-dismiss {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.toast-dismiss:active {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

.toast.toast-out {
  animation: toastOut 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
}

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

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

/* ==========================================================================
   Empty States (Polished)
   ========================================================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  gap: 0.75rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 2.75rem;
  line-height: 1;
  opacity: 0.7;
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-sub);
  margin: 0;
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.5;
  margin: 0;
}

.empty-state .btn {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  padding: 0.6rem 1.25rem;
}

/* ==========================================================================
   Inline Error States
   ========================================================================== */

.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  gap: 0.6rem;
}

.error-state-icon {
  font-size: 2rem;
  opacity: 0.6;
}

.error-state h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-sub);
}

.error-state p {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 260px;
}

.error-state .btn {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  padding: 0.55rem 1rem;
}

/* ==========================================================================
   Settings / Profile Menu Extended
   ========================================================================== */

.settings-section-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

.profile-menu-item.danger-item .menu-label h4 {
  color: var(--danger);
}

.profile-menu-item.danger-item:hover {
  background-color: rgba(239, 68, 68, 0.04);
}

/* Delete account danger zone */
.danger-zone-card {
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
  background: rgba(239, 68, 68, 0.03);
}

.danger-zone-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 0.4rem;
}

.danger-zone-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.875rem;
}

/* Help & Support item */
.profile-menu-item .menu-external-icon {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
  padding-left: 0.5rem;
  flex-shrink: 0;
}

/* Fields shown only when editing existing profile, hidden on first creation */
.wizard-edit-only {
  display: none;
}
.wizard-mode-edit .wizard-edit-only,
#view-register-wizard.wizard-mode-edit .wizard-edit-only {
  display: block;
}

/* ==========================================================================
   MODERN SEAMLESS EDIT PROFILE VIEW (#view-edit-profile)
   ========================================================================== */
.edit-profile-page-container {
  max-width: 740px;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-app);
  padding-bottom: 2rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

.edit-profile-header-bar {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(250, 250, 249, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.edit-profile-header-title h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  margin: 0;
}

.edit-save-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem !important;
  font-weight: 600;
  padding: 0.45rem 1rem !important;
  border-radius: 20px !important;
  box-shadow: 0 2px 8px rgba(224, 90, 71, 0.25);
  transition: var(--transition);
}

.edit-save-header-btn:active {
  transform: scale(0.96);
}

.edit-profile-scroll-body {
  padding: 1.25rem;
}

/* ── 3-Photo Management Card (Mobile-App First) ── */
.edit-photos-card {
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.edit-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.photo-slot-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.85rem 0.25rem 0.6rem 0.25rem;
  background: #FFFFFF;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 0;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.photo-slot-item.is-primary {
  border-color: var(--primary);
  background: rgba(224, 90, 71, 0.02);
}

.single-photo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0.5rem 0 0.25rem 0;
}

.photo-slot-item.is-single {
  max-width: 260px;
  width: 100%;
  padding: 1.25rem 1rem 1rem 1rem;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--primary);
  background: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.photo-slot-item.is-single .photo-slot-preview-box {
  width: 124px;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  border: 2.5px solid var(--primary);
  box-shadow: 0 6px 18px rgba(224, 90, 71, 0.22);
  margin-bottom: 0.85rem;
}

.photo-slot-item.is-single .photo-slot-empty {
  font-size: 0.78rem;
  font-weight: 600;
}

.photo-slot-item.is-single .photo-slot-empty svg {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
}

.photo-slot-item.is-single .photo-slot-actions {
  gap: 0.5rem;
}

.photo-slot-item.is-single .photo-slot-actions .btn {
  font-size: 0.82rem !important;
  padding: 6px 14px !important;
  border-radius: 20px !important;
  font-weight: 600 !important;
}

.slot-badge-main {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(224, 90, 71, 0.3);
  white-space: nowrap;
  z-index: 2;
}

.photo-slot-preview-box {
  width: 64px;
  height: 64px;
  max-width: 100%;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 0.4rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F5F5F4;
  border: 2px solid var(--border);
  position: relative;
  flex-shrink: 0;
}

.photo-slot-item.is-primary .photo-slot-preview-box {
  width: 74px;
  height: 74px;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(224, 90, 71, 0.18);
}

.photo-slot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 50%;
}

.photo-slot-empty {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.photo-slot-empty svg {
  color: var(--text-muted);
  width: 22px;
  height: 22px;
}

.photo-slot-caption {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 0.35rem;
  line-height: 1.2;
  text-align: center;
  word-break: break-word;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.4em;
  width: 100%;
}

.photo-slot-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
}

.photo-slot-actions .btn {
  font-size: 0.68rem !important;
  padding: 3px 6px !important;
  border-radius: 12px !important;
  white-space: nowrap;
}

/* ── Category Quick Jump Bar ── */
.edit-category-chips-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.35rem 0.1rem;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.edit-category-chips-bar::-webkit-scrollbar {
  display: none;
}

.edit-chip {
  flex-shrink: 0;
  padding: 0.42rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.edit-chip:active {
  transform: scale(0.96);
}

.edit-chip.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(224, 90, 71, 0.25);
}

/* ── Form Edit Cards ── */
.edit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.edit-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.edit-card-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.edit-profile-bottom-bar {
  position: sticky;
  bottom: 0;
  z-index: 100;
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.btn-save-full {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

/* ==========================================================================
   MULTI-PHOTO SWIPEABLE CAROUSEL (#view-profile-detail)
   ========================================================================== */
.detail-hero-photo-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  background: #1C1917;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.detail-slider-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: opacity 0.22s ease;
}

.detail-photo-progress {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 5px;
  z-index: 15;
  pointer-events: none;
}

.photo-dash {
  flex: 1;
  height: 3.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(4px);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.photo-dash.active {
  background: #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transform: scaleY(1.15);
}

.detail-photo-counter {
  position: absolute;
  top: 24px;
  right: 14px;
  background: rgba(28, 25, 23, 0.65);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  z-index: 15;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.slider-tap-zone {
  position: absolute;
  top: 72px; /* Starts below header back & more buttons */
  bottom: 0;
  z-index: 8;
}

.slider-tap-zone.zone-prev {
  left: 0;
  width: 35%;
  cursor: pointer;
}

.slider-tap-zone.zone-next {
  right: 0;
  width: 65%;
  cursor: pointer;
}

.btn-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(28, 25, 23, 0.45);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  z-index: 14;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-slider-arrow:hover {
  background: rgba(28, 25, 23, 0.8);
  transform: translateY(-50%) scale(1.08);
}

.btn-slider-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.btn-slider-prev {
  left: 12px;
  padding-right: 2px;
}

.btn-slider-next {
  right: 12px;
  padding-left: 2px;
}

/* Edit Profile Jathagam Mode Toggle */
.edit-horo-toggle {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn-remove-horoscope {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid #ef4444;
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-remove-horoscope:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
}

@media (max-width: 520px) {
  .edit-horo-toggle {
    flex-direction: column;
    gap: 0.5rem;
  }
  .edit-profile-scroll-body {
    padding: 0.85rem 0.65rem;
  }
  .edit-card {
    padding: 1rem 0.65rem;
  }
  .edit-photos-grid {
    gap: 0.35rem;
  }
  .photo-slot-item {
    padding: 0.75rem 0.15rem 0.5rem 0.15rem;
  }
  .photo-slot-preview-box {
    width: 56px;
    height: 56px;
  }
  .photo-slot-item.is-primary .photo-slot-preview-box {
    width: 66px;
    height: 66px;
  }
  .photo-slot-caption {
    font-size: 0.62rem;
    height: 2.3em;
  }
  .photo-slot-actions .btn {
    font-size: 0.64rem !important;
    padding: 2px 4px !important;
  }
}

@media (min-width: 600px) {
  .photo-slot-preview-box {
    width: 80px;
    height: 80px;
  }
  .photo-slot-item.is-primary .photo-slot-preview-box {
    width: 92px;
    height: 92px;
  }
  .edit-photos-grid {
    gap: 0.85rem;
  }
  .photo-slot-caption {
    font-size: 0.72rem;
  }
  .photo-slot-actions .btn {
    font-size: 0.72rem !important;
    padding: 3px 8px !important;
  }
}

/* ==========================================================================
   Discovery Daily Quota Banner & Chat Dropdown Styles
   ========================================================================== */
.discovery-quota-banner {
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.08) 0%, rgba(245, 158, 11, 0.12) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md, 10px);
  padding: 0.85rem 1.15rem;
  transition: all 0.2s ease-in-out;
}

.discovery-quota-banner .quota-banner-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.discovery-quota-banner .quota-banner-icon {
  font-size: 1.25rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.discovery-quota-banner .quota-banner-text strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 0.2rem;
}

.discovery-quota-banner .quota-banner-text p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #78350f;
}

/* Chat Header Interactive Elements */
.chat-header-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-md, 8px);
  transition: background-color 0.15s ease;
  user-select: none;
}

.chat-header-profile:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.chat-menu-wrapper {
  position: relative;
}

#chat-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 10px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  z-index: 1000;
}

#chat-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  font-size: 0.875rem;
  color: var(--text-main, #1f2937);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

#chat-dropdown-menu .dropdown-item:hover {
  background-color: var(--bg-app, #f8fafc);
}

#chat-dropdown-menu .dropdown-item.danger {
  color: var(--danger, #ef4444);
}

#chat-dropdown-menu .dropdown-item.danger:hover {
  background-color: rgba(239, 68, 68, 0.08);
}

/* ==========================================================================
   4:5 Interactive Image Cropper Modal
   ========================================================================== */
#modal-image-cropper {
  position: fixed;
  inset: 0;
  z-index: 9999 !important;
  background: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem;
  box-sizing: border-box;
}

#modal-image-cropper.hidden {
  display: none !important;
}

.cropper-modal-container {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: cropperPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cropperPop {
  0% { opacity: 0; transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1); }
}

.cropper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.cropper-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cropper-badge-ratio {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(224, 90, 71, 0.12);
  color: var(--primary);
  padding: 2px 7px;
  border-radius: 6px;
}

.cropper-close-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.cropper-close-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
}

.cropper-body {
  padding: 1rem 1.25rem 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  overflow-y: auto;
}

/* Dark workspace viewport for canvas */
.cropper-workspace {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 360px;
  background: #0f172a;
  border-radius: 14px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.cropper-workspace:active {
  cursor: grabbing;
}

#cropper-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Transparent 4:5 Aperture with dark boundary shade */
.cropper-frame-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cropper-aperture-4-5 {
  position: relative;
  width: 76%;
  aspect-ratio: 4 / 5;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.65);
  overflow: hidden;
}

/* 3x3 Rule of Thirds subtle guidelines */
.cropper-grid-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.cropper-grid-line.h1 { top: 33.33%; left: 0; right: 0; height: 1px; }
.cropper-grid-line.h2 { top: 66.66%; left: 0; right: 0; height: 1px; }
.cropper-grid-line.v1 { left: 33.33%; top: 0; bottom: 0; width: 1px; }
.cropper-grid-line.v2 { left: 66.66%; top: 0; bottom: 0; width: 1px; }

.cropper-instructions {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

/* Interactive slider and rotate toolbar */
.cropper-controls {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px;
}

.cropper-zoom-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cropper-zoom-bar input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
  cursor: pointer;
  height: 6px;
  border-radius: 4px;
}

.cropper-zoom-icon {
  font-size: 0.85rem;
  color: var(--text-muted);
  user-select: none;
}

.cropper-btn-tool {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.cropper-btn-tool:hover {
  background: #e2e8f0;
}

.cropper-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0.85rem 1.25rem 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.cropper-footer .btn {
  padding: 8px 16px !important;
  font-size: 0.90rem !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
}

/* ==========================================================================
   Photo Privacy & Blur Protection (Option A)
   ========================================================================== */
.photo-privacy-blurred {
  filter: blur(24px) brightness(0.88);
  transform: scale(1.15) !important;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Privacy lock badge overlay on profile cards */
.photo-privacy-lock-badge {
  position: absolute;
  bottom: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  z-index: 2;
  white-space: nowrap;
  pointer-events: none;
}

.photo-privacy-lock-badge .lock-icon {
  font-size: 0.85rem;
}

/* Privacy lock overlay on detail hero view */
.detail-photo-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: #FFFFFF;
  z-index: 3;
}

.detail-photo-lock-overlay .detail-lock-shield {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.detail-photo-lock-overlay .detail-lock-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 0.4rem 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.detail-photo-lock-overlay .detail-lock-subtitle {
  font-size: 0.825rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 290px;
  line-height: 1.45;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Daily Quotas & Usage Stats Modal
   ========================================================================== */
.quota-modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  width: 92%;
  max-width: 580px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.quota-modal-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light, #E7E5E4);
}

.quota-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.quota-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(235, 94, 40, 0.12), rgba(200, 70, 20, 0.18));
  color: var(--primary, #EB5E28);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quota-tier-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  background: rgba(28, 25, 23, 0.08);
  color: var(--text-main);
}

.quota-tier-badge.is-premium {
  background: linear-gradient(135deg, #FFF9E6, #FFE9A6);
  color: #B45309;
  border: 1px solid #FCD34D;
}

.quota-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.25rem 0;
  font-family: 'Outfit', sans-serif;
}

.quota-modal-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.quota-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.quota-card {
  background: var(--bg-card, #FAFAF9);
  border: 1px solid var(--border-light, #E7E5E4);
  border-radius: var(--radius-md, 12px);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.quota-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.quota-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.quota-card-icon-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quota-card-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.quota-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.quota-status-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.quota-status-pill.is-low {
  background: rgba(245, 158, 11, 0.15);
  color: #D97706;
}

.quota-status-pill.is-exhausted {
  background: rgba(239, 68, 68, 0.15);
  color: #DC2626;
}

.quota-card-values {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.quota-stat-remaining {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  font-family: 'Outfit', sans-serif;
}

.quota-stat-slash {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.quota-stat-max {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
}

.quota-stat-unit {
  font-size: 0.775rem;
  color: var(--text-sub);
  margin-left: 0.2rem;
}

.quota-progress-track {
  width: 100%;
  height: 6px;
  background: var(--border-light, #E7E5E4);
  border-radius: 999px;
  overflow: hidden;
  margin-top: auto;
}

.quota-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary, #EB5E28);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.quota-progress-fill.status-ample {
  background: #10B981;
}

.quota-progress-fill.status-low {
  background: #F59E0B;
}

.quota-progress-fill.status-exhausted {
  background: #EF4444;
}

.quota-reset-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.03);
}

.quota-upgrade-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md, 12px);
  background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
  border: 1px solid #FED7AA;
  margin-bottom: 0.5rem;
}

.quota-upgrade-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quota-upgrade-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.quota-upgrade-text h4 {
  font-size: 0.925rem;
  font-weight: 700;
  color: #9A3412;
  margin: 0 0 0.15rem 0;
}

.quota-upgrade-text p {
  font-size: 0.775rem;
  color: #C2410C;
  margin: 0;
  line-height: 1.35;
}

/* ==========================================================================
   SEARCHABLE COMBOBOX (Typing-enabled Dropdowns for Mobile & Desktop)
   ========================================================================== */
.searchable-combobox-container {
  position: relative !important;
}

.combobox-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.combobox-input {
  width: 100%;
  padding-right: 2.2rem !important;
  cursor: text;
}

.combobox-arrow {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--text-muted, #718096);
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
  padding: 0.2rem;
  transition: transform 0.2s ease, color 0.15s ease;
}

.combobox-arrow:hover {
  color: var(--primary, #e11d48);
}

.combobox-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.12);
  max-height: 240px;
  overflow-y: auto;
  z-index: 1050;
  -webkit-overflow-scrolling: touch;
}

.combobox-options-list {
  padding: 0.35rem 0;
}

.combobox-item {
  padding: 0.7rem 0.95rem;
  font-size: 0.92rem;
  color: var(--text-primary, #1e293b);
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: background-color 0.12s ease, color 0.12s ease;
}

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

.combobox-item:hover,
.combobox-item:active {
  background-color: rgba(225, 29, 72, 0.08);
  color: var(--primary, #e11d48);
  font-weight: 500;
}

.combobox-item-empty {
  padding: 1rem 0.95rem;
  text-align: center;
  color: var(--text-muted, #94a3b8);
  font-size: 0.88rem;
}

