/* ==========================================================================
   LeadFlow & Xentrox Unified Sidebar Navigation Stylesheet
   Ensures consistent icon alignment, sizing, and transitions across all pages
   ========================================================================== */

:root {
  --sidebar-width-expanded: 210px;
  --sidebar-width-collapsed: 64px;

  /* Standardized Island Layout Tokens */
  --island-gutter: 8px;
  --island-radius: 16px;
  --island-border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  --island-bg: var(--card-bg, #101014);
  --island-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] {
  --island-border: 1px solid #e2e8f0;
  --island-bg: #ffffff;
  --island-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
}

/* ── Persistent Sidebar Container ── */
.app-sidebar {
  --sidebar-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sidebar-duration: 0.28s;
  width: var(--sidebar-width-expanded);
  height: 100vh;
  background: var(--color-base-200, #000000);
  border-right: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  display: flex;
  flex-direction: column;
  z-index: 50;
  flex-shrink: 0;
  /* Single layout driver — do not also tween each nav item's width */
  transition: width var(--sidebar-duration) var(--sidebar-ease);
  position: relative;
  box-sizing: border-box;
  overflow-x: hidden;
}

.app-sidebar.collapsed {
  width: var(--sidebar-width-collapsed);
}

.app-sidebar.is-animating {
  will-change: width;
}

.app-sidebar.is-animating .nav-label-text,
.app-sidebar.is-animating .sidebar-brand-text {
  will-change: opacity;
}

.app-sidebar.is-animating .nav-item-btn:hover,
.app-sidebar.is-animating .nav-item-btn:not(.active):hover .sidebar-mark,
.app-sidebar.is-animating .nav-item-btn:not(.active):hover .nav-icon-sq {
  transform: none !important;
}

/* ── Header / Logo Area ── */
.app-sidebar .sidebar-logo-area {
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.app-sidebar.collapsed .sidebar-logo-area {
  padding: 0 16px;
  justify-content: flex-start;
  align-items: center;
}

/* Standard App Icon Badge Logo: 32px x 32px, 8px radius squircle */
.app-sidebar .sidebar-brand-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-curvy, 8px);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: background 0.3s ease;
  margin: 0;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.app-sidebar.collapsed .sidebar-brand-badge {
  width: 32px;
  height: 32px;
  margin: 0;
}

[data-theme="light"] .app-sidebar .sidebar-brand-badge {
  background: #0f172a;
}

[data-theme="light"] .app-sidebar .sidebar-brand-badge .brand-x-letter {
  color: #ffffff;
}

[data-theme="light"] .app-sidebar .sidebar-brand-badge img {
  filter: invert(1);
}

.app-sidebar .sidebar-brand-badge img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.app-sidebar .sidebar-brand-badge span.brand-x-letter {
  color: #000000;
  font-weight: 800;
  font-size: 0.9375rem;
  font-family: var(--font-sans, "Plus Jakarta Sans", system-ui, sans-serif);
  font-style: normal;
  font-synthesis: none;
  line-height: 1;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

.app-sidebar .sidebar-brand-text {
  margin-left: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  max-width: 160px;
  flex-shrink: 1;
  min-width: 0;
  /* Slightly faster than width so labels clear before the rail clips them */
  transition: opacity 0.18s var(--sidebar-ease);
}

.app-sidebar.collapsed .sidebar-brand-text {
  opacity: 0;
  pointer-events: none;
  /* Keep max-width so we do not reflow-jump; parent overflow clips */
  max-width: 160px;
  margin-left: 0.75rem;
}

/* LeadFlow.io wordmark — clean upright Plus Jakarta Sans (design guide ui-title) */
.app-sidebar .brand-title {
  font-family: var(--font-sans, "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: 0.875rem;
  font-weight: 700;
  font-style: normal;
  font-synthesis: none;
  letter-spacing: -0.01em;
  color: var(--text-heading, #f4f4f5);
  line-height: 1.25;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-sidebar .brand-subtitle {
  font-family: var(--font-sans, "Plus Jakarta Sans", system-ui, sans-serif);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-subtle, #71717a);
  line-height: 1.2;
  margin-top: 0.1rem;
}

[data-theme="light"] .app-sidebar .brand-title {
  color: #0f172a;
}

/* ── Navigation Links Scroll Container ── */
.app-sidebar .sidebar-nav-scroll {
  flex: 1;
  padding: 0.75rem 12px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
  overflow-x: hidden;
  align-items: stretch;
}

.app-sidebar.collapsed .sidebar-nav-scroll {
  /* Keep flex-start so 40px buttons stay left-pinned during width tween */
  padding: 0.75rem 12px;
  align-items: flex-start;
}

/* ── Individual Nav Item Button ──
 * Concentric squircle: 40×40 outer (12px radius) frames 28×28 mark (8px).
 * Active ring uses inset box-shadow (not border) so 6px padding stays even.
 */
.app-sidebar .nav-item-btn {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 0.75rem;
  align-items: center;
  height: 40px;
  padding: 0 6px;
  border-radius: var(--radius-lg, 12px);
  color: #71717a;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: var(--font-sans, "Plus Jakarta Sans", system-ui, sans-serif);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  cursor: pointer;
  user-select: none;
  border: none;
  box-shadow: inset 0 0 0 1px transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
}

.app-sidebar .nav-item-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #d4d4d8;
}

.app-sidebar .nav-item-btn:focus {
  outline: none;
}

.app-sidebar .nav-item-btn:focus-visible {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nav-accent, #6366f1) 55%, transparent);
}

[data-theme="light"] .app-sidebar .nav-item-btn {
  color: #71717a;
}

[data-theme="light"] .app-sidebar .nav-item-btn:hover {
  background: #f4f4f5;
  color: #18181b;
}

.app-sidebar .nav-item-btn.active {
  background: color-mix(in srgb, var(--nav-accent, #6366f1) 14%, transparent) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nav-accent, #6366f1) 40%, transparent) !important;
  color: #ffffff !important;
  font-weight: 600;
}

[data-theme="light"] .app-sidebar .nav-item-btn.active {
  background: color-mix(in srgb, var(--nav-accent, #6366f1) 10%, transparent) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nav-accent, #6366f1) 45%, transparent) !important;
  color: var(--nav-accent, #4f46e5) !important;
}

.app-sidebar .nav-item-btn.active::before {
  display: none !important;
}

/*
 * Collapsed: exact 40×40 outer hit target. Grid stays 28px | 1fr so the mark
 * column does not move during the width tween (no justify-content flip).
 * 6 + 28 + 6 = 40 — mark is optically centered in the active outline.
 */
.app-sidebar.collapsed .nav-item-btn {
  width: 40px;
  max-width: 40px;
  height: 40px;
  padding: 0 6px;
  margin: 0;
  border-radius: var(--radius-lg, 12px);
}

.app-sidebar.collapsed .sidebar-nav-scroll,
.app-sidebar.collapsed .sidebar-footer-controls {
  align-items: flex-start;
}

/* ── Shared menu icon box ── */
.sidebar-mark,
.menu-icon-box,
.panel-title-icon,
.nav-icon-sq {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-curvy, 8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--icon-size-menu, 14px);
  flex-shrink: 0;
  background: var(--mark-bg, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--mark-border, var(--border-subtle, rgba(255, 255, 255, 0.08)));
  color: var(--mark-color, #71717a);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
  margin: 0;
}

.sidebar-mark i,
.menu-icon-box i,
.panel-title-icon i,
.nav-icon-sq i {
  font-size: var(--icon-size-menu, 14px);
  line-height: 1;
}

.sidebar-mark svg,
.menu-icon-box svg,
.panel-title-icon svg {
  fill: currentColor;
  width: 14px;
  height: 14px;
}

[data-theme="light"] .sidebar-mark,
[data-theme="light"] .menu-icon-box,
[data-theme="light"] .panel-title-icon,
[data-theme="light"] .nav-icon-sq {
  background: var(--mark-bg, #f1f5f9);
  border-color: var(--mark-border, #cbd5e1);
  color: var(--mark-color, #64748b);
}

/* Inactive sidebar marks default to muted gray */
.app-sidebar .nav-item-btn:not(.active) .nav-icon-sq,
.app-sidebar .nav-item-btn:not(.active) .sidebar-mark {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #71717a !important;
  box-shadow: none !important;
}

.app-sidebar .nav-item-btn:not(.active) .nav-icon-sq i,
.app-sidebar .nav-item-btn:not(.active) .sidebar-mark i,
.app-sidebar .nav-item-btn:not(.active) .nav-icon-sq svg,
.app-sidebar .nav-item-btn:not(.active) .sidebar-mark svg {
  color: #71717a !important;
  fill: #71717a !important;
}

/* Hover on inactive sidebar marks: subtle brighten */
.app-sidebar .nav-item-btn:not(.active):hover .nav-icon-sq,
.app-sidebar .nav-item-btn:not(.active):hover .sidebar-mark {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #d4d4d8 !important;
  box-shadow: none !important;
}

.app-sidebar .nav-item-btn:not(.active):hover .nav-icon-sq i,
.app-sidebar .nav-item-btn:not(.active):hover .sidebar-mark i,
.app-sidebar .nav-item-btn:not(.active):hover .nav-icon-sq svg,
.app-sidebar .nav-item-btn:not(.active):hover .sidebar-mark svg {
  color: #d4d4d8 !important;
  fill: #d4d4d8 !important;
}

/* Light mode inactive sidebar marks */
[data-theme="light"] .app-sidebar .nav-item-btn:not(.active) .nav-icon-sq,
[data-theme="light"] .app-sidebar .nav-item-btn:not(.active) .sidebar-mark {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  box-shadow: none !important;
}

[data-theme="light"] .app-sidebar .nav-item-btn:not(.active) .nav-icon-sq i,
[data-theme="light"] .app-sidebar .nav-item-btn:not(.active) .sidebar-mark i,
[data-theme="light"] .app-sidebar .nav-item-btn:not(.active) .nav-icon-sq svg,
[data-theme="light"] .app-sidebar .nav-item-btn:not(.active) .sidebar-mark svg {
  color: #64748b !important;
  fill: #64748b !important;
}

[data-theme="light"] .app-sidebar .nav-item-btn:not(.active):hover .nav-icon-sq,
[data-theme="light"] .app-sidebar .nav-item-btn:not(.active):hover .sidebar-mark {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
  box-shadow: none !important;
}

[data-theme="light"] .app-sidebar .nav-item-btn:not(.active):hover .nav-icon-sq i,
[data-theme="light"] .app-sidebar .nav-item-btn:not(.active):hover .sidebar-mark i,
[data-theme="light"] .app-sidebar .nav-item-btn:not(.active):hover .nav-icon-sq svg,
[data-theme="light"] .app-sidebar .nav-item-btn:not(.active):hover .sidebar-mark svg {
  color: #1e293b !important;
  fill: #1e293b !important;
}

/* Active sidebar marks: keep full vivid color, glow, and accent background */
.app-sidebar .nav-item-btn.active .nav-icon-sq,
.app-sidebar .nav-item-btn.active .sidebar-mark {
  color: var(--nav-accent, #6366f1) !important;
  background: color-mix(in srgb, var(--nav-accent, #6366f1) 22%, transparent) !important;
  border-color: color-mix(in srgb, var(--nav-accent, #6366f1) 55%, transparent) !important;
  box-shadow: 0 0 12px -1px color-mix(in srgb, var(--nav-accent, #6366f1) 50%, transparent) !important;
}

.app-sidebar .nav-item-btn.active .nav-icon-sq i,
.app-sidebar .nav-item-btn.active .sidebar-mark i,
.app-sidebar .nav-item-btn.active .nav-icon-sq svg,
.app-sidebar .nav-item-btn.active .sidebar-mark svg {
  color: var(--nav-accent, #6366f1) !important;
  fill: var(--nav-accent, #6366f1) !important;
}

/* Labels: opacity-only; gap comes from grid column-gap (no extra margin) */
.app-sidebar .nav-label-text {
  margin-left: 0;
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.18s var(--sidebar-ease);
  pointer-events: auto;
  min-width: 0;
  font-family: var(--font-sans, "Plus Jakarta Sans", system-ui, sans-serif);
  font-style: normal;
}

.app-sidebar.collapsed .nav-label-text {
  opacity: 0;
  pointer-events: none;
  /* Do not collapse max-width — avoids layout jump; clipped by overflow */
}

.app-sidebar.collapsed .nav-icon-sq,
.app-sidebar.collapsed .sidebar-mark {
  margin: 0;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* ── Footer Controls ── */
.app-sidebar .sidebar-footer-controls {
  padding: 0.75rem 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-sizing: border-box;
}

.app-sidebar.collapsed .sidebar-footer-controls {
  padding: 0.75rem 12px;
  align-items: flex-start;
}

.app-sidebar .sidebar-footer-controls .nav-item-btn {
  color: #71717a;
}

.app-sidebar .sidebar-footer-controls .nav-item-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #d4d4d8;
}

[data-theme="light"] .app-sidebar .sidebar-footer-controls {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .app-sidebar .sidebar-footer-controls .nav-item-btn:hover {
  background: #f4f4f5;
  color: #18181b;
}

.app-sidebar .profile-pill-card {
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 0.65rem;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  text-align: left;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.app-sidebar.collapsed .profile-pill-card {
  /* Same start alignment as expanded — avoids mid-tween jump */
  justify-content: flex-start;
  padding: 0 0.65rem;
  border-color: transparent;
  background: transparent;
  width: 100%;
  height: 40px;
  margin: 0;
  border-radius: var(--radius-lg, 12px);
}

.app-sidebar .profile-avatar-sq {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-curvy, 8px);
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── User Profile Floating Panel ── */
.user-profile-overlay {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s ease;
  transform: translateX(-8px);
}

.user-profile-overlay.active {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.user-profile-card {
  width: 320px;
  background: var(--bg-panel, #161616);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.75);
  padding: 1.15rem 1.35rem 1rem 1.35rem;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.user-profile-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 148px;
  background:
    radial-gradient(circle at 50% 0%, rgba(99,102,241,0.22), transparent 68%),
    linear-gradient(180deg, rgba(56,189,248,0.1), transparent);
  pointer-events: none;
}

[data-theme="light"] .user-profile-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .user-profile-card::before {
  background:
    radial-gradient(circle at 50% 0%, rgba(99,102,241,0.1), transparent 68%),
    linear-gradient(180deg, rgba(56,189,248,0.05), transparent);
}

.user-profile-identity {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 0.35rem;
}

.user-profile-avatar {
  width: 106px;
  height: 106px;
  margin: 0 auto 0.9rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
  background: rgba(99, 102, 241, 0.12);
  border: 1.5px solid rgba(99, 102, 241, 0.4);
  color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12), 0 0 16px rgba(99, 102, 241, 0.3);
  position: relative;
  overflow: hidden;
}

.user-profile-avatar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid rgba(129, 140, 248, 0.45);
  pointer-events: none;
  opacity: 0.7;
}

[data-theme="dark"] .user-profile-avatar {
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: inset 0 0 20px rgba(56, 189, 248, 0.35), 0 0 16px rgba(56, 189, 248, 0.25);
  animation: profile-avatar-glow 3s ease-in-out infinite alternate;
}

[data-theme="dark"] .user-profile-avatar::before {
  border: none;
  background: radial-gradient(circle at 50% 50%, rgba(56,189,248,0.25) 0%, rgba(56,189,248,0.08) 60%, transparent 100%);
  animation: profile-inner-pulse 3s ease-in-out infinite alternate;
}

[data-theme="light"] .user-profile-avatar {
  background: #4338ca;
  border-color: #3730a3;
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(67, 56, 202, 0.32);
}

[data-theme="light"] .user-profile-avatar::before {
  display: none;
}

@keyframes profile-avatar-glow {
  0% {
    box-shadow: inset 0 0 18px rgba(56, 189, 248, 0.3), 0 0 12px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.6);
  }
  100% {
    box-shadow: inset 0 0 26px rgba(56, 189, 248, 0.5), 0 0 20px rgba(56, 189, 248, 0.38);
    border-color: rgba(56, 189, 248, 0.85);
  }
}

@keyframes profile-inner-pulse {
  0% {
    opacity: 0.5;
  }
  100% {
    opacity: 0.95;
  }
}

.user-profile-avatar .li-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  font-size: 0.9rem;
}

[data-theme="light"] .user-profile-avatar .li-badge {
  background: #0284c7;
  color: #fff;
  border-color: #0369a1;
}

[data-theme="dark"] .user-profile-avatar .li-badge {
  border-color: var(--bg-panel, #161616);
}

.user-profile-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-heading, #ffffff);
}

.user-profile-role {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary, #6366f1);
}

.user-profile-details {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.35rem;
  position: relative;
  z-index: 1;
}

.user-profile-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  background: var(--bg-panel-elevated, #1a1a1f);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  animation: profile-row-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.user-profile-details .user-profile-row:nth-child(1) { animation-delay: 0.18s; }
.user-profile-details .user-profile-row:nth-child(2) { animation-delay: 0.28s; }
.user-profile-details .user-profile-row:nth-child(3) { animation-delay: 0.38s; }
.user-profile-details .user-profile-row:nth-child(4) { animation-delay: 0.48s; }

@keyframes profile-row-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

[data-theme="light"] .user-profile-row {
  background: #ffffff;
}

.user-profile-row .row-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.125rem;
}

.user-profile-row .row-content {
  flex: 1;
  min-width: 0;
}

.user-profile-row .row-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.user-profile-row .row-value {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-heading, #ffffff);
  line-height: 1.3;
  word-break: break-word;
}

.user-profile-row .row-action {
  text-decoration: none;
  cursor: pointer;
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #0a66c2;
  background: rgba(10, 102, 194, 0.12);
  border: 1px solid rgba(10, 102, 194, 0.35);
  font-size: 0.875rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.user-profile-row .row-action:hover {
  border-color: rgba(10, 102, 194, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -8px rgba(10, 102, 194, 0.55);
}

.user-profile-logout-wrap {
  display: flex;
  align-items: center;
  margin-top: 1.15rem;
  position: relative;
  z-index: 1;
}

.user-profile-logout {
  width: 100%;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(244, 63, 94, 0.25);
  background: rgba(244, 63, 94, 0.06);
  color: #f43f5e;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: background 0.15s ease;
}

.user-profile-logout:hover {
  background: rgba(244, 63, 94, 0.12);
}

/* ── Global Toast Notification Component ── */
.app-toast {
  position: fixed;
  top: auto;
  bottom: 88px; /* above Early Bird CTA */
  right: 24px;
  left: auto;
  padding: 0.75rem 1.15rem;
  background: var(--color-base-300, #1c1c21);
  color: var(--text-heading, #ffffff);
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.16));
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.app-toast.visible,
.app-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ── Standard Button Styles ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  height: 32px;
  padding: 0 0.85rem;
  border-radius: var(--radius-curvy, 8px);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
  box-sizing: border-box;
}

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

.btn-sm {
  height: 28px;
  padding: 0 0.65rem;
  font-size: 0.75rem;
}

.btn-neutral {
  background: rgba(255, 255, 255, 0.05);
  color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-neutral:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

[data-theme="light"] .btn-neutral {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .btn-neutral:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.btn-warning:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
  color: #ffffff;
}

.btn-blue {
  background: #2563eb;
  color: #ffffff !important;
  border: 1px solid rgba(59, 130, 246, 0.5);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
  font-weight: 600;
}

.btn-blue:hover {
  background: #1d4ed8;
  color: #ffffff !important;
  border-color: #60a5fa;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

[data-theme="light"] .btn-blue {
  background: #2563eb;
  color: #ffffff !important;
  border: 1px solid #1d4ed8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

[data-theme="light"] .btn-blue:hover {
  background: #1d4ed8;
}

/* ── Global Floating "Become an Early Bird" Premium Halo CTA ── */
.floating-early-bird-btn {
  position: fixed;
  top: auto;
  bottom: 24px;
  right: 24px;
  left: auto;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full, 9999px);
  background: rgba(15, 15, 20, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #f4f4f5 !important;
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 
    0 4px 20px -2px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 20px -2px rgba(99, 102, 241, 0.25);
  cursor: pointer;
  user-select: none;
  animation: earlyBirdHaloGlow 4s ease-in-out infinite;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background 0.2s ease;
}

.floating-early-bird-btn:hover {
  transform: translateY(-2px);
  background: rgba(22, 22, 30, 0.95);
  border-color: rgba(99, 102, 241, 0.65);
  box-shadow: 
    0 8px 28px -4px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(99, 102, 241, 0.4),
    0 0 30px 2px rgba(99, 102, 241, 0.45);
  color: #ffffff !important;
  animation-play-state: paused;
}

.floating-early-bird-btn i.early-bird-icon {
  font-size: 1rem;
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.floating-early-bird-btn:hover i.early-bird-icon {
  color: #a5b4fc;
  transform: scale(1.1);
}

.floating-early-bird-btn .early-bird-badge {
  background: rgba(99, 102, 241, 0.15);
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.floating-early-bird-btn:hover .early-bird-badge {
  background: rgba(99, 102, 241, 0.28);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.55);
}

/* Light Mode support */
[data-theme="light"] .floating-early-bird-btn {
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a !important;
  border: 1px solid rgba(79, 70, 229, 0.3);
  box-shadow: 
    0 4px 20px -2px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 0 20px -2px rgba(79, 70, 229, 0.2);
}

[data-theme="light"] .floating-early-bird-btn:hover {
  background: #ffffff;
  border-color: rgba(79, 70, 229, 0.6);
  box-shadow: 
    0 8px 28px -4px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(79, 70, 229, 0.3),
    0 0 28px 2px rgba(79, 70, 229, 0.35);
  color: #4f46e5 !important;
}

[data-theme="light"] .floating-early-bird-btn i.early-bird-icon {
  color: #4f46e5;
}

[data-theme="light"] .floating-early-bird-btn .early-bird-badge {
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  border-color: rgba(79, 70, 229, 0.25);
}

/* Gradual Elegant Breathing Halo Glow (No Jiggle / Tilt) */
@keyframes earlyBirdHaloGlow {
  0%, 100% {
    box-shadow: 
      0 4px 20px -2px rgba(0, 0, 0, 0.7),
      0 0 0 1px rgba(255, 255, 255, 0.05),
      0 0 16px -2px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
  }
  50% {
    box-shadow: 
      0 6px 24px -2px rgba(0, 0, 0, 0.75),
      0 0 0 1px rgba(99, 102, 241, 0.25),
      0 0 28px 3px rgba(99, 102, 241, 0.45);
    border-color: rgba(99, 102, 241, 0.55);
  }
}

[data-theme="light"] .floating-early-bird-btn {
  animation: earlyBirdHaloGlowLight 4s ease-in-out infinite;
}

@keyframes earlyBirdHaloGlowLight {
  0%, 100% {
    box-shadow: 
      0 4px 20px -2px rgba(15, 23, 42, 0.12),
      0 0 0 1px rgba(0, 0, 0, 0.04),
      0 0 16px -2px rgba(79, 70, 229, 0.18);
    border-color: rgba(79, 70, 229, 0.3);
  }
  50% {
    box-shadow: 
      0 6px 24px -2px rgba(15, 23, 42, 0.16),
      0 0 0 1px rgba(79, 70, 229, 0.2),
      0 0 26px 2px rgba(79, 70, 229, 0.35);
    border-color: rgba(79, 70, 229, 0.5);
  }
}

/* ==========================================================================
   Standardized "Island Layout" & Gutter Separation Architecture
   Provides consistent 8px/10px outer elevation gutter, 16px corner radius,
   hairline border framing, and smooth island canvas across all views
   ========================================================================== */

/* Outer Shell / Main Viewport container on operational cockpit views (dashboard, campaign, etc.) */
.app-main-viewport {
  flex: 1;
  height: 100vh;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  padding: var(--island-gutter, 8px);
  background: var(--color-base-100, #09090b);
}

/* Floating Inset Canvas Island */
.app-main-viewport > .app-topbar {
  border-top-left-radius: var(--island-radius, 16px);
  border-top-right-radius: var(--island-radius, 16px);
  border: var(--island-border);
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.app-main-viewport > .cockpit-content-canvas,
.app-main-viewport > .engine-page {
  border-bottom-left-radius: var(--island-radius, 16px);
  border-bottom-right-radius: var(--island-radius, 16px);
  border-left: var(--island-border);
  border-right: var(--island-border);
  border-bottom: var(--island-border);
  background: var(--card-bg, rgba(18, 18, 21, 0.78));
  box-shadow: var(--island-shadow);
}

/* Standardize Island Layout on Leads & CRM and Company Finder (.cf-shell & .cf-card) */
.cf-shell {
  flex: 1;
  height: 100vh;
  min-height: 0;
  box-sizing: border-box;
  padding: var(--island-gutter, 8px) !important;
  background: var(--color-base-100, #09090b) !important;
  overflow: hidden;
}

.cf-card {
  border-radius: var(--island-radius, 16px) !important;
  border: var(--island-border) !important;
  box-shadow: var(--island-shadow) !important;
  background: var(--card-bg, #101014) !important;
  overflow: hidden;
}

/* Standardize Island Layout on UniBox (.stage & .panel) */
.stage {
  padding: var(--island-gutter, 8px) !important;
  gap: var(--island-gutter, 8px) !important;
  background: var(--color-base-100, #09090b) !important;
}

.stage .panel {
  border-radius: var(--island-radius, 16px) !important;
  border: var(--island-border) !important;
  box-shadow: var(--island-shadow) !important;
}

/* Standardize Island Layout on Campaign Manager (.cm-panel & .engine-page) */
.engine-page {
  padding: 0 !important;
  margin: 0 !important;
}

.cm-panel {
  border-radius: var(--island-radius, 16px) !important;
  border: var(--island-border) !important;
  box-shadow: var(--island-shadow) !important;
}

/* ==========================================================================
   Unified Panel Header Pattern & Architecture
   Consistent 12px 16px padding, 58px min-height, 32px squircle icon badge,
   15px/12px typography, and flexbox baseline alignment across all 4 panels
   ========================================================================== */
.unified-panel-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  min-height: 58px !important;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08)) !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.unified-panel-badge {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  font-size: 18px !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.unified-panel-badge i,
.unified-panel-badge svg {
  width: 18px !important;
  height: 18px !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

.unified-header-copy {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.unified-header-copy .ui-title,
.unified-header-copy .title {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: var(--text-heading, #ffffff) !important;
  letter-spacing: -0.01em !important;
}

.unified-header-copy .ui-body,
.unified-header-copy .sub {
  margin: 2px 0 0 !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  color: var(--text-body, var(--color-text-secondary, #a1a1aa)) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

[data-theme="light"] .unified-header-copy .ui-title,
[data-theme="light"] .unified-header-copy .title {
  color: #0f172a !important;
}

[data-theme="light"] .unified-header-copy .ui-body,
[data-theme="light"] .unified-header-copy .sub {
  color: #64748b !important;
}




