/**
 * GX Module Styles -- Premium Portal Design System
 * Developed for Becchio Group LLC. 2026. All rights reserved.
 *
 * Design references: Apple Liquid Glass, Linear, Vercel, Stripe.
 * Frosted surfaces with real depth, crisp data typography,
 * dark canvas with luminous data, premium micro-interactions.
 *
 * Every portal includes this. Every module's DOM gets styled automatically.
 * The design quality lives in the platform, not in each client's code.
 */

/* ==========================================================================
   Portal Canvas -- Deep navy void with atmospheric light sources
   ========================================================================== */

body {
  background: #05182F;
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(0, 100, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(0, 224, 255, 0.04) 0%, transparent 50%);
  min-height: 100vh;
}

/* Noise texture overlay for organic feel */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.012;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  z-index: 9998;
}

/* ==========================================================================
   Scrollbar -- Minimal, translucent
   ========================================================================== */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ==========================================================================
   Portal Header -- Frosted sticky bar
   ========================================================================== */

.portal-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
  background: rgba(5, 24, 47, 0.6);
  backdrop-filter: blur(40px) saturate(1.3);
  -webkit-backdrop-filter: blur(40px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.header-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-accent, #00E0FF);
  text-shadow: 0 0 20px rgba(var(--brand-accent-rgb, 0, 224, 255), 0.2);
}

/* ==========================================================================
   Sidebar Navigation -- Frosted panel
   ========================================================================== */

.sidebar,
.portal-sidebar,
.sidebar-nav {
  background: rgba(5, 24, 47, 0.5);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 20px;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  position: relative;
  transition: all 200ms ease;
}
.nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 200ms ease;
}
.nav-link:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.03);
}
.nav-link:hover svg {
  opacity: 0.85;
}

.nav-link.is-active,
.nav-link.active,
.sidebar-nav .active,
[data-app].active {
  border-left-color: var(--brand-accent, #00E0FF);
  color: var(--brand-accent, #00E0FF);
  background: rgba(var(--brand-accent-rgb, 0, 224, 255), 0.04);
  font-weight: 600;
  border-radius: 0 8px 8px 0;
}
.nav-link.is-active svg,
.nav-link.active svg {
  opacity: 1;
  color: var(--brand-accent, #00E0FF);
}

/* ==========================================================================
   Mobile Bottom Navigation
   ========================================================================== */

.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: space-around;
  height: 64px;
  background: rgba(5, 24, 47, 0.85);
  backdrop-filter: blur(40px) saturate(1.3);
  -webkit-backdrop-filter: blur(40px) saturate(1.3);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 200ms ease;
  position: relative;
  padding: 6px 0;
  min-width: 56px;
}
.mobile-nav-item.is-active {
  color: var(--brand-accent, #00E0FF);
}
.mobile-nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--brand-accent, #00E0FF);
  border-radius: 0 0 2px 2px;
  box-shadow: 0 2px 8px rgba(var(--brand-accent-rgb, 0, 224, 255), 0.3);
  opacity: 0;
  transition: opacity 200ms ease;
}
.mobile-nav-item.is-active::before {
  opacity: 1;
}
.mobile-nav-item svg {
  width: 22px;
  height: 22px;
}
.mobile-nav-label {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Portal Main / Module Content Area
   ========================================================================== */

.portal-main,
.module-content {
  padding: 32px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

/* ==========================================================================
   Module Layout
   ========================================================================== */

.module-header {
  margin-bottom: 32px;
  position: relative;
}

.module-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 4px 0;
}

.data-stamp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.28);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Section Titles -- Accent bar + uppercase label
   ========================================================================== */

.section-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 32px 0 16px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--brand-accent, #00E0FF);
  box-shadow: 0 0 8px rgba(var(--brand-accent-rgb, 0, 224, 255), 0.3);
  flex-shrink: 0;
}

.section-label-right {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.28);
  text-align: right;
  margin-top: -28px;
  margin-bottom: 16px;
}

/* ==========================================================================
   Glass Cards -- Liquid Glass panels floating in space
   KPI, Breakdown, Insight, Target, Pipeline, Scenario, etc.
   ========================================================================== */

