/* ==========================================================================
   v2 Site Theme (STAFF-ONLY PREVIEW)
   ==========================================================================
   This is a pure reskin: every rule here is scoped under
   [data-ui-theme="v2"], which base.html only sets when the signed-in user
   has Profile.layout_preference set to 'dock' (staff-only for now, see
   users/views.py).

   Nothing in this file introduces new markup, links, or behaviour - it
   restyles the SAME navbar.html / first.html elements everyone already
   uses (.site-header, .navbar-brand, .hero-section, .feature-card, ...).
   That's deliberate: when this becomes the default theme, no template
   changes are required beyond flipping the default of layout_preference
   (and optionally deleting this comment + the classic-only overrides it
   does not touch).

   Colors all resolve through the CSS variables in modern-theme.css, so
   dark mode and the per-user accent colour continue to work exactly as
   they do today.
   ========================================================================== */

/* ---------- Glass navbar ----------
   Same .bg-steel gradient, just translucent + blurred instead of solid,
   with a persistent glowing underline (always on, not just on scroll so
   the effect actually reads at a glance) and a stronger shadow once
   scrolled (toggled by v2-enhance.js). Text stays white because the
   tinted/blurred backdrop is always the saturated primary/violet
   gradient, in both light and dark mode. */
[data-ui-theme="v2"] .site-header .navbar.bg-steel {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary-500) 62%, transparent) 0%, color-mix(in srgb, var(--violet-600) 62%, transparent) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 8px 24px -12px rgba(17, 24, 39, 0.45);
  transition: box-shadow 0.3s ease, padding 0.3s ease, background-color 0.3s ease;
}
[data-ui-theme="v2"] .site-header.v2-scrolled .navbar.bg-steel {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 12px 34px -10px rgba(17, 24, 39, 0.55);
}
[data-ui-theme="v2"] .site-header .navbar-brand {
  color: #ffffff !important;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
/* Unmistakable confirmation that the v2 theme is active, visible on every
   page (the navbar is shared), independent of how subtle the glass effect
   itself looks against any given background. */
[data-ui-theme="v2"] .site-header .navbar-brand::after {
  content: 'BETA';
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
}

/* ---------- Hero section (home + any page sharing the design system) ----------
   base.html wraps {% block content %} in <main class="container"><div
   class="row">, which boxes in anything rendered inside it. That ".row" is
   a flex container, so these <section>s are unstretched flex items there -
   the usual "100vw + margin: calc(-50vw + 50%)" breakout trick assumes a
   normal full-width block child and resolves its 50% against the WRONG
   containing block in a flex context, which corrupted the layout badly
   (see history). Instead of resizing the section itself (and risking that
   again), v2-enhance.js injects a purely decorative .v2-bleed-bg layer -
   absolutely positioned, sized to the viewport via getBoundingClientRect,
   z-indexed behind the content. The section's own box (width, margin,
   flex participation) is never touched, so it can't break flex-wrap. */
[data-ui-theme="v2"] .hero-section,
[data-ui-theme="v2"] .v2-stats-strip {
  position: relative;
  overflow: hidden;
}
[data-ui-theme="v2"] .v2-bleed-bg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
[data-ui-theme="v2"] .hero-section .v2-bleed-bg {
  background: var(--bg-card);
}
[data-ui-theme="v2"] .v2-stats-strip .v2-bleed-bg {
  background: linear-gradient(120deg, color-mix(in srgb, var(--primary-500) 10%, transparent), color-mix(in srgb, var(--violet-500) 10%, transparent)), var(--bg-card-hover);
}

.v2-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
  animation: v2-float 12s ease-in-out infinite;
}
[data-theme="dark"] .v2-blob { opacity: 0.32; }
.v2-blob-1 {
  width: 380px; height: 380px;
  top: -120px; right: -100px;
  background: linear-gradient(135deg, var(--primary-400), var(--violet-500));
}
.v2-blob-2 {
  width: 300px; height: 300px;
  bottom: -110px; left: -90px;
  background: linear-gradient(135deg, var(--violet-500), var(--primary-600));
  animation-delay: -6s;
}
@keyframes v2-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 26px) scale(1.06); }
}
/* keep hero copy/buttons above the blobs */
[data-ui-theme="v2"] .hero-section > .container {
  position: relative;
  z-index: 1;
}

