/* =========================================================
   CommunityPulse AI — Design System & Global Styles
   ========================================================= */

/* ----- Google Fonts ----- */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap');

/* ----- CSS Custom Properties (Light Mode) ----- */
:root {
  /* Google Brand Colors */
  --blue:       #1A73E8;
  --blue-light: #4285F4;
  --blue-dark:  #0D47A1;
  --blue-50:    #E8F0FE;
  --blue-100:   #C5D8F9;
  --green:      #34A853;
  --green-light:#46C166;
  --green-50:   #E6F4EA;
  --yellow:     #FBBC04;
  --yellow-50:  #FEF7E0;
  --red:        #EA4335;
  --red-50:     #FCE8E6;

  /* Neutrals */
  --white:      #FFFFFF;
  --surface:    #FAFBFF;
  --surface-1:  #F6F8FF;
  --surface-2:  #F1F3FF;
  --surface-3:  #E8EAFD;
  --border:     #E0E3F0;
  --border-color: #E0E3F0;
  --text-primary:   #1C2129;
  --text-secondary: #5F6368;
  --text-tertiary:  #9AA0AC;
  --shadow-color: rgba(26, 115, 232, 0.12);
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 18px rgba(26,115,232,0.18), 0 2px 6px rgba(0,0,0,0.08);
  --shadow-lg:  0 12px 48px rgba(26,115,232,0.16), 0 4px 16px rgba(0,0,0,0.1);
  --bg-color:   #FAFBFF;

  /* Glassmorphism */
  --glass-bg:     rgba(255,255,255,0.72);
  --glass-border: rgba(255,255,255,0.55);
  --glass-shadow: 0 8px 40px rgba(26,115,232,0.10), 0 1.5px 6px rgba(0,0,0,0.06);

  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-collapsed: 68px;
  --header-height: 60px;

  /* Radius */
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-full: 9999px;

  /* Transitions */
  --t-fast:   0.15s ease;
  --t-base:   0.28s cubic-bezier(0.4,0,0.2,1);
  --t-slow:   0.5s cubic-bezier(0.4,0,0.2,1);
  --t-spring: 0.6s cubic-bezier(0.34,1.56,0.64,1);

  /* Typography */
  --font-sans: 'Inter', 'Google Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ----- Dark Mode Variables ----- */
[data-theme="dark"] {
  --white:           #0F1117;
  --surface:         #161B27;
  --surface-1:       #191F2E;
  --surface-2:       #1E2537;
  --surface-3:       #263040;
  --border:          #2D3A50;
  --border-color:    #2D3A50;
  --text-primary:    #E8EAF0;
  --text-secondary:  #9AA5C0;
  --text-tertiary:   #5B6785;
  --glass-bg:        rgba(22,27,39,0.78);
  --glass-border:    rgba(255,255,255,0.08);
  --glass-shadow:    0 8px 40px rgba(0,0,0,0.4), 0 1.5px 6px rgba(0,0,0,0.3);
  --shadow-color:    rgba(0,0,0,0.3);
  --shadow-md:       0 4px 18px rgba(0,0,0,0.35);
  --bg-color:        #161B27;
  --blue-50:         #0D2040;
  --green-50:        #0A2016;
  --yellow-50:       #211800;
  --red-50:          #2B0A08;
}

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  background: var(--surface);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--t-slow), color var(--t-slow);
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 1;
  user-select: none;
}

/* ----- Scrollbar ----- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* =========================================================
   UTILITY CLASSES
   ========================================================= */
.hidden { display: none !important; }
.flex    { display: flex; }
.grid    { display: grid; }
.block   { display: block; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end    { justify-content: flex-end; }
.flex-col  { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1    { flex: 1; }
.gap-xs { gap: 4px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 14px; }
.gap-lg { gap: 20px; }
.gap-xl { gap: 28px; }
.gap-2xl{ gap: 40px; }
.w-full  { width: 100%; }
.h-full  { height: 100%; }
.min-h-screen { min-height: 100vh; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.inset-0  { inset: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }
.z-200 { z-index: 200; }
.pointer-events-none { pointer-events: none; }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.select-none { user-select: none; }
.cursor-pointer { cursor: pointer; }

/* Spacing helpers */
.p-xs  { padding: 4px; }
.p-sm  { padding: 8px; }
.p-md  { padding: 14px; }
.p-lg  { padding: 20px; }
.p-xl  { padding: 28px; }
.px-sm { padding-inline: 8px; }
.px-md { padding-inline: 14px; }
.px-lg { padding-inline: 20px; }
.px-xl { padding-inline: 28px; }
.py-xs { padding-block: 4px; }
.py-sm { padding-block: 8px; }
.py-md { padding-block: 14px; }
.py-lg { padding-block: 20px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 14px; }
.mt-lg { margin-top: 20px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 14px; }
.mb-lg { margin-bottom: 20px; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-inline: auto; }

/* Typography */
.text-xs   { font-size: 11px; line-height: 1.4; }
.text-sm   { font-size: 13px; line-height: 1.5; }
.text-base { font-size: 15px; line-height: 1.6; }
.text-md   { font-size: 16px; line-height: 1.6; }
.text-lg   { font-size: 18px; line-height: 1.5; }
.text-xl   { font-size: 22px; line-height: 1.4; }
.text-2xl  { font-size: 28px; line-height: 1.3; }
.text-3xl  { font-size: 36px; line-height: 1.2; }
.text-4xl  { font-size: 48px; line-height: 1.1; }
.text-5xl  { font-size: 60px; line-height: 1.05; }
.font-light  { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold  { font-weight: 700; }
.font-mono  { font-family: var(--font-mono); }
.tracking-tight { letter-spacing: -0.02em; }
.tracking-wide  { letter-spacing: 0.04em; }
.uppercase { text-transform: uppercase; }

/* Color text */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-blue      { color: var(--blue); }
.text-green     { color: var(--green); }
.text-yellow    { color: var(--yellow); }
.text-red       { color: var(--red); }
.text-white     { color: #fff; }

/* Background */
.bg-surface   { background: var(--surface); }
.bg-surface-2 { background: var(--surface-2); }
.bg-surface-3 { background: var(--surface-3); }
.bg-blue      { background: var(--blue); }
.bg-green     { background: var(--green); }
.bg-yellow    { background: var(--yellow); }
.bg-red       { background: var(--red); }
.bg-blue-50   { background: var(--blue-50); }
.bg-green-50  { background: var(--green-50); }
.bg-yellow-50 { background: var(--yellow-50); }
.bg-red-50    { background: var(--red-50); }
.bg-white     { background: #fff; }

/* Border */
.border      { border: 1px solid var(--border); }
.border-top  { border-top: 1px solid var(--border); }
.border-blue { border-color: var(--blue); }
.rounded-sm  { border-radius: var(--r-sm); }
.rounded-md  { border-radius: var(--r-md); }
.rounded-lg  { border-radius: var(--r-lg); }
.rounded-xl  { border-radius: var(--r-xl); }
.rounded-full { border-radius: var(--r-full); }

/* =========================================================
   GLASS CARDS & PANELS
   ========================================================= */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--r-lg);
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 2px 12px var(--shadow-color);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.card:hover {
  box-shadow: 0 8px 32px var(--shadow-color);
  transform: translateY(-2px);
}
.card-flat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

/* Gradient border card */
.card-gradient-border {
  position: relative;
  background: var(--white);
  border-radius: var(--r-lg);
  isolation: isolate;
}
.card-gradient-border::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: calc(var(--r-lg) + 1.5px);
  background: linear-gradient(135deg, var(--blue), var(--green), var(--yellow));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--t-base);
}
.card-gradient-border:hover::before { opacity: 1; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26,115,232,0.35);
}
.btn-primary:hover {
  background: #1557c0;
  box-shadow: 0 4px 18px rgba(26,115,232,0.45);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--blue);
  border: 1px solid var(--blue-100);
}
.btn-secondary:hover { background: var(--blue-50); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text-primary); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #c62828; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #2d9248; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { padding: 13px 28px; font-size: 16px; border-radius: var(--r-lg); }
.btn-xl { padding: 16px 36px; font-size: 17px; border-radius: var(--r-lg); }
.btn-icon { padding: 8px; border-radius: var(--r-sm); }
.btn-pill { border-radius: var(--r-full); }

/* Ripple */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  border-radius: inherit;
  transition: background 0.3s;
}
.btn:active::after { background: rgba(255,255,255,0.15); }

