/* 
  NeighbourTask Premium Design System 
  Custom Overrides for Bootstrap 5.3 + Plus Jakarta Sans
*/

:root {
  --brand: #5046e5;
  --brand-light: #6366f1;
  --brand-dark: #3730a3;
  --brand-rgb: 80, 70, 229;
  
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  
  --ink: #0f172a;
  --muted: #64748b;
  --surface-bg: #f8fafc;
  --surface-card: #ffffff;
  
  --success: #10b981;
  --success-bg: #ecfdf5;
  --danger: #f43f5e;
  --danger-bg: #fff1f2;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  
  --border-color: #e2e8f0;
  
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(80, 70, 229, 0.06), 0 8px 10px -6px rgba(80, 70, 229, 0.04);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 100px;
}

/* Global resets & styling */
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: var(--surface-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--surface-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Hero Section with Beautiful Modern Gradients & Micro-graphics background */
.hero {
  position: relative;
  background: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
              radial-gradient(circle at 10% 90%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
              linear-gradient(180deg, #ffffff 0%, var(--surface-bg) 100%);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.4;
  pointer-events: none;
}

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

/* Animated interactive shapes for rich visual appeal */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(80, 70, 229, 0.08);
  color: var(--brand);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(80, 70, 229, 0.15);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: pulse-slow 3s infinite;
}

@keyframes pulse-slow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.95; }
}

/* Premium Card Designs */
.card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.featured-card {
  position: relative;
  border: 2px solid #fcd34d !important;
  box-shadow: 0 12px 24px -10px rgba(245, 158, 11, 0.15) !important;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  height: 6px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.card-title a {
  color: var(--ink);
  font-weight: 700;
  transition: color 0.2s ease;
}

.card-title a:hover {
  color: var(--brand);
}

/* Feature & Stat Cards */
.feature-card {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  height: 100%;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(80, 70, 229, 0.25);
}

.feature-card .icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-md);
  background: rgba(80, 70, 229, 0.08);
  color: var(--brand);
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  transition: var(--transition-smooth);
}

.feature-card:hover .icon-box {
  background: var(--brand);
  color: #fff;
  transform: rotate(6deg) scale(1.1);
}

.stat-card {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

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

.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Custom Interactive Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 0.3rem 0.75rem;
  font-weight: 600;
  font-size: 0.8rem;
  border: 1px solid #e2e8f0;
  transition: var(--transition-smooth);
}

.chip:hover {
  background: rgba(80, 70, 229, 0.08);
  color: var(--brand);
  border-color: rgba(80, 70, 229, 0.2);
}

/* Buttons Styling */
.btn {
  border-radius: var(--radius-md);
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  transition: var(--transition-smooth);
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  border: none;
  box-shadow: 0 4px 10px rgba(80, 70, 229, 0.25);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand-dark) 100%);
  box-shadow: 0 6px 15px rgba(80, 70, 229, 0.35);
  transform: translateY(-1px);
}

.btn-outline-primary {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-outline-primary:hover {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 10px rgba(80, 70, 229, 0.2);
}

.btn-outline-secondary {
  border-color: #cbd5e1;
  color: #475569;
}

.btn-outline-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
}

/* Nav bar customizations */
.navbar {
  backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.85) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
  transition: var(--transition-smooth);
}

.navbar-brand {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  font-weight: 500;
  color: #475569 !important;
  transition: var(--transition-smooth);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem !important;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand) !important;
  background: rgba(80, 70, 229, 0.06);
}

/* Match Scorer Meter & Trust elements */
.match-meter {
  height: 0.5rem;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
  position: relative;
}

.match-meter > div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--brand) 100%);
  transition: width 1s ease-out;
}

.match-score-badge {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(80, 70, 229, 0.1) 100%);
  color: var(--brand);
  border: 1px solid rgba(80, 70, 229, 0.15);
  font-weight: 700;
}

/* Empty states redesigned */
.empty-state {
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-bg) 100%);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

.empty-state i {
  font-size: 3rem;
  color: #94a3b8;
  margin-bottom: 1.25rem;
  display: block;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

/* Message styling updates */
.message-bubble {
  border: 1px solid var(--border-color);
  background: var(--surface-card);
  border-radius: var(--radius-md) var(--radius-lg) var(--radius-lg) var(--radius-md);
  padding: 0.85rem 1.1rem;
  margin: 0.75rem 0;
  max-width: 75%;
  box-shadow: var(--shadow-sm);
  line-height: 1.5;
  transition: var(--transition-smooth);
}

.message-bubble.mine {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  color: #fff;
  border-color: transparent;
  border-radius: var(--radius-lg) var(--radius-md) var(--radius-md) var(--radius-lg);
  margin-left: auto;
  box-shadow: 0 4px 10px rgba(80, 70, 229, 0.15);
}

.message-bubble.mine .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Form improvements */
.form-control, .form-select {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.875rem;
  font-weight: 500;
  color: var(--ink);
  transition: var(--transition-smooth);
}

.form-control:focus, .form-select:focus {
  border-color: var(--brand-light);
  box-shadow: 0 0 0 4px rgba(80, 70, 229, 0.12);
  outline: 0;
}

.form-label {
  font-weight: 600;
  color: #334155;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
}

.mobile-bottom-nav a {
  text-align: center;
  padding: 0.75rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition-smooth);
}

.mobile-bottom-nav a i {
  font-size: 1.25rem;
}

.mobile-bottom-nav a:hover, .mobile-bottom-nav a.active {
  color: var(--brand);
}

.mobile-shell {
  padding-bottom: 5.5rem !important;
}

/* Badge variants */
.badge {
  padding: 0.35em 0.65em;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.text-bg-warning {
  background: var(--warning-bg) !important;
  color: #92400e !important;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.text-bg-danger {
  background: var(--danger-bg) !important;
  color: #9f1239 !important;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.text-bg-success {
  background: var(--success-bg) !important;
  color: #065f46 !important;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.text-bg-info {
  background: rgba(6, 182, 212, 0.08) !important;
  color: #0e7490 !important;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

/* General Layout helpers */
.page-header {
  padding: 2.5rem 0;
  background: radial-gradient(circle at 100% 100%, rgba(99, 102, 241, 0.05) 0%, transparent 60%), #ffffff;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
}

/* Quote comparison box */
.quote-box {
  border: 1px solid var(--border-color);
  background: var(--surface-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: var(--transition-smooth);
}

.quote-box:hover {
  border-color: rgba(80, 70, 229, 0.25);
  box-shadow: var(--shadow-md);
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.list-row:last-child {
  border-bottom: 0;
}

/* App Header Visual Accents */
.navbar-brand i {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hide caret arrow for special dropdown buttons */
.dropdown-toggle.no-caret::after {
  display: none !important;
}