[data-ui-theme="v2"] .hero-title {
  background: linear-gradient(135deg, var(--primary-500), var(--violet-600));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-ui-theme="v2"] .img-hero {
  animation: v2-floaty 6s ease-in-out infinite;
}
@keyframes v2-floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ---------- Reimagined hero extras (first_reimagined.html only) ---------- */
[data-ui-theme="v2"] .v2-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: color-mix(in srgb, var(--primary-500) 10%, transparent);
  color: var(--primary-500);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full, 999px);
  margin-bottom: 1.25rem;
}
[data-ui-theme="v2"] .v2-eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary-500);
  animation: v2-pulse-dot 1.8s ease-in-out infinite;
}
@keyframes v2-pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

[data-ui-theme="v2"] .v2-hero-visual { z-index: 1; }
[data-ui-theme="v2"] .v2-float-card {
  position: absolute;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  animation: v2-floaty 5s ease-in-out infinite;
  transition: opacity 0.4s ease;
}
/* Toggled by v2-enhance.js while it swaps a slot's icon/text between the
   HERO_SHOWCASE entries - opacity only (not transform), so it doesn't
   fight the floaty keyframe animation above, which already animates
   transform continuously. */
[data-ui-theme="v2"] .v2-float-card.v2-fade-out {
  opacity: 0;
}
[data-ui-theme="v2"] .v2-float-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}
[data-ui-theme="v2"] .v2-float-card-1 { top: -1.5rem; left: -1.5rem; animation-delay: -1.5s; }
[data-ui-theme="v2"] .v2-float-card-1 .v2-float-icon { background: linear-gradient(135deg, var(--success-500), var(--success-600)); }
[data-ui-theme="v2"] .v2-float-card-2 { bottom: -1.5rem; right: -1rem; animation-delay: -3s; }
[data-ui-theme="v2"] .v2-float-card-2 .v2-float-icon { background: linear-gradient(135deg, var(--violet-500), var(--violet-600)); }
@media (max-width: 991px) {
  [data-ui-theme="v2"] .v2-float-card { display: none; }
}

[data-ui-theme="v2"] .v2-stats-strip {
  padding: 3rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
[data-ui-theme="v2"] .v2-stats-strip .container { position: relative; z-index: 1; }
[data-ui-theme="v2"] .v2-stat-num {
  font-weight: 800;
  font-size: 2.6rem;
  background: linear-gradient(135deg, var(--primary-500), var(--violet-600));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-ui-theme="v2"] .v2-stat-label {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
}

/* ---------- Scroll reveal (feature cards + section titles) ---------- */
[data-ui-theme="v2"] .v2-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-ui-theme="v2"] .v2-reveal.v2-in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- How it works: connecting line between numbered steps ---------- */
[data-ui-theme="v2"] .step-icon {
  position: relative;
  z-index: 1;
}
[data-ui-theme="v2"] .d-flex.align-items-center.mb-4 > .step-icon::after {
  content: '';
  position: absolute;
  top: 50px;
  left: 24px;
  width: 2px;
  height: 56px;
  background: linear-gradient(180deg, var(--primary-500), var(--violet-600));
  opacity: 0.35;
}

/* ---------- Buttons: slightly more lift on hover ---------- */
[data-ui-theme="v2"] .btn-primary-custom:hover,
[data-ui-theme="v2"] .btn-outline-custom:hover {
  transform: translateY(-4px);
}

@media (max-width: 768px) {
  .v2-blob { display: none; }
}