/* =========================================================
   FORM ELEMENTS
   ========================================================= */
.input, .select-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--text-primary);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}
.input:focus, .select-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}
.input::placeholder { color: var(--text-tertiary); }
.input-group { position: relative; }
.input-group .input { padding-left: 40px; }
.input-group .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 20px;
}
.label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-row { display: flex; flex-direction: column; gap: 4px; }
textarea.input { resize: vertical; min-height: 100px; }

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 10px;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: var(--r-full);
  transition: background var(--t-fast);
  position: relative;
  flex-shrink: 0;
}
.toggle input:checked ~ .toggle-track { background: var(--green); }
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform var(--t-base);
}
.toggle input:checked ~ .toggle-track .toggle-thumb { transform: translateX(20px); }

/* =========================================================
   BADGES & CHIPS
   ========================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-blue   { background: var(--blue-50);   color: var(--blue); }
.badge-green  { background: var(--green-50);  color: var(--green); }
.badge-yellow { background: var(--yellow-50); color: #a07000; }
.badge-red    { background: var(--red-50);    color: var(--red); }
.badge-gray   { background: var(--surface-3); color: var(--text-secondary); }

/* Status dot */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot.online  { background: var(--green); box-shadow: 0 0 0 2px var(--green-50); }
.status-dot.offline { background: var(--text-tertiary); }
.status-dot.warn    { background: var(--yellow); box-shadow: 0 0 0 2px var(--yellow-50); }
.status-dot.danger  { background: var(--red); box-shadow: 0 0 0 2px var(--red-50); }

/* =========================================================
   ANIMATIONS & KEYFRAMES
   ========================================================= */

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-in { animation: fadeIn var(--t-slow) both; }

/* Slide up */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.slide-up { animation: slideUp var(--t-slow) both; }
.slide-up-1 { animation-delay: 0.05s; }
.slide-up-2 { animation-delay: 0.12s; }
.slide-up-3 { animation-delay: 0.20s; }
.slide-up-4 { animation-delay: 0.30s; }
.slide-up-5 { animation-delay: 0.42s; }

/* Float */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}
.float-anim { animation: float 4s ease-in-out infinite; }
.float-anim-2 { animation: float 5.5s ease-in-out infinite 0.8s; }
.float-anim-3 { animation: float 6s ease-in-out infinite 1.5s; }

/* Pulse glow */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26,115,232,0.4); }
  50%       { box-shadow: 0 0 0 10px rgba(26,115,232,0); }
}
.pulse-glow { animation: pulseGlow 2s infinite; }

/* AI thinking dots */
@keyframes aiDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-6px); opacity: 1; }
}
.ai-dot-1 { animation: aiDot 1.2s infinite 0s; }
.ai-dot-2 { animation: aiDot 1.2s infinite 0.2s; }
.ai-dot-3 { animation: aiDot 1.2s infinite 0.4s; }

/* Gradient animation */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.gradient-animate {
  background: linear-gradient(135deg, var(--blue), var(--green), var(--blue-light), var(--green));
  background-size: 300% 300%;
  animation: gradientShift 6s ease infinite;
}

/* Particles network */
@keyframes particleDrift {
  0%   { transform: translate(0,0); opacity: 0.6; }
  50%  { opacity: 1; }
  100% { transform: translate(var(--dx,30px), var(--dy,-30px)); opacity: 0; }
}

/* Spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spin { animation: spin 1s linear infinite; }
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Skeleton shimmer */
@keyframes shimmer {
  from { background-position: -400px 0; }
  to   { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--r-sm);
}

/* Counter animation */
@keyframes counterUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* View transitions */
.view { display: none; }
.view.active {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s both;
}
.view-block.active {
  display: block;
  animation: fadeIn 0.3s both;
}

/* =========================================================
   SPLASH SCREEN
   ========================================================= */
#splash {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 30% 60%, #0e1f45 0%, #061028 40%, #020810 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  overflow: hidden;
}
#splash::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(26,115,232,0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(52,168,83,0.15) 0%, transparent 60%);
  pointer-events: none;
}
#splash.hidden-splash { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-icon-wrap {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1A73E8, #34A853);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 0 0 12px rgba(26,115,232,0.15), 0 0 0 24px rgba(26,115,232,0.06);
  animation: splashIconPulse 2s ease-in-out infinite;
}
@keyframes splashIconPulse {
  0%,100% { box-shadow: 0 0 0 12px rgba(26,115,232,0.15), 0 0 0 24px rgba(26,115,232,0.06); }
  50% { box-shadow: 0 0 0 16px rgba(26,115,232,0.2), 0 0 0 32px rgba(26,115,232,0.08); }
}