.glass-card,
.kpi-card,
.breakdown-card,
.gx-card,
.insight-card,
.target-card,
.pipeline-card,
.scenario-card,
.deal-card,
.sentiment-card,
.channel-card,
.funnel-stage {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid color-mix(in srgb, var(--brand-accent, #00E0FF) 15%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--brand-accent, #00E0FF) 25%, rgba(255,255,255,0.1));
  border-radius: 20px;
  backdrop-filter: blur(40px) saturate(1.2);
  -webkit-backdrop-filter: blur(40px) saturate(1.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 4px 24px rgba(0, 0, 0, 0.15),
    0 1px 2px rgba(0, 0, 0, 0.08);
  padding: 24px;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  animation: fadeIn 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Prismatic top-edge highlight */
.glass-card::before,
.kpi-card::before,
.breakdown-card::before,
.gx-card::before,
.insight-card::before,
.target-card::before,
.pipeline-card::before,
.scenario-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  z-index: 0;
}

/* Hover: lift + accent glow */
.glass-card:hover,
.kpi-card:hover,
.breakdown-card:hover,
.gx-card:hover,
.insight-card:hover,
.target-card:hover,
.pipeline-card:hover,
.scenario-card:hover,
.deal-card:hover,
.sentiment-card:hover,
.channel-card:hover {
  border-color: color-mix(in srgb, var(--brand-accent, #00E0FF) 30%, transparent);
  border-top-color: color-mix(in srgb, var(--brand-accent, #00E0FF) 40%, rgba(255,255,255,0.15));
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.25),
    0 0 20px color-mix(in srgb, var(--brand-accent, #00E0FF) 8%, transparent);
}

/* Content above pseudo-elements */
.glass-card > *,
.kpi-card > *,
.breakdown-card > *,
.gx-card > *,
.insight-card > *,
.target-card > * {
  position: relative;
  z-index: 1;
}

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

/* Stagger animation for grid children */
.kpi-grid > *:nth-child(1) { animation-delay: 0ms; }
.kpi-grid > *:nth-child(2) { animation-delay: 50ms; }
.kpi-grid > *:nth-child(3) { animation-delay: 100ms; }
.kpi-grid > *:nth-child(4) { animation-delay: 150ms; }
.kpi-grid > *:nth-child(5) { animation-delay: 200ms; }

/* ==========================================================================
   KPI Grid -- Responsive layout
   ========================================================================== */

.kpi-grid,
.breakdown-grid,
.gx-grid,
.insights-grid,
.targets-grid,
.pipeline-grid,
.scenario-grid,
.funnel-grid,
.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .kpi-grid,
  .breakdown-grid,
  .targets-grid,
  .pipeline-grid,
  .scenario-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gx-grid,
  .insights-grid,
  .channel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .insights-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

/* ==========================================================================
   KPI Values -- HERO numbers
   ========================================================================== */

.kpi-value,
.breakdown-value,
.target-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 0 60px rgba(255, 255, 255, 0.06);
  line-height: 1.1;
  margin: 8px 0;
}

/* ==========================================================================
   KPI Labels
   ========================================================================== */

.kpi-label,
.breakdown-label,
.target-label {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.kpi-sub,
.kpi-sublabel,
.breakdown-sub,
.target-sub {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
  line-height: 1.4;
}

/* ==========================================================================
   Status Indicators
   ========================================================================== */

.target-status,
.status-indicator {
  display: inline-block;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 9999px;
  margin-top: 8px;
}

.status-positive,
.target-status.on-track { background: rgba(34, 197, 94, 0.15); color: #22C55E; }
.status-warning,
.target-status:not(.on-track) { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.status-neutral { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }

/* Priority badges */
.badge-p0 { background: rgba(239, 68, 68, 0.2); color: #EF4444; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.badge-p1 { background: rgba(245, 158, 11, 0.2); color: #F59E0B; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.badge-p2 { background: rgba(34, 197, 94, 0.2); color: #22C55E; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }

/* ==========================================================================
   Chart Bars -- Gradient with rounded tops and glow
   ========================================================================== */

.chart-section,
.timeline-section {
  margin-bottom: 40px;
}

.chart-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 200px;
  padding: 16px 0;
}

.chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 4px;
}

.chart-bar {
  width: 100%;
  max-width: 48px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(to top,
    rgba(var(--brand-accent-rgb, 200, 16, 46), 0.1),
    rgba(var(--brand-accent-rgb, 200, 16, 46), 0.6),
    var(--brand-accent, #c8102e));
  box-shadow: 0 -4px 16px rgba(var(--brand-accent-rgb, 200, 16, 46), 0.2);
  min-height: 4px;
  transition: height 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-bar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
}

.chart-bar-day {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.28);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Data Tables -- Crisp typographic hierarchy
   ========================================================================== */

.activity-table,
.data-table,
.staffing-table,
.slot-table,
.reservation-table,
.channel-table,
.rules-table,
.model-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 40px;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
}

.activity-table th,
.data-table th,
.staffing-table th,
.slot-table th,
.reservation-table th,
.channel-table th,
.rules-table th,
.model-table th {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.activity-table td,
.data-table td,
.staffing-table td,
.slot-table td,
.reservation-table td,
.channel-table td,
.rules-table td,
.model-table td {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-variant-numeric: tabular-nums;
  transition: background 150ms ease;
}

.activity-table tr:hover td,
.data-table tr:hover td,
.staffing-table tr:hover td,
.reservation-table tr:hover td,
.channel-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   Insight Cards (GX Intelligence)
   ========================================================================== */

.insight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.insight-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--brand-accent, #00E0FF);
}

.insight-confidence {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: #22C55E;
}

.insight-title {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.insight-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.insight-detail {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  margin-bottom: 8px;
}

.insight-rec {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.4;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ==========================================================================
   GX Card (Recommendation Action Cards)
   ========================================================================== */

.gx-card-priority {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gx-card-title {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.gx-card-impact {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: #22C55E;
  margin-bottom: 4px;
}

.gx-card-action {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.4;
}

/* ==========================================================================
   Funnel (Attribution)
   ========================================================================== */

.funnel-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 40px;
}

.funnel-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 16px 24px;
}

.funnel-stage:first-child { opacity: 1; }
.funnel-stage:nth-child(2) { opacity: 0.85; padding-left: 36px; padding-right: 12px; }
.funnel-stage:nth-child(3) { opacity: 0.7; padding-left: 48px; padding-right: 0; }
.funnel-stage:nth-child(4) { opacity: 0.6; padding-left: 60px; }

.funnel-label {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.funnel-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.funnel-rate {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.48);
}

/* ==========================================================================
   Empty States
   ========================================================================== */

.empty-state,
.calendar-note,
.placeholder-note {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-bottom: 40px;
}

/* ==========================================================================
   Section Dividers
   ========================================================================== */

.breakdown-section,
.gx-section,
.chart-section,
.activity-section,
.insights-section,
.calendar-section,
.timeline-section,
.staffing-section,
.throughput-section,
.heatmap-section,
.weather-section,
.campaign-section,
.spend-section,
.funnel-section,
.review-section,
.topic-section,
.response-section,
.availability-section,
.slot-section,
.reservation-section,
.pipeline-section,
.outreach-section,
.deal-section,
.model-section,
.roi-section,
.scenario-section,
.pricing-section,
.rules-section,
.yield-section,
.simulator-section {
  margin-bottom: 40px;
}

/* ==========================================================================
   Sentiment / Review Cards
   ========================================================================== */

.review-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 8px;
  transition: border-color 150ms ease;
}

.review-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.review-rating {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #F59E0B;
  margin-bottom: 4px;
}

.review-text {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
}

.review-meta {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.28);
  margin-top: 4px;
}

/* ==========================================================================
   Account Pill -- Glassmorphic capsule with avatar glow
   ========================================================================== */

.user-block {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 4px 4px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  min-height: 40px;
  cursor: pointer;
}
.user-block:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 12px rgba(var(--brand-accent-rgb, 0, 224, 255), 0.08);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg,
    var(--brand-accent, #00E0FF),
    var(--brand-accent-dim, rgba(0, 224, 255, 0.3)));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--bg, #0A0F1C);
  flex-shrink: 0;
  text-transform: uppercase;
  box-shadow: 0 0 10px rgba(var(--brand-accent-rgb, 0, 224, 255), 0.25);
}

/* ==========================================================================
   GX Foundry Connection Status
   ========================================================================== */

.gx-connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.48);
  cursor: default;
}

.gx-sync-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: syncPulse 3s ease-in-out infinite;
}

.gx-sync-icon.connected { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.4); }
.gx-sync-icon.partial { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
.gx-sync-icon.disconnected { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }

@keyframes syncPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.gx-connection-label {
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gx-connection-info {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.28);
  transition: color 0.2s;
}
.gx-connection-info:hover { color: var(--brand-accent, #00E0FF); }
.gx-connection-info svg { width: 14px; height: 14px; }

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .glass-card, .kpi-card, .breakdown-card, .gx-card, .insight-card,
  .target-card, .pipeline-card, .scenario-card, .deal-card,
  .sentiment-card, .channel-card, .funnel-stage {
    animation: none;
    transition: none;
  }
  .glass-card:hover, .kpi-card:hover, .breakdown-card:hover, .gx-card:hover,
  .insight-card:hover, .target-card:hover {
    transform: none;
  }
  .chart-bar { transition: none; }
  .glass-card::before, .kpi-card::before, .breakdown-card::before,
  .gx-card::before, .gx-sync-icon {
    animation: none;
  }
}

/* ==========================================================================
   Responsive Adjustments -- Mobile-first
   ========================================================================== */

@media (max-width: 767px) {
  .mobile-nav { display: flex; }
  .portal-sidebar {
    position: fixed; top: 56px; left: 0; bottom: 64px;
    z-index: 90; transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .portal-sidebar.is-open { transform: translateX(0); }
  .sidebar-toggle { display: block; }
  .portal-body { margin-bottom: 64px; }
  .kpi-value, .breakdown-value, .target-value {
    font-size: 1.5rem;
  }
  .insight-value { font-size: 18px; }
  .chart-area { height: 150px; }
  .funnel-stage:nth-child(2),
  .funnel-stage:nth-child(3),
  .funnel-stage:nth-child(4) {
    padding-left: 16px;
    padding-right: 16px;
  }
  .portal-main, .module-content {
    padding: 16px;
  }
}