/* ==========================================================================

/* ==========================================================================
   v2 App-Shell Navbar & Layout - Top Bar + Bottom Dock
   ==========================================================================
   Styles for the dedicated v2 navbar template (blog/templates/blog/navbar_v2.html)
   and the v2 first-page enhancements (bento grid, live strip, trust strip).
   Everything is scoped under [data-ui-theme="v2"] so classic users see nothing.
   ========================================================================== */

[data-ui-theme="v2"] {
  --v2-topbar-height: 64px;
  --v2-dock-height: 64px;
  --v2-dock-height-mobile: 60px;
}

/* ---------- Layout shell ---------- */
[data-ui-theme="v2"].v2-shell {
  margin-top: 0;
}

[data-ui-theme="v2"].v2-shell main.container {
  padding-top: calc(var(--v2-topbar-height) + 1.5rem);
  padding-bottom: calc(var(--v2-dock-height) + 2rem);
  transition: padding 0.25s ease;
}

@media (max-width: 767.98px) {
  [data-ui-theme="v2"].v2-shell main.container {
    padding-top: calc(var(--v2-topbar-height) + 1rem);
    padding-bottom: calc(var(--v2-dock-height-mobile) + 1.25rem);
  }
}

/* ---------- Top bar ---------- */
[data-ui-theme="v2"] .v2-topbar {
  height: var(--v2-topbar-height);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary-500) 78%, transparent) 0%, color-mix(in srgb, var(--violet-600) 78%, transparent) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 10px 30px -12px rgba(17, 24, 39, 0.45);
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--radius-xl, 16px);
}

[data-ui-theme="v2"] .v2-topbar-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