.splash-logo {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  animation: slideUp 0.6s 0.1s both;
}
.splash-logo span {
  background: linear-gradient(90deg, #4285F4, #34A853);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.splash-tagline {
  font-size: 15px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 40px;
  animation: slideUp 0.6s 0.2s both;
  letter-spacing: 0.02em;
}
.splash-loader {
  width: 240px;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 36px;
  animation: fadeIn 0.4s 0.3s both;
}
.splash-loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--blue-light));
  background-size: 200% 100%;
  border-radius: 2px;
  animation: splashLoad 1.2s ease forwards, gradientShift 2s ease infinite;
}
@keyframes splashLoad {
  0%   { width: 0%; }
  70%  { width: 85%; }
  100% { width: 100%; }
}
.splash-status {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 32px;
  animation: fadeIn 0.6s 0.4s both;
}
.splash-badges {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeIn 0.8s 0.5s both;
}
.splash-badge {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}
.splash-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(26,115,232,0.5);
  animation: particleFloat 8s ease-in-out infinite;
}
@keyframes particleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-50px) scale(1.3); opacity: 0.7; }
}

/* =========================================================
   LANDING PAGE
   ========================================================= */
#landing {
  min-height: 100vh;
  display: none;
  flex-direction: column;
}
#landing.active { display: flex; }

/* Nav */
.land-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(26, 115, 232, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: all var(--t-base);
}
.land-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.land-logo span { color: var(--blue); }
.land-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.land-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 24px;
  transition: all var(--t-base);
  white-space: nowrap;
  position: relative;
}
.land-nav-link:hover {
  color: var(--blue);
  background: rgba(26, 115, 232, 0.04);
}
.land-nav-link.active {
  background: var(--blue-50);
  color: var(--blue);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.08);
}

/* Hero */
.hero {
  padding: 96px 60px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% -10%, rgba(26,115,232,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-50);
  color: var(--blue);
  padding: 6px 16px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid var(--blue-100);
}
.hero-title {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  max-width: 780px;
  margin-inline: auto;
}
.hero-title .highlight { color: var(--blue); }
.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.hero-stat { text-align: center; }
.hero-stat-number {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.hero-stat-number span { color: var(--blue); }
.hero-stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.hero-dash-mock {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}
.hero-dash-img {
  width: 100%;
  border-radius: var(--r-xl);
  box-shadow: 0 40px 120px rgba(26,115,232,0.2), 0 8px 32px rgba(0,0,0,0.1);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* Sections */
.section { padding: 80px 60px; }
.section-sm { padding: 60px; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.section-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.feature-card { padding: 24px; }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 24px;
}

/* Logos row */
.logos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
}
.logo-pill {
  padding: 8px 20px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--white);
}

/* Testimonial cards */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.testimonial-card { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.testimonial-stars { color: var(--yellow); font-size: 16px; letter-spacing: 2px; }
.testimonial-text { font-size: 15px; color: var(--text-secondary); line-height: 1.75; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
}

/* =========================================================
   AUTH PAGES
   ========================================================= */
.auth-shell {
  min-height: 100vh;
  height: 100vh;
  width: 100%;
  display: flex;
  background: var(--surface);
  padding: 0;
  overflow: hidden;
}
.auth-left {
  flex: 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: url('tech_background.png') no-repeat center center;
  background-size: cover;
  overflow-y: auto;
  position: relative;
}
.auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6,12,28,0.65) 0%, rgba(10,22,50,0.5) 100%);
  pointer-events: none;
  z-index: 0;
}
.auth-left > * { position: relative; z-index: 1; }
.auth-right {
  flex: 0.9;
  background: linear-gradient(135deg, #060d1a 0%, #0c182c 50%, #050b14 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  border-left: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}
.auth-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}
.auth-right::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(26,115,232,0.15) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.auth-right-content {
  position: relative;
  z-index: 2;
  max-width: 440px;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  padding: 44px;
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 24px 64px rgba(0, 30, 90, 0.2), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 1;
  animation: slideUp 0.5s var(--t-spring) both;
}
.auth-logo { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 28px; }
.auth-logo span { color: var(--blue); }
.auth-title { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.auth-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }
.auth-social { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  background: var(--white);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--t-fast);
}
.btn-social:hover { background: var(--surface-2); border-color: var(--blue); }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 12px;
  color: var(--text-tertiary);
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-form { display: flex; flex-direction: column; gap: 16px; }

/* =========================================================
   ONBOARDING / MULTI-STEP
   ========================================================= */
#onboarding-page {
  width: 100%;
  min-height: 100vh;
}
.onboarding-shell {
  min-height: 100vh;
  height: 100vh;
  width: 100%;
  background: url('tech_background.png') no-repeat center center;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}
.onboarding-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6,12,28,0.65) 0%, rgba(10,22,50,0.5) 100%);
  pointer-events: none;
  z-index: 0;
}
.onboarding-shell::after {
  content: '';
  position: absolute;
  bottom: -120px; left: -120px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52,168,83,0.15), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.onboarding-card {
  width: 100%;
  max-width: 560px;
  padding: 44px;
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 24px 64px rgba(0, 30, 90, 0.2), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 1;
  position: relative;
  animation: slideUp 0.5s var(--t-spring) both;
}
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}
.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-base);
  flex-shrink: 0;
}
.step-dot.active { background: var(--blue); color: #fff; }
.step-dot.done { background: var(--green); color: #fff; }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background var(--t-base);
}
.step-line.done { background: var(--green); }

/* =========================================================
   MAIN APP SHELL
   ========================================================= */
.app-shell {
  display: none;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: fixed;
  inset: 0;
}
.app-shell.active { display: flex; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width var(--t-base);
  flex-shrink: 0;
  overflow: hidden;
  z-index: 50;
  box-shadow: 2px 0 12px rgba(26,115,232,0.04);
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.sidebar-logo span { color: var(--blue); }
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--text-primary); }
.nav-item.active {
  background: var(--blue-50);
  color: var(--blue);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--blue);
  border-radius: 0 3px 3px 0;
}
.nav-item.active .nav-icon { color: var(--blue); }
.nav-icon { font-size: 20px; flex-shrink: 0; }
.nav-label { flex: 1; }
.nav-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--red);
  color: #fff;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  padding: 12px 12px 4px;
}
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ─── Collapsed sidebar state ─── */
.sidebar.collapsed .sidebar-logo,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-section-label {
  display: none !important;
}
.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 0 12px;
}
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px;
  gap: 0;
}
.sidebar.collapsed .nav-item.active::before {
  top: 10%; bottom: 10%;
}
.sidebar.collapsed .sidebar-nav {
  padding: 10px 6px;
}
.sidebar.collapsed .sidebar-footer {
  padding: 8px 6px;
}
/* Tooltip for collapsed items */
.sidebar.collapsed .nav-item[data-tooltip]::after {
  left: calc(100% + 10px);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}
.sidebar.collapsed .nav-item::after {
  content: attr(data-nav-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #1C2129;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 200;
}
.sidebar.collapsed .nav-item:hover::after {
  opacity: 1;
}
/* Scrollbar hide in sidebar */
.sidebar-nav::-webkit-scrollbar { width: 0; }

/* =========================================================
   MAP BREADCRUMB & FULLSCREEN
   ========================================================= */
.map-crumb {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 6px;
  transition: all 0.15s;
  white-space: nowrap;
}
.map-crumb:hover { color: #fff; background: rgba(255,255,255,0.1); }
.map-crumb.active { color: #fff; background: rgba(26,115,232,0.4); border: 1px solid rgba(26,115,232,0.6); }
.map-crumb-sep {
  color: rgba(255,255,255,0.25);
  font-size: 14px;
  padding: 0 2px;
  user-select: none;
}

/* Map fullscreen: cover entire viewport */
#view-maps.map-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  height: 100vh !important;
  z-index: 9000 !important;
}
#view-maps.map-fullscreen #map-topbar {
  padding: 12px 20px;
}

/* Map layer button strip */
.map-layer-btn {
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.map-layer-btn.active { background: var(--blue); color: #fff; }
.map-layer-btn:hover:not(.active) { background: rgba(255,255,255,0.12); color: #fff; }

/* App header */
.app-header {
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
  box-shadow: 0 1px 6px rgba(26,115,232,0.05);
}
.header-search {
  flex: 1;
  max-width: 420px;
}
.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.search-input:hover { border-color: var(--blue); background: var(--blue-50); color: var(--text-primary); }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--t-fast);
  position: relative;
  cursor: pointer;
}
.header-btn:hover { background: var(--surface-2); color: var(--text-primary); }
.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid var(--white);
}
.avatar-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* Main content area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* =========================================================
   DASHBOARD VIEW
   ========================================================= */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.kpi-card {
  padding: 22px;
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base);
  animation: kpiEntry 0.5s var(--t-spring) both;
}
.kpi-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-card:nth-child(2) { animation-delay: 0.10s; }
.kpi-card:nth-child(3) { animation-delay: 0.15s; }
.kpi-card:nth-child(4) { animation-delay: 0.20s; }
@keyframes kpiEntry {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.kpi-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.1;
}
.kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}
.kpi-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1;
}
.kpi-change {
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.kpi-change.up { color: var(--green); }
.kpi-change.down { color: var(--red); }
.kpi-icon {
  position: absolute;
  top: 18px; right: 18px;
  font-size: 30px;
  opacity: 0.18;
}

/* Charts */
.chart-container {
  position: relative;
  width: 100%;
}
.chart-canvas { width: 100%; display: block; }

/* Map */
.map-container {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #1a2744;
}
.map-canvas { width: 100%; display: block; }
.map-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-layer-btn {
  padding: 5px 12px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all var(--t-fast);
}
.map-layer-btn.active { background: var(--blue); border-color: var(--blue); }
.map-layer-btn:hover:not(.active) { background: rgba(255,255,255,0.25); }

/* AI recommendation widget */
.ai-rec-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--white);
  transition: all var(--t-fast);
  cursor: pointer;
}
.ai-rec-item:hover { border-color: var(--blue); background: var(--blue-50); }
.ai-rec-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--blue-50);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* =========================================================
   AI ASSISTANT
   ========================================================= */
.chat-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: calc(100vh - var(--header-height) - 48px);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.chat-msg {
  display: flex;
  gap: 12px;
  max-width: 100%;
}
.chat-msg.user { flex-direction: row-reverse; }
.chat-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.chat-avatar.ai {
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: #fff;
}
.chat-avatar.user { background: var(--surface-3); color: var(--text-secondary); }
.chat-bubble {
  max-width: 75%;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  font-size: 14px;
  line-height: 1.7;
}
.chat-bubble.ai {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px var(--r-lg) var(--r-lg) var(--r-lg);
}
.chat-bubble.user {
  background: var(--blue);
  color: #fff;
  border-radius: var(--r-lg) 4px var(--r-lg) var(--r-lg);
  margin-left: auto;
}
.chat-thinking {
  display: flex;
  gap: 4px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px var(--r-lg) var(--r-lg) var(--r-lg);
}
.chat-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-tertiary);
}
.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--white);
}
.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 8px 12px;
  transition: border-color var(--t-fast);
}
.chat-input-row:focus-within { border-color: var(--blue); }
.chat-textarea {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  resize: none;
  outline: none;
  line-height: 1.5;
  max-height: 120px;
  min-height: 20px;
}
.chat-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.quick-prompt {
  padding: 6px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.quick-prompt:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-50); }

/* =========================================================
   ANALYTICS
   ========================================================= */
.analytics-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}
.filter-select {
  padding: 7px 32px 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px;
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%235F6368' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 18px;
  outline: none;
  transition: border-color var(--t-fast);
}
.filter-select:focus { border-color: var(--blue); }
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.analytics-grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

/* =========================================================
   DATA CONNECTION
   ========================================================= */
.connector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.connector-card {
  padding: 20px 14px;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--t-base);
  background: var(--white);
  position: relative;
}
.connector-card:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: 0 8px 24px var(--shadow-color); }
.connector-card.connected { border-color: var(--green); }
.connector-card.connected::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 8px;
  width: 18px; height: 18px;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.connector-icon { font-size: 32px; margin-bottom: 8px; }
.connector-name { font-size: 12px; font-weight: 600; }

/* =========================================================
   PREDICTIVE INTELLIGENCE
   ========================================================= */
.prediction-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.prediction-card { padding: 24px; }
.confidence-ring {
  position: relative;
  width: 90px; height: 90px;
  flex-shrink: 0;
}
.confidence-ring svg { transform: rotate(-90deg); }
.confidence-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

/* =========================================================
   ALERTS
   ========================================================= */
.alert-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--r-md);
  border-left: 4px solid transparent;
}
.alert-item.critical { background: var(--red-50); border-left-color: var(--red); }
.alert-item.warn { background: var(--yellow-50); border-left-color: var(--yellow); }
.alert-item.info { background: var(--blue-50); border-left-color: var(--blue); }
.alert-item.resolved { background: var(--green-50); border-left-color: var(--green); }

/* =========================================================
   TEAM / COLLABORATION
   ========================================================= */