[data-ui-theme="v2"] .v2-brand {
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

[data-ui-theme="v2"] .v2-brand::after {
  content: "BETA";
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
}

[data-ui-theme="v2"] .v2-brand:hover {
  color: #ffffff;
}

/* Search bar - dominant center element */
[data-ui-theme="v2"] .v2-searchbar form,
[data-ui-theme="v2"] .v2-mobile-search form {
  position: relative;
  width: 520px;
  max-width: 50vw;
}

[data-ui-theme="v2"] .v2-mobile-search form {
  width: 100%;
  max-width: none;
}

[data-ui-theme="v2"] .v2-searchbar input,
[data-ui-theme="v2"] .v2-mobile-search input {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-full, 999px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 0 2.8rem 0 1.25rem;
  font-size: 0.95rem;
  outline: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-ui-theme="v2"] .v2-searchbar input::placeholder,
[data-ui-theme="v2"] .v2-mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

[data-ui-theme="v2"] .v2-searchbar input:focus,
[data-ui-theme="v2"] .v2-mobile-search input:focus {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

[data-ui-theme="v2"] .v2-search-btn {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

[data-ui-theme="v2"] .v2-search-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

[data-ui-theme="v2"] .v2-mobile-search {
  position: absolute;
  top: var(--v2-topbar-height);
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--violet-600) 100%);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

[data-ui-theme="v2"] .v2-mobile-search.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Top bar actions */
[data-ui-theme="v2"] .v2-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

[data-ui-theme="v2"] .v2-action-btn,
[data-ui-theme="v2"] .v2-btn-ghost,
[data-ui-theme="v2"] .v2-btn-primary,
[data-ui-theme="v2"] .v2-icon-btn {
  height: 40px;
  border-radius: var(--radius-full, 999px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

[data-ui-theme="v2"] .v2-icon-btn {
  width: 40px;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

[data-ui-theme="v2"] .v2-icon-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

[data-ui-theme="v2"] .v2-action-btn {
  width: 40px;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  position: relative;
}

[data-ui-theme="v2"] .v2-action-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

[data-ui-theme="v2"] .v2-action-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary-500);
}

[data-ui-theme="v2"] .v2-btn-ghost {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

[data-ui-theme="v2"] .v2-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

[data-ui-theme="v2"] .v2-btn-primary {
  background: #ffffff;
  color: var(--primary-600);
}

[data-ui-theme="v2"] .v2-btn-primary:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Profile dropdown */
[data-ui-theme="v2"] .v2-profile-btn {
  height: 40px;
  border-radius: var(--radius-full, 999px);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: none;
  padding: 0.2rem 0.85rem 0.2rem 0.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

[data-ui-theme="v2"] .v2-profile-btn:hover,
[data-ui-theme="v2"] .v2-profile-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.22);
}

[data-ui-theme="v2"] .v2-profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* Override base.html dropdown !important rules for the v2 profile menu */
html:not([data-theme="dark"]) body.v2-shell .site-header .v2-dropdown-menu,
html:not([data-theme="dark"]) body.v2-shell .v2-dropdown-menu {
  background-color: var(--bg-elevated) !important;
  border-color: var(--border-light) !important;
  border-radius: var(--radius-xl, 16px) !important;
  box-shadow: var(--shadow-xl) !important;
  padding: 0.5rem !important;
  min-width: 220px !important;
  margin-top: 0.5rem !important;
}

html:not([data-theme="dark"]) body.v2-shell .v2-dropdown-menu .dropdown-item,
html:not([data-theme="dark"]) body.v2-shell .v2-dropdown-menu .dropdown-item {
  color: var(--text-primary) !important;
  border-radius: var(--radius-md, 10px) !important;
  padding: 0.55rem 0.75rem !important;
  font-weight: 500 !important;
}

html:not([data-theme="dark"]) body.v2-shell .v2-dropdown-menu .dropdown-item:hover,
html:not([data-theme="dark"]) body.v2-shell .v2-dropdown-menu .dropdown-item:focus {
  background-color: var(--bg-hover) !important;
  color: var(--text-link) !important;
}

html[data-theme="dark"] body.v2-shell .site-header .v2-dropdown-menu,
html[data-theme="dark"] body.v2-shell .v2-dropdown-menu {
  background-color: var(--bg-elevated) !important;
  border-color: var(--border-strong) !important;
  border-radius: var(--radius-xl, 16px) !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.25) !important;
  padding: 0.5rem !important;
  min-width: 220px !important;
  margin-top: 0.5rem !important;
}

html[data-theme="dark"] body.v2-shell .v2-dropdown-menu .dropdown-item,
html[data-theme="dark"] body.v2-shell .v2-dropdown-menu .dropdown-item {
  color: var(--text-primary) !important;
  border-radius: var(--radius-md, 10px) !important;
  padding: 0.55rem 0.75rem !important;
  font-weight: 500 !important;
}

html[data-theme="dark"] body.v2-shell .v2-dropdown-menu .dropdown-item:hover,
html[data-theme="dark"] body.v2-shell .v2-dropdown-menu .dropdown-item:focus {
  background-color: var(--bg-card-hover) !important;
  color: var(--text-link) !important;
}

/* ---------- Bottom Dock ---------- */
[data-ui-theme="v2"] .v2-dock {
  height: var(--v2-dock-height);
  padding: 0 0.5rem;
  border-radius: var(--radius-full, 999px);
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg-card) 92%, transparent) 0%, color-mix(in srgb, var(--bg-elevated) 92%, transparent) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-light);
  box-shadow: 0 12px 34px -10px rgba(17, 24, 39, 0.35), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

[data-ui-theme="v2"] .v2-dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 68px;
  height: calc(var(--v2-dock-height) - 10px);
  border-radius: var(--radius-full, 999px);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 700;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

[data-ui-theme="v2"] .v2-dock-item i {
  font-size: 1.05rem;
  transition: transform 0.2s ease;
}

[data-ui-theme="v2"] .v2-dock-item:hover,
[data-ui-theme="v2"] .v2-dock-item:focus {
  color: var(--primary-500);
  background: var(--bg-hover);
}

[data-ui-theme="v2"] .v2-dock-item:hover i,
[data-ui-theme="v2"] .v2-dock-item:focus i {
  transform: translateY(-2px);
}

[data-ui-theme="v2"] .v2-dock-item.active {
  color: var(--primary-500);
  background: var(--primary-100);
}

[data-ui-theme="v2"] .v2-dock-item.active::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary-500);
}

@media (max-width: 767.98px) {
  [data-ui-theme="v2"] .v2-dock {
    height: var(--v2-dock-height-mobile);
    width: 100%;
    border-radius: 0;
    justify-content: space-around;
    gap: 0;
    padding: 0;
  }
  [data-ui-theme="v2"] .v2-dock-item {
    min-width: 0;
    flex: 1;
    height: var(--v2-dock-height-mobile);
    border-radius: 0;
    font-size: 0.65rem;
  }
  [data-ui-theme="v2"] .v2-dock-item i {
    font-size: 1.1rem;
  }
}

/* ---------- Dock More Panel ---------- */
[data-ui-theme="v2"] .v2-dock-panel-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1035;
}

[data-ui-theme="v2"] .v2-dock-panel-backdrop.open {
  display: block;
}

[data-ui-theme="v2"] .v2-dock-panel {
  position: fixed;
  left: 50%;
  bottom: calc(var(--v2-dock-height) + 1rem);
  transform: translateX(-50%) translateY(120%);
  width: min(560px, calc(100vw - 2rem));
  max-height: 70vh;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl, 20px);
  box-shadow: var(--shadow-xl);
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-ui-theme="v2"] .v2-dock-panel.open {
  transform: translateX(-50%) translateY(0);
}

[data-ui-theme="v2"] .v2-dock-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

[data-ui-theme="v2"] .v2-dock-panel-title {
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0;
  color: var(--text-primary);
}

[data-ui-theme="v2"] .v2-dock-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-hover);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

[data-ui-theme="v2"] .v2-dock-panel-close:hover {
  background: var(--bg-active);
  color: var(--text-primary);
}

[data-ui-theme="v2"] .v2-dock-panel-body {
  overflow-y: auto;
  padding: 1rem 1.25rem;
  scrollbar-width: thin;
}

[data-ui-theme="v2"] .v2-dock-group {
  margin-bottom: 1.25rem;
}

[data-ui-theme="v2"] .v2-dock-group-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: block;
}

[data-ui-theme="v2"] .v2-dock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}

[data-ui-theme="v2"] .v2-dock-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-lg, 12px);
  background: var(--bg-body-solid);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.15s ease;
  position: relative;
}

[data-ui-theme="v2"] .v2-dock-grid-item:hover {
  background: var(--bg-hover);
  border-color: var(--primary-300);
  transform: translateY(-2px);
  color: var(--primary-600);
}

[data-ui-theme="v2"] .v2-dock-grid-item i {
  font-size: 1.1rem;
}

[data-ui-theme="v2"] .v2-dock-grid-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger-500);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767.98px) {
  [data-ui-theme="v2"] .v2-dock-panel {
    left: 0;
    right: 0;
    bottom: var(--v2-dock-height-mobile);
    width: auto;
    transform: translateY(120%);
    border-radius: var(--radius-2xl, 20px) var(--radius-2xl, 20px) 0 0;
    max-height: 65vh;
  }
  [data-ui-theme="v2"] .v2-dock-panel.open {
    transform: translateY(0);
  }
}

/* ---------- Section headings shared ---------- */
[data-ui-theme="v2"] .v2-section-heading {
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 0;
  letter-spacing: -0.02em;
}

[data-ui-theme="v2"] .v2-link-arrow {
  color: var(--primary-500);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

[data-ui-theme="v2"] .v2-link-arrow:hover {
  color: var(--primary-600);
}

/* ---------- Live activity strip ---------- */
[data-ui-theme="v2"] .v2-live-strip {
  padding: 3rem 0;
  background: var(--bg-body-solid);
  border-bottom: 1px solid var(--border-light);
}

[data-ui-theme="v2"] .v2-live-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-xl, 16px);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text-primary);
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

[data-ui-theme="v2"] .v2-live-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-300);
}