.task-col {
  flex: 1;
  min-width: 240px;
  background: var(--surface-2);
  border-radius: var(--r-lg);
  padding: 16px;
}
.task-col-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-card {
  background: var(--white);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  cursor: grab;
  transition: all var(--t-fast);
}
.task-card:hover { box-shadow: 0 4px 16px var(--shadow-color); transform: translateY(-1px); }

/* =========================================================
   REFERRAL CENTER
   ========================================================= */
.referral-code-display {
  background: linear-gradient(135deg, var(--blue-50), var(--green-50));
  border: 2px dashed var(--blue);
  border-radius: var(--r-lg);
  padding: 24px;
  text-align: center;
}
.referral-code {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
  color: var(--blue);
}
.milestone-bar {
  height: 8px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  overflow: hidden;
}
.milestone-progress {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 1s var(--t-spring);
}

/* =========================================================
   DROPDOWNS & MODALS
   ========================================================= */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  padding: 8px;
  z-index: 1005;
  animation: slideDown 0.18s ease both;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--t-fast);
}
.dropdown-item:hover { background: var(--surface-2); }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 20px;
  animation: fadeIn 0.2s both;
}
.modal {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 32px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.25s var(--t-spring) both;
}

/* Toast notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  font-size: 14px;
  font-weight: 500;
  min-width: 280px;
  max-width: 400px;
  animation: slideUp 0.3s var(--t-spring) both;
}
.toast.success { border-left: 4px solid var(--green); }
.toast.error   { border-left: 4px solid var(--red); }
.toast.info    { border-left: 4px solid var(--blue); }

/* =========================================================
   PROFILE & SETTINGS
   ========================================================= */
.settings-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav-item {
  padding: 9px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
}
.settings-nav-item:hover { background: var(--surface-2); color: var(--text-primary); }
.settings-nav-item.active { background: var(--blue-50); color: var(--blue); }
.settings-panel { display: none; }
.settings-panel.active { display: block; }
.settings-section { margin-bottom: 32px; }
.settings-section-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-info h4 { font-size: 14px; font-weight: 500; }
.settings-row-info p { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* =========================================================
   ADMIN CONSOLE
   ========================================================= */
.admin-stat { padding: 20px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 12px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--surface-2); }

/* =========================================================
   REPORTS VIEW
   ========================================================= */
.report-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  transition: all var(--t-fast);
}
.report-row:hover { border-color: var(--blue); transform: translateX(4px); }
.report-icon { font-size: 32px; }

/* =========================================================
   MAPS VIEW
   ========================================================= */
.map-full {
  height: calc(100vh - var(--header-height));
  position: relative;
  background: #12203A;
}
.map-controls {
  position: absolute;
  top: 16px; left: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}
.map-info-panel {
  position: absolute;
  bottom: 16px; right: 16px;
  width: 280px;
  z-index: 10;
}

/* =========================================================
   COMMUNITY FEEDBACK
   ========================================================= */
.feedback-priority {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-full);
}
.priority-critical { background: var(--red-50); color: var(--red); }
.priority-high { background: var(--yellow-50); color: #a07000; }
.priority-medium { background: var(--blue-50); color: var(--blue); }
.priority-low { background: var(--green-50); color: var(--green); }

/* =========================================================
   HELP CENTER
   ========================================================= */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 200px; padding-bottom: 16px; }
.faq-chevron { transition: transform var(--t-fast); }
.faq-item.open .faq-chevron { transform: rotate(180deg); }

/* =========================================================
   FOOTER
   ========================================================= */
.land-footer {
  background: #0A1628;
  color: rgba(255,255,255,0.65);
  padding: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand-name { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-brand-name span { color: var(--blue-light); }
.footer-brand-desc { font-size: 13px; line-height: 1.7; max-width: 240px; }
.footer-col-title { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 14px; letter-spacing: 0.02em; }
.footer-link {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 8px;
  transition: color var(--t-fast);
}
.footer-link:hover { color: #fff; }
.footer-divider { height: 1px; background: rgba(255,255,255,0.1); margin-bottom: 24px; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}
.footer-social { display: flex; gap: 12px; }
.footer-social-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: all var(--t-fast);
  font-size: 16px;
}
.footer-social-btn:hover { background: rgba(255,255,255,0.16); color: #fff; }

/* =========================================================
   PROGRESS BAR
   ========================================================= */
.progress-bar {
  height: 6px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--r-full);
  transition: width 1.2s var(--t-spring);
}

/* =========================================================
   QR CODE PLACEHOLDER
   ========================================================= */
.qr-placeholder {
  width: 120px; height: 120px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

/* View Header & Greeting Banner Layouts */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}
.greeting-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 18px 22px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, #1A73E8 0%, #0D47A1 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .section, .hero { padding: 60px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .land-nav-links { display: none; }
  .hero-title { font-size: 32px; }
  .settings-layout { grid-template-columns: 1fr; }
  .auth-right { display: none; }
  .auth-left { flex: 1; width: 100%; }
  .grid-responsive-3 { grid-template-columns: repeat(2, 1fr); }
  #land-mobile-menu-btn { display: flex !important; }
  /* Sidebar hidden on tablet; toggle opens it */
  .sidebar {
    display: flex !important;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    transform: translateX(-100%);
    z-index: 1002;
    transition: transform var(--t-base);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  #mobile-sidebar-toggle { display: flex !important; }
  .header-search { display: none !important; }
  .grid-responsive-4 { grid-template-columns: repeat(2, 1fr); }

  /* Settings horizontal scrolling navigation bar */
  .settings-nav {
    flex-direction: row !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    gap: 8px;
    scrollbar-width: none;
  }
  .settings-nav::-webkit-scrollbar {
    display: none;
  }
  .settings-nav-item {
    padding: 8px 16px !important;
    border-radius: var(--r-full) !important;
    flex-shrink: 0;
  }

  /* AI Assistant height adjust to avoid bottom-nav overlapping */
  #view-ai-assistant {
    height: calc(100vh - var(--header-height) - 64px) !important;
  }
  .chat-shell {
    max-height: calc(100vh - var(--header-height) - 64px) !important;
  }

  /* GIS Map height & info panel bottom clearance */
  #view-maps {
    height: calc(100vh - var(--header-height) - 64px) !important;
  }
  .map-info-panel {
    bottom: 80px !important;
    right: 16px !important;
    left: auto !important;
  }
}
@media (max-width: 768px) {
  .grid-responsive-dashboard-main { grid-template-columns: 1fr; }
  .grid-responsive-2 { grid-template-columns: 1fr; }
  .grid-responsive-3 { grid-template-columns: 1fr !important; }
  .profile-layout { grid-template-columns: 1fr; }
  .main-content.no-padding {
    padding: 0 !important;
    overflow: hidden !important;
  }

  /* Stack Map controls vertically on tablet/mobile screens */
  #map-topbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    background: rgba(10, 22, 50, 0.95) !important;
  }
  #map-breadcrumb {
    max-width: 100% !important;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
  }
  #map-breadcrumb::-webkit-scrollbar {
    display: none;
  }
  .map-crumb {
    flex-shrink: 0;
  }
  #map-topbar > div:last-child {
    justify-content: space-between !important;
    width: 100% !important;
  }
}
@media (max-width: 600px) {
  .dash-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .hero-stat-number { font-size: 24px; }
  .prediction-grid { grid-template-columns: 1fr; }
  .connector-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .land-footer { padding: 40px 24px; }
  .grid-responsive-3, .grid-responsive-4 { grid-template-columns: 1fr; }
  .grid-responsive-6 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  
  /* Center and fit dropdown menus on very narrow mobile screens */
  .dropdown {
    width: calc(100vw - 32px) !important;
    max-width: 350px !important;
    right: -40px !important;
  }
  
  /* Mobile navbar & view headers */
  .land-nav {
    padding: 0 16px;
    height: 56px;
  }
  .land-logo {
    font-size: 17px;
  }
  .land-nav > div:first-child > div:first-child {
    width: 28px !important;
    height: 28px !important;
  }
  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .view-header > div:last-child,
  .view-header > button {
    width: 100%;
  }
  .greeting-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
  }
  .greeting-banner > div:last-child {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  /* Compact content padding for mobile phones */
  .main-content {
    padding: 16px !important;
  }
  .app-header {
    padding: 0 12px !important;
    gap: 8px !important;
  }

  /* Horizontally scrollable quick prompt lists in AI Assistant chat */
  .chat-quick-btns {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    scrollbar-width: none;
  }
  .chat-quick-btns::-webkit-scrollbar {
    display: none;
  }
  .quick-prompt {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  .chat-input-area {
    padding: 12px 16px !important;
  }

  /* Floating full-width bottom sheet for statistics panel on mobile */
  .map-info-panel {
    bottom: 76px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
  }
}
@media (max-width: 400px) {
  .grid-responsive-6 { grid-template-columns: 1fr; }
}

/* Responsive Grid Base Classes */
.grid-responsive-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.grid-responsive-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-responsive-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.grid-responsive-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.grid-responsive-dashboard-main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}

/* Premium Data Table styling */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
  white-space: nowrap;
}
.data-table tr:hover {
  background: var(--surface-2);
}


/* Landing page mobile menu overlay styling */
.land-mobile-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--r-md);
  transition: all var(--t-fast);
  text-decoration: none;
  display: flex;
  align-items: center;
}
.land-mobile-link:hover {
  background: var(--blue-50);
  color: var(--blue);
}
.hide-mobile {
  display: inline;
}
@media (max-width: 600px) {
  .hide-mobile {
    display: none;
  }
}


/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────
   DRAG AND DROP, GESTURES & FLOATING INTERFACES
   ───────────────────────────────────────────────────────── */
.kpi-card[draggable="true"] {
  cursor: grab;
  user-select: none;
}
.kpi-card.dragging {
  opacity: 0.4;
  transform: scale(0.95);
  border: 2px dashed var(--blue) !important;
}
.kpi-card.drag-over {
  border: 2px solid var(--blue) !important;
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}
.dataset-card.selected-dataset {
  border: 2px solid var(--blue) !important;
  background: rgba(26, 115, 232, 0.08) !important;
}

/* Bottom Mobile Navigation Bar */
.bottom-nav-bar {
  display: none !important;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border);
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(26,115,232,0.08);
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  gap: 2px;
  border-radius: var(--r-sm);
  padding: 4px;
}
.bottom-nav-item:hover { color: var(--blue); }
.bottom-nav-item.active {
  color: var(--blue);
  font-weight: 700;
}
.bottom-nav-item span {
  font-size: 22px;
  transition: transform 0.2s;
}
.bottom-nav-item.active span { transform: scale(1.1); }

@media (max-width: 900px) {
  .bottom-nav-bar.visible-nav {
    display: flex !important;
  }
  #app-shell.active .main-content {
    padding-bottom: 80px !important;
  }
  .bottom-nav-bar.visible-nav ~ .fab-container {
    bottom: 80px !important;
  }
}

/* Floating Action Buttons */
.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 998;
}
.fab-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(26,115,232,0.35);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.fab-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,115,232,0.45);
}
.fab-btn:active { transform: scale(0.9); }
.fab-btn.emergency { background: var(--red); box-shadow: 0 4px 16px rgba(234,67,53,0.35); }
.fab-btn.emergency:hover { box-shadow: 0 8px 24px rgba(234,67,53,0.45); }
.fab-btn span { font-size: 24px; }

/* Floating AI Chat Overlay */
.floating-chat-overlay {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 340px;
  height: 440px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: 0 16px 48px rgba(0,0,0,0.18), 0 4px 12px rgba(26,115,232,0.1);
  display: none;
  flex-direction: column;
  z-index: 1001;
  overflow: hidden;
  animation: slideUp 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
.floating-chat-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--blue), #0D47A1);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.floating-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
}
.floating-chat-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  background: var(--white);
}
.floating-chat-input {
  flex: 1;
  padding: 9px 14px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  font-size: 13px;
  outline: none;
  background: var(--surface-2);
  color: var(--text-primary);
  transition: border-color var(--t-fast);
}
.floating-chat-input:focus { border-color: var(--blue); }

/* Shimmer skeleton cells */
.skeleton-cell {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--r-sm);
  height: 18px;
  width: 100%;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* =========================================================
   PREMIUM POLISH — View Transitions, Nav, Cards
   ========================================================= */

/* App view fade-in on active */
.app-view {
  animation: viewFadeIn 0.3s ease both;
}
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Nav section labels improved */
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  padding: 14px 14px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  opacity: 0.6;
}

/* Sidebar footer user row */
.sidebar-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast);
}
.sidebar-user-row:hover { background: var(--surface-2); }

/* Card hover lift — universal */
.card-lift {
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.card-lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(135deg, var(--blue), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Input group icon sizing */
.input-group .input-icon {
  font-size: 18px;
}

/* App view scrollbar refinement */
.main-content::-webkit-scrollbar { width: 4px; }
.main-content::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 2px; }

/* Tooltip */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1C2129;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-fast);
  z-index: 300;
}
[data-tooltip]:hover::after { opacity: 1; }