[data-ui-theme="v2"] .v2-live-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #ffffff;
  flex-shrink: 0;
}

[data-ui-theme="v2"] .v2-live-card-event .v2-live-icon { background: linear-gradient(135deg, var(--primary-400), var(--primary-600)); }
[data-ui-theme="v2"] .v2-live-card-chat .v2-live-icon { background: linear-gradient(135deg, #34d399, #059669); }
[data-ui-theme="v2"] .v2-live-card-finance .v2-live-icon { background: linear-gradient(135deg, #fbbf24, #d97706); }
[data-ui-theme="v2"] .v2-live-card-actions .v2-live-icon { background: linear-gradient(135deg, #f87171, #dc2626); }

[data-ui-theme="v2"] .v2-live-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

[data-ui-theme="v2"] .v2-live-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}

[data-ui-theme="v2"] .v2-live-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

[data-ui-theme="v2"] .v2-live-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

/* ---------- Bento feature grid ---------- */
[data-ui-theme="v2"] .v2-bento-section {
  padding: 4rem 0;
  background: var(--bg-body-solid);
}

[data-ui-theme="v2"] .v2-bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

[data-ui-theme="v2"] .v2-bento-card {
  grid-column: span 6;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl, 20px);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  min-height: 220px;
}

[data-ui-theme="v2"] .v2-bento-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-300);
  color: var(--text-primary);
}

[data-ui-theme="v2"] .v2-bento-large {
  grid-column: span 7;
  grid-row: span 2;
  min-height: 460px;
}

[data-ui-theme="v2"] .v2-bento-wide {
  grid-column: span 12;
}

[data-ui-theme="v2"] .v2-bento-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.25;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

[data-ui-theme="v2"] .v2-bento-card:hover .v2-bento-glow {
  opacity: 0.4;
  transform: scale(1.1);
}

[data-ui-theme="v2"] .v2-bento-chat .v2-bento-glow { background: linear-gradient(135deg, var(--primary-500), var(--violet-500)); }
[data-ui-theme="v2"] .v2-bento-calendar .v2-bento-glow { background: linear-gradient(135deg, #38bdf8, #0284c7); }
[data-ui-theme="v2"] .v2-bento-finance .v2-bento-glow { background: linear-gradient(135deg, #34d399, #059669); }
[data-ui-theme="v2"] .v2-bento-security .v2-bento-glow { background: linear-gradient(135deg, #fbbf24, #d97706); }

[data-ui-theme="v2"] .v2-bento-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

[data-ui-theme="v2"] .v2-bento-chat .v2-bento-icon { background: linear-gradient(135deg, var(--primary-500), var(--violet-600)); }
[data-ui-theme="v2"] .v2-bento-calendar .v2-bento-icon { background: linear-gradient(135deg, #38bdf8, #0284c7); }
[data-ui-theme="v2"] .v2-bento-finance .v2-bento-icon { background: linear-gradient(135deg, #34d399, #059669); }
[data-ui-theme="v2"] .v2-bento-security .v2-bento-icon { background: linear-gradient(135deg, #fbbf24, #d97706); }

[data-ui-theme="v2"] .v2-bento-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

[data-ui-theme="v2"] .v2-bento-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  position: relative;
  z-index: 1;
}

[data-ui-theme="v2"] .v2-bento-cta {
  margin-top: auto;
  font-weight: 700;
  color: var(--primary-500);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s ease;
  position: relative;
  z-index: 1;
}

[data-ui-theme="v2"] .v2-bento-card:hover .v2-bento-cta {
  gap: 0.65rem;
}

@media (max-width: 991.98px) {
  [data-ui-theme="v2"] .v2-bento-card,
  [data-ui-theme="v2"] .v2-bento-large,
  [data-ui-theme="v2"] .v2-bento-wide {
    grid-column: span 12;
    min-height: 180px;
  }
  [data-ui-theme="v2"] .v2-bento-large {
    grid-row: auto;
  }
}

/* ---------- Trust / testimonial strip ---------- */
[data-ui-theme="v2"] .v2-trust-strip {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-body-solid) 100%);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

[data-ui-theme="v2"] .v2-trust-number {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-500), var(--violet-600));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-ui-theme="v2"] .v2-trust-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

[data-ui-theme="v2"] .v2-testimonial {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl, 20px);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

[data-ui-theme="v2"] .v2-testimonial-quote {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-size: 2rem;
  color: var(--primary-300);
  opacity: 0.5;
}

[data-ui-theme="v2"] .v2-testimonial-text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

[data-ui-theme="v2"] .v2-testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

[data-ui-theme="v2"] .v2-testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-500), var(--violet-600));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

[data-ui-theme="v2"] .v2-testimonial-name {
  font-weight: 700;
  color: var(--text-primary);
}

[data-ui-theme="v2"] .v2-testimonial-role {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Dark mode overrides ---------- */
[data-theme="dark"][data-ui-theme="v2"] .v2-topbar {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary-600) 72%, transparent) 0%, color-mix(in srgb, var(--violet-600) 72%, transparent) 100%);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"][data-ui-theme="v2"] .v2-dock {
  background: linear-gradient(135deg, color-mix(in srgb, var(--bg-card) 95%, transparent) 0%, color-mix(in srgb, var(--bg-elevated) 95%, transparent) 100%);
  border-color: var(--border-strong);
}

[data-theme="dark"][data-ui-theme="v2"] .v2-dock-panel {
  background: var(--bg-card);
  border-color: var(--border-strong);
}

[data-theme="dark"][data-ui-theme="v2"] .v2-dock-grid-item {
  background: var(--bg-body-solid);
  border-color: var(--border-strong);
}

[data-theme="dark"][data-ui-theme="v2"] .v2-dock-grid-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-600);
}

[data-theme="dark"][data-ui-theme="v2"] .v2-dock-item.active {
  background: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"][data-ui-theme="v2"] .v2-live-card,
[data-theme="dark"][data-ui-theme="v2"] .v2-bento-card,
[data-theme="dark"][data-ui-theme="v2"] .v2-testimonial {
  background: var(--bg-card);
  border-color: var(--border-strong);
}

[data-theme="dark"][data-ui-theme="v2"] .v2-live-card:hover,
[data-theme="dark"][data-ui-theme="v2"] .v2-bento-card:hover {
  border-color: var(--primary-600);
}

[data-theme="dark"][data-ui-theme="v2"] .v2-trust-strip {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-body-solid) 100%);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-ui-theme="v2"] .v2-dock,
  [data-ui-theme="v2"] .v2-dock-item,
  [data-ui-theme="v2"] .v2-dock-panel,
  [data-ui-theme="v2"] .v2-bento-card,
  [data-ui-theme="v2"] .v2-live-card,
  [data-ui-theme="v2"] .v2-action-btn,
  [data-ui-theme="v2"] .v2-mobile-search {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Small screen tweaks for topbar ---------- */
@media (max-width: 991.98px) {
  [data-ui-theme="v2"] .v2-searchbar form {
    width: 100%;
    max-width: 38vw;
  }
}

@media (max-width: 767.98px) {
  [data-ui-theme="v2"] .v2-topbar {
    border-radius: 0;
  }
  [data-ui-theme="v2"] .v2-topbar-inner {
    padding: 0 0.75rem;
  }
  [data-ui-theme="v2"] .v2-brand {
    font-size: 1.15rem;
  }
}

@media (max-width: 575.98px) {
  [data-ui-theme="v2"] .v2-topbar-inner {
    padding: 0 0.75rem;
  }
  [data-ui-theme="v2"] .v2-btn-ghost,
  [data-ui-theme="v2"] .v2-btn-primary {
    padding: 0 0.75rem;
    font-size: 0.8rem;
  }
  [data-ui-theme="v2"] .v2-action-btn,
  [data-ui-theme="v2"] .v2-icon-btn {
    width: 36px;
    height: 36px;
  }
}