/* Report row hover */
.report-row:hover {
  border-color: var(--blue);
  background: var(--blue-50);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

/* Connector card hover shadow */
.connector-card:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Hero dashboard mock frame glow */
.hero-dash-img {
  animation: float 6s ease-in-out infinite;
}

/* =========================================================
   ADDITIONAL PREMIUM UI & INTERACTIVE EFFECTS
   ========================================================= */

/* Aurora Background */
.aurora-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,115,232,0.08) 0%, rgba(52,168,83,0.05) 50%, rgba(234,67,53,0.05) 100%);
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* Command Palette Items */
.command-item {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background var(--t-fast);
  color: var(--text-primary);
  font-size: 14px;
}
.command-item:hover, .command-item.selected {
  background: var(--surface-2);
}
.command-item span {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Accessibility Focus Visible Indicators */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--blue) !important;
  outline-offset: 3px !important;
}

/* Shimmer Skeleton Loader Cell */
.skeleton-cell {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer-effect 1.5s infinite linear;
  border-radius: var(--r-sm);
}
@keyframes shimmer-effect {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Magnetic Buttons & Card hover tilters */
.magnetic-btn {
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}
.card-hover-tilt {
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base) !important;
}
.card-hover-tilt:hover {
  transform: translateY(-4px) rotate(0.4deg) !important;
  box-shadow: var(--shadow-lg) !important;
  border-color: var(--blue) !important;
}

/* Ripple Button click classes */
.ripple-btn {
  position: relative;
  overflow: hidden;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-effect 0.65s linear;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Keyboard Shortcuts Helper Styles */
.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.shortcut-row:last-child {
  border-bottom: none;
}
.shortcut-key {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-width: 2.5px;
  padding: 2.5px 6px;
  border-radius: 5px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Large & 4K displays wrapper bounds */
.view-container-max {
  max-width: 1620px;
  margin: 0 auto;
  width: 100%;
}
@media (min-width: 1600px) {
  .dash-grid { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 340px) {
  /* Ultra-small screens adaptation */
  body { font-size: 13px; }
  .greeting-banner button { width: 100%; }
}

/* =========================================================
   PREMIUM GLASSMORPHIC DARK UI & GLOWS (UPDATED)
   ========================================================= */

/* Glassmorphic cards in Dark Mode */
[data-theme="dark"] .card, [data-theme="dark"] .kpi-card {
  background: rgba(22, 27, 39, 0.65) !important;
  backdrop-filter: blur(14px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .card:hover, [data-theme="dark"] .kpi-card:hover {
  background: rgba(26, 32, 46, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45), 0 0 20px rgba(26, 115, 232, 0.2) !important;
  transform: translateY(-4px) !important;
}

/* Background Ambient Glows for Light Mode */
[data-theme="light"] .main-content {
  position: relative;
  overflow-x: hidden;
}
[data-theme="light"] .main-content::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 115, 232, 0.04) 0%, rgba(26, 115, 232, 0) 70%);
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] .main-content::after {
  content: '';
  position: absolute;
  bottom: 10%;
  left: -5%;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 168, 83, 0.03) 0%, rgba(52, 168, 83, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Background Ambient Glows */
[data-theme="dark"] .main-content {
  position: relative;
  overflow-x: hidden;
}

[data-theme="dark"] .main-content::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 115, 232, 0.08) 0%, rgba(26, 115, 232, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] .main-content::after {
  content: '';
  position: absolute;
  bottom: 10%;
  left: -5%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 168, 83, 0.06) 0%, rgba(52, 168, 83, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Premium gradient headers */
[data-theme="dark"] .greeting-banner {
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.25) 0%, rgba(13, 32, 64, 0.4) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 8px 32px 0 rgba(26, 115, 232, 0.15) !important;
}

/* Neon glow indicator dots */
.status-dot.online {
  box-shadow: 0 0 8px var(--green);
  animation: pulse-glow-dot 2s infinite ease-in-out;
}

@keyframes pulse-glow-dot {
  0%, 100% { box-shadow: 0 0 4px var(--green); }
  50% { box-shadow: 0 0 12px var(--green); }
}

/* Interactive elements transitions */
.btn {
  transition: all var(--t-fast) !important;
}
.btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
}

/* Selected active state for dataset cards */
.selected-dataset {
  border: 2px solid var(--blue) !important;
  background: rgba(26, 115, 232, 0.08) !important;
  box-shadow: 0 0 16px rgba(26, 115, 232, 0.25) !important;
}

/* Glassmorphic Navbar improvements in Dark Mode */
[data-theme="dark"] .app-header {
  background: rgba(15, 17, 23, 0.75) !important;
  backdrop-filter: blur(14px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"] .search-input {
  background: rgba(22, 27, 39, 0.65) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--text-secondary);
}

[data-theme="dark"] .search-input:hover {
  background: rgba(26, 115, 232, 0.08) !important;
  border-color: var(--blue) !important;
  color: var(--text-primary);
}

[data-theme="dark"] .header-btn:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text-primary);
}

[data-theme="dark"] .notif-badge {
  border-color: rgba(15, 17, 23, 0.75) !important;
}

/* =========================================================
   PREMIUM GLASSMORPHIC AUTH CARD & INPUTS (LIGHT/DARK)
   ========================================================= */

/* Auth Card Light Theme Override */
[data-theme="light"] .auth-card {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 24px 64px rgba(0, 30, 90, 0.08) !important;
}

/* Auth Card Dark Theme Override */
[data-theme="dark"] .auth-card {
  background: rgba(22, 27, 39, 0.45) !important;
  backdrop-filter: blur(20px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  color: #fff !important;
}

[data-theme="dark"] .auth-logo { color: #fff !important; }
[data-theme="dark"] .auth-title { color: #fff !important; }
[data-theme="dark"] .auth-subtitle { color: rgba(255, 255, 255, 0.6) !important; }
[data-theme="dark"] .auth-divider { color: rgba(255, 255, 255, 0.4) !important; }
[data-theme="dark"] .auth-divider::before,
[data-theme="dark"] .auth-divider::after {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Glassmorphic inputs in Auth Cards depending on Theme */
[data-theme="light"] .auth-card .input {
  background: rgba(255, 255, 255, 0.6) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #000 !important;
}
[data-theme="light"] .auth-card .input::placeholder {
  color: rgba(0, 0, 0, 0.3) !important;
}
[data-theme="light"] .auth-card .input:focus {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1) !important;
}

[data-theme="dark"] .auth-card .input {
  background: rgba(15, 17, 23, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}
[data-theme="dark"] .auth-card .input::placeholder {
  color: rgba(255, 255, 255, 0.3) !important;
}
[data-theme="dark"] .auth-card .input:focus {
  background: rgba(15, 17, 23, 0.75) !important;
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2) !important;
}

[data-theme="dark"] .btn-social {
  background: rgba(30, 37, 55, 0.65) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
}
[data-theme="dark"] .btn-social:hover {
  background: rgba(26, 115, 232, 0.08) !important;
  border-color: var(--blue) !important;
}

/* Responsive auth card adjustments for smaller devices */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px !important;
  }
}

/* =========================================================
   PREMIUM REFERRAL CENTER GLASSMORPHIC STYLING
   ========================================================= */

/* Glassmorphic cards in Referral view */
[data-theme="light"] #view-referral .card {
  background: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: blur(14px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 91, 191, 0.04) !important;
}

/* Referral code dash border block */
[data-theme="light"] .referral-code-display {
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.04), rgba(52, 168, 83, 0.04)) !important;
  border: 1.5px dashed rgba(26, 115, 232, 0.4) !important;
}
[data-theme="dark"] .referral-code-display {
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.1), rgba(52, 168, 83, 0.1)) !important;
  border: 1.5px dashed rgba(26, 115, 232, 0.6) !important;
}

/* QR Code placeholder border alignment */
.qr-placeholder {
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}
[data-theme="dark"] .qr-placeholder {
  background: rgba(15, 17, 23, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Social Share Button Grid */
.social-share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.btn-share-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
}
.btn-share-social span {
  transition: transform var(--t-fast);
}
.btn-share-social:hover {
  transform: translateY(-2px);
  color: #fff !important;
}
.btn-share-social:hover span {
  transform: scale(1.1);
}

/* Platform-specific premium glowing borders & backdrops */
.btn-share-social[data-platform="email"]:hover {
  background: rgba(26, 115, 232, 0.15) !important;
  border-color: #1a73e8 !important;
  box-shadow: 0 0 12px rgba(26, 115, 232, 0.3) !important;
  color: #1a73e8 !important;
}
.btn-share-social[data-platform="whatsapp"]:hover {
  background: rgba(37, 211, 102, 0.15) !important;
  border-color: #25d366 !important;
  box-shadow: 0 0 12px rgba(37, 211, 102, 0.3) !important;
  color: #25d366 !important;
}
.btn-share-social[data-platform="x"]:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: #fff !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}
[data-theme="light"] .btn-share-social[data-platform="x"]:hover {
  background: rgba(0, 0, 0, 0.08) !important;
  border-color: #000 !important;
  color: #000 !important;
}
.btn-share-social[data-platform="facebook"]:hover {
  background: rgba(24, 119, 242, 0.15) !important;
  border-color: #1877f2 !important;
  box-shadow: 0 0 12px rgba(24, 119, 242, 0.3) !important;
  color: #1877f2 !important;
}
.btn-share-social[data-platform="linkedin"]:hover {
  background: rgba(10, 102, 194, 0.15) !important;
  border-color: #0a66c2 !important;
  box-shadow: 0 0 12px rgba(10, 102, 194, 0.3) !important;
  color: #0a66c2 !important;
}

/* =========================================================
   PREMIUM GLASSMORPHIC ONBOARDING PAGE & CARDS (LIGHT/DARK)
   ========================================================= */

/* Onboarding Card Light Theme Override */
[data-theme="light"] .onboarding-card {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 24px 64px rgba(0, 30, 90, 0.08) !important;
}

/* Onboarding Card Dark Theme Override */
[data-theme="dark"] .onboarding-card {
  background: rgba(22, 27, 39, 0.45) !important;
  backdrop-filter: blur(20px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  color: #fff !important;
}

/* Make onboarding headings and text dark-mode aware */
[data-theme="dark"] .onboarding-card h2 { color: #fff !important; }
[data-theme="dark"] .onboarding-card p { color: rgba(255, 255, 255, 0.6) !important; }
[data-theme="dark"] .onboarding-card .label { color: rgba(255, 255, 255, 0.7) !important; }

/* Onboarding inputs and select elements */
[data-theme="light"] .onboarding-card .input,
[data-theme="light"] .onboarding-card .select-input {
  background: rgba(255, 255, 255, 0.6) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  color: #000 !important;
}
[data-theme="light"] .onboarding-card .input:focus,
[data-theme="light"] .onboarding-card .select-input:focus {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1) !important;
}

[data-theme="dark"] .onboarding-card .input,
[data-theme="dark"] .onboarding-card .select-input {
  background: rgba(15, 17, 23, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}
[data-theme="dark"] .onboarding-card .input:focus,
[data-theme="dark"] .onboarding-card .select-input:focus {
  background: rgba(15, 17, 23, 0.75) !important;
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2) !important;
}

/* Step indicator dots styling */
[data-theme="dark"] .step-dot:not(.active):not(.done) {
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
[data-theme="dark"] .step-line:not(.done) {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* Glassmorphic Connector Cards (Step 2) */
[data-theme="dark"] .onboarding-card .connector-card {
  background: rgba(15, 17, 23, 0.45) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.7) !important;
}
[data-theme="dark"] .onboarding-card .connector-card:hover {
  background: rgba(26, 115, 232, 0.08) !important;
  border-color: var(--blue) !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}
[data-theme="dark"] .onboarding-card .connector-card.connected {
  border-color: var(--green) !important;
  background: rgba(52, 168, 83, 0.08) !important;
  color: #fff !important;
}

/* Inline code tags in tip box */
[data-theme="dark"] .onboarding-card code {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--blue) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Mobile responsive padding for onboarding */
@media (max-width: 480px) {
  .onboarding-card {
    padding: 28px 16px !important;
  }
  .step-indicator {
    margin-bottom: 24px !important;
  }
}

/* Sub-page overlay entry/exit transitions */
.sub-page-overlay {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.sub-page-overlay.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* =========================================================
   PAGE TRANSITIONS, MIC PULSE & BUTTON CLICK EFFECTS
   ========================================================= */

/* Smooth page slide-up fade-in transition */
.app-view.active {
  animation: viewFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Voice listening mic pulse animation */
@keyframes voicePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(234, 67, 53, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(234, 67, 53, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(234, 67, 53, 0);
  }
}
.listening-pulse {
  animation: voicePulse 1.4s infinite !important;
  color: var(--red) !important;
  background: var(--red-50) !important;
}

/* Button active click scale down feedback */
.btn:active, .fab-btn:active, .bottom-nav-item:active {
  transform: scale(0.96) !important;
}

/* Custom fadeSlideIn entry for dynamic card creations */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


