/* ==========================================
   1. DESIGN TOKENS & SYSTEM INITIALIZATION
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  /* Colors */
  --bg-dark: #07090e;
  --panel-bg: rgba(15, 19, 26, 0.65); /* Translucent glass panel */
  --panel-border: rgba(255, 255, 255, 0.06);
  
  /* Accent Colors */
  --accent-cyan: #00eeff;
  --accent-cyan-glow: rgba(0, 238, 255, 0.3);
  --accent-amber: #e5a93c; /* Gold/Amber highlight from mockup */
  --accent-amber-glow: rgba(229, 169, 60, 0.25);
  
  /* Text colors */
  --text-main: #ffffff;
  --text-muted: #828a99;
  --text-green: #3cd395;
  --text-red: #f45b5b;
  
  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Border Radius */
  --radius-panel: 24px;
}

/* ==========================================
   2. GLOBAL RESET & BG NEON RINGS
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #050811;
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  position: relative;
}

/* Neon Glow Background Rings & Aurora Mesh (Full Screen) */
.neon-background-rings {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.bg-ring {
  position: absolute;
  border-radius: 50%;
  border: 16px solid rgba(0, 238, 255, 0.08);
  box-shadow: 
    0 0 80px rgba(0, 238, 255, 0.1),
    inset 0 0 80px rgba(0, 238, 255, 0.1);
  filter: blur(24px);
  opacity: 0.45;
}

.ring-top-center {
  width: 550px;
  height: 550px;
  top: -200px;
  left: 10%;
  border-color: rgba(0, 238, 255, 0.1);
}

.ring-right-middle {
  width: 700px;
  height: 700px;
  top: 15%;
  right: -300px;
  border-color: rgba(0, 238, 255, 0.12);
}

.ring-bottom-left {
  width: 600px;
  height: 600px;
  bottom: -250px;
  left: 15%;
  border-color: rgba(0, 238, 255, 0.15);
}

/* Organic Aurora Glowing Blobs */
.aurora-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
  pointer-events: none;
  z-index: -2;
}

.aurora-glow-1 {
  width: 600px;
  height: 500px;
  top: -10%;
  left: 10%;
  background: radial-gradient(circle, rgba(0, 238, 255, 0.15) 0%, rgba(60, 211, 149, 0.08) 60%, transparent 100%);
  animation: float-aurora-1 22s infinite ease-in-out alternate;
}

.aurora-glow-2 {
  width: 700px;
  height: 600px;
  bottom: -15%;
  right: -5%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(0, 238, 255, 0.06) 60%, transparent 100%);
  animation: float-aurora-2 28s infinite ease-in-out alternate;
}

.aurora-glow-3 {
  width: 500px;
  height: 500px;
  top: 35%;
  left: 45%;
  background: radial-gradient(circle, rgba(60, 211, 149, 0.1) 0%, rgba(139, 92, 246, 0.05) 60%, transparent 100%);
  animation: float-aurora-3 25s infinite ease-in-out alternate;
}

@keyframes float-aurora-1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes float-aurora-2 {
  0% { transform: translate(0, 0) scale(1.05); }
  50% { transform: translate(-30px, 40px) scale(0.9); }
  100% { transform: translate(30px, -20px) scale(1.1); }
}

@keyframes float-aurora-3 {
  0% { transform: translate(0, 0) scale(0.95); }
  50% { transform: translate(20px, 20px) scale(1.05); }
  100% { transform: translate(-40px, -30px) scale(1); }
}

/* ==========================================
   3. APP CONTAINER & SLIM ICON SIDEBAR
   ========================================== */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.sidebar-slim {
  width: 72px;
  background: rgba(10, 12, 17, 0.85);
  border-right: 1px solid var(--panel-border);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-logo {
  color: var(--accent-cyan);
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
}

.sidebar-logo svg {
  width: 28px;
  height: 28px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  align-items: center;
}

.sidebar-item {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.sidebar-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-item.active {
  color: var(--accent-cyan);
  background: rgba(0, 238, 255, 0.08);
  border: 1px solid rgba(0, 238, 255, 0.3);
  box-shadow: 0 0 10px rgba(0, 238, 255, 0.15), inset 0 0 8px rgba(0, 238, 255, 0.1);
}

.sidebar-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.sidebar-logout {
  margin-top: auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar-logout:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-logout svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

/* ==========================================
   4. MAIN VIEWPORT & HEADER
   ========================================== */
.main-viewport {
  margin-left: 72px;
  flex: 1;
  padding: 40px 50px;
  max-width: 1350px;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

/* Top Header Bar */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Header Utility Panel */
.header-utility-panel {
  display: flex;
  align-items: center;
  gap: 16px;
}
.utility-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.utility-icon-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}
.utility-icon-btn svg {
  width: 20px;
  height: 20px;
}
.utility-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-display);
  margin-left: 8px;
}
.clock-time {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
}
.clock-date {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

#btn-add-task {
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
  text-transform: uppercase;
}
#btn-add-task:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 10px rgba(0, 238, 255, 0.15);
}


.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-inline {
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
}

.brand-logo-inline svg {
  width: 24px;
  height: 24px;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1.5px;
  margin-left: 8px;
}

/* Horizontal navigation in header */
.header-nav {
  display: flex;
  list-style: none;
  gap: 32px;
}

.header-nav-item a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  padding: 10px 0;
  position: relative;
  transition: color 0.3s ease;
}

.header-nav-item.active a,
.header-nav-item a:hover {
  color: #ffffff;
}

.header-nav-item.active a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan-glow);
}

/* Dropdown Oeeview (Overview) */
.header-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 19, 26, 0.4);
  border: 1px solid var(--panel-border);
  padding: 8px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  font-weight: 500;
}

.header-dropdown:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.header-dropdown svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

/* ==========================================
   5. LAYOUT GRID (Left Area vs Right Area)
   ========================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2.1fr 0.9fr; /* 70% vs 30% */
  gap: 24px;
}

.dashboard-left-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-right-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Shared glassmorphic panels */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-panel);
  backdrop-filter: blur(25px) saturate(120%);
  -webkit-backdrop-filter: blur(25px) saturate(120%);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.03),
    0 20px 45px rgba(0, 0, 0, 0.5);
  padding: 24px;
  position: relative;
}

/* ==========================================
   6. LEFT COLUMN COMPONENTS
   ========================================== */

/* Overview Title Block */


.overview-title-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.overview-title {
  font-family: var(--font-display);
  font-size: 1.95rem;
  font-weight: 600;
}

.overview-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Stats Panel (Unified Single Panel) */
.unified-stats-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
}

.stat-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.stat-trend {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 2px;
}

.stat-trend.up {
  color: var(--text-green);
}

.stat-trend.down {
  color: var(--text-red);
}

.stat-divider {
  width: 1px;
  height: 48px;
  background-color: rgba(255, 255, 255, 0.06);
  margin: 0 24px;
}

/* Real-Time Traffic Panel */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.panel-legend {
  display: flex;
  align-items: center;
  gap: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.legend-dot.cyan {
  background-color: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

.legend-dot.muted {
  background-color: var(--text-muted);
}

/* SVG Chart styles */
.chart-wrapper {
  position: relative;
  height: 220px;
  margin-top: 10px;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid {
  stroke: rgba(255, 255, 255, 0.02);
  stroke-width: 1;
}

.chart-label-axis {
  fill: var(--text-muted);
  font-size: 9px;
  font-weight: 500;
  font-family: var(--font-body);
}

.chart-line {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(0, 238, 255, 0.65));
}

.chart-area {
  fill: url(#chart-fade);
}

/* Glowing chart nodes */
.chart-point {
  fill: #ffffff;
  stroke: var(--accent-cyan);
  stroke-width: 3;
  r: 4.5;
  cursor: pointer;
  transition: all 0.2s ease;
  filter: drop-shadow(0 0 4px var(--accent-cyan));
}

.chart-point:hover,
.chart-point.active {
  r: 6.5;
  stroke-width: 4;
}

/* Tooltip precisely styled like mockup photos */
.chart-popup-tooltip {
  position: absolute;
  background: #141822;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 10;
  transform: translate(-50%, -100%);
  margin-top: -16px;
}

.chart-popup-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.chart-popup-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Dotted indicator line */
.chart-indicator-line {
  stroke: rgba(255, 255, 255, 0.15);
  stroke-dasharray: 4,4;
  stroke-width: 1;
}

/* Sub-row split (Pages vs Location) */
.dashboard-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Top Pages Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  color: var(--text-muted);
  font-weight: 500;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.data-table td {
  padding: 12px 14px;
  color: var(--text-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.table-page-link {
  font-weight: 500;
  color: #ffffff;
}

.table-val {
  font-weight: 500;
}

/* User Location World Map */
.map-wrap {
  position: relative;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-svg-el {
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

.map-land {
  fill: #222938;
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 0.5;
}

.map-overlay-hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-node {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: var(--accent-amber);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-amber);
}

.map-node::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-amber);
  animation: hotspot-pulse-yellow 2s infinite ease-out;
}

.map-node:hover {
  transform: translate(-50%, -50%) scale(1.3);
}

/* Map legend exactly like mockup photos */
.map-legend-box {
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}

.map-legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-amber);
  box-shadow: 0 0 6px var(--accent-amber);
}

.map-legend-val {
  font-weight: 600;
  color: var(--accent-amber);
}

.map-legend-label {
  color: var(--text-muted);
}

/* Interactive Map Tooltip */
.map-node-tooltip {
  position: absolute;
  background: rgba(10, 12, 17, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  backdrop-filter: blur(10px);
  pointer-events: none;
  display: none;
  z-index: 10;
  transform: translate(-50%, -100%);
  margin-top: -10px;
}

.map-tooltip-title {
  font-weight: 700;
  color: #ffffff;
}

.map-tooltip-desc {
  color: var(--accent-amber);
  font-weight: 600;
}

/* ==========================================
   7. RIGHT COLUMN COMPONENTS
   ========================================== */
.vertical-acquisition-panel {
  display: flex;
  flex-direction: column;
  gap: 32px;
  flex: 1;
}

.acq-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.gauge-circle-container {
  position: relative;
  width: 76px;
  height: 76px;
}

.gauge-circle-container svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 6;
}

.gauge-circle-fill {
  fill: none;
  stroke: var(--accent-amber);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 220; /* 2 * PI * r (r=35) */
  stroke-dashoffset: 220;
  filter: drop-shadow(0 0 5px rgba(229, 169, 60, 0.45));
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gauge-pct-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}

.acq-info-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.acq-source-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.acq-source-qty {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

.acq-source-avg {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Live Jitter controller button floating precisely */
.jitter-controller-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 19, 26, 0.7);
  border: 1px solid var(--panel-border);
  color: var(--accent-cyan);
  padding: 12px 20px;
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 100;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.jitter-controller-btn:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 238, 255, 0.25);
  transform: translateY(-2px);
}

/* ==========================================
   8. ANIMATION KEYFRAMES
   ========================================== */
@keyframes hotspot-pulse-yellow {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* ==========================================
   9. RESPONSIVE MEDIA QUERIES
   ========================================== */
@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-right-col {
    margin-top: 24px;
  }
}

@media (max-width: 768px) {
  .main-viewport {
    padding: 30px 20px;
  }
  .header-nav {
    display: none; /* Hide header links on mobile */
  }
  .unified-stats-panel {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .stat-divider {
    display: none;
  }
  .dashboard-subgrid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================
   10. SPA VIEW TRANSITIONS & NEW COMPONENTS
   ========================================== */
.view-container {
  display: none;
  opacity: 0;
  animation: view-fade-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.view-container.active {
  display: block !important;
}

@keyframes view-fade-in {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom styles for live event logger terminal scrollbar */
.terminal-log-wrapper::-webkit-scrollbar {
  width: 4px;
}
.terminal-log-wrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
.terminal-log-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
.terminal-log-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Funnel bars visual enhancements */
.funnel-bar-wrapper {
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.funnel-bar-wrapper:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Settings sliders styling */
input[type="range"] {
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.05);
  height: 6px;
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  cursor: pointer;
  transition: transform 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Settings buttons and user avatar custom premium styles */
.control-btn {
  border: 1px solid;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.75rem;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  outline: none;
}

.control-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-family);
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

/* Time range filter buttons style */
.filter-btn {
  background: transparent;
  border: 1px solid var(--panel-border) !important;
  color: var(--text-muted) !important;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

.filter-btn.active {
  background: rgba(0, 238, 255, 0.08) !important;
  border-color: var(--accent-cyan) !important;
  color: var(--accent-cyan) !important;
  box-shadow: 0 0 8px var(--accent-cyan-glow) !important;
}

/* User Search styling */
#subscriber-search {
  background: rgba(5, 7, 10, 0.4);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.75rem;
  color: #ffffff;
  outline: none;
  width: 200px;
  transition: all 0.3s ease;
}

#subscriber-search:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan-glow);
  width: 240px;
}

/* Plan Badges */
.plan-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: bold;
  border: 1px solid;
  display: inline-block;
}

.plan-badge.enterprise {
  background: rgba(0, 238, 255, 0.08) !important;
  color: var(--accent-cyan) !important;
  border-color: rgba(0, 238, 255, 0.15) !important;
}

.plan-badge.pro {
  background: rgba(229, 169, 60, 0.08) !important;
  color: var(--accent-amber) !important;
  border-color: rgba(229, 169, 60, 0.15) !important;
}

.plan-badge.trial {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-main) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* System event logs custom scrollbar */
.system-events-feed::-webkit-scrollbar {
  width: 4px;
}
.system-events-feed::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
.system-events-feed::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
.system-events-feed::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Multi-Core Thread dots styling and flicker animation */
.thread-core-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(60, 211, 149, 0.2);
  border: 1.5px solid rgba(60, 211, 149, 0.4);
  box-shadow: 0 0 6px rgba(60, 211, 149, 0.2);
  transition: all 0.3s ease;
  margin: 0 auto;
}

.thread-core-dot.active {
  background-color: var(--text-green);
  border-color: var(--text-green);
  box-shadow: 0 0 10px var(--text-green);
}

.thread-core-dot.warning {
  background-color: var(--accent-amber);
  border-color: var(--accent-amber);
  box-shadow: 0 0 10px var(--accent-amber);
}

.thread-core-dot.critical {
  background-color: var(--text-red);
  border-color: var(--text-red);
  box-shadow: 0 0 10px var(--text-red);
}

/* iOS slide toggle switch */
.ios-toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-main);
  padding: 4px 0;
}

.ios-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ios-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  transition: .3s;
  border-radius: 20px;
}

.ios-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: #a39890;
  transition: .3s;
  border-radius: 50%;
}

.ios-switch input:checked + .ios-slider {
  background-color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan-glow);
}

.ios-switch input:checked + .ios-slider:before {
  transform: translateX(16px);
  background-color: #ffffff;
}

/* User Retention Heatmap Cohort Cells */
.cohort-cell {
  font-size: 0.8rem;
  transition: all 0.3s ease;
  padding: 12px 0 !important;
  text-align: center;
}

.cohort-cell.cell-100 {
  background: color-mix(in srgb, var(--accent-cyan) 85%, transparent) !important;
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 0 0 8px rgba(255,255,255,0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cohort-cell.cell-85 {
  background: color-mix(in srgb, var(--accent-cyan) 65%, transparent) !important;
  color: #ffffff;
  font-weight: 600;
}

.cohort-cell.cell-75 {
  background: color-mix(in srgb, var(--accent-cyan) 45%, transparent) !important;
  color: #ffffff;
}

.cohort-cell.cell-70 {
  background: color-mix(in srgb, var(--accent-cyan) 35%, transparent) !important;
  color: var(--text-main);
}

.cohort-cell.cell-60 {
  background: color-mix(in srgb, var(--accent-cyan) 25%, transparent) !important;
  color: var(--text-main);
}

.cohort-cell.cell-50 {
  background: color-mix(in srgb, var(--accent-cyan) 15%, transparent) !important;
  color: var(--text-muted);
}

.cohort-cell.cell-empty {
  background: rgba(255, 255, 255, 0.01) !important;
  color: var(--text-muted);
  opacity: 0.4;
}

/* Cluster Status Dot pulse animation */
.cluster-status-dot.active::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--text-green);
  animation: hotspot-pulse-green 2s infinite ease-out;
  margin-left: -8px;
  pointer-events: none;
}

@keyframes hotspot-pulse-green {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Header Date Dropdown Menu styling */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #0f131a;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  min-width: 170px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
  display: none;
  flex-direction: column;
  padding: 8px 0;
  z-index: 1000;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

.dropdown-menu.show {
  display: flex;
}

.dropdown-item {
  padding: 10px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.dropdown-item.active {
  color: var(--accent-cyan);
  font-weight: 600;
  background: rgba(0, 238, 255, 0.04);
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 6px 0;
}

/* ==========================================
   11. FUTURISTIC TASK MANAGEMENT STYLES
   ========================================== */

:root {
  --priority-high: #f45b5b;
  --priority-violet: #a78bfa;
  --priority-teal: #2dd4bf;
  --priority-normal: #38bdf8;
  --priority-color: var(--accent-cyan);
}

.overview-dials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}
.dial-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 20px;
  cursor: pointer;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-panel);
  backdrop-filter: blur(25px) saturate(120%);
  -webkit-backdrop-filter: blur(25px) saturate(120%);
}
.dial-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
}
.dial-gauge-container {
  width: 130px;
  height: 130px;
  position: relative;
  margin-bottom: 16px;
}
.dial-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.dial-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.02);
  stroke-width: 8;
}
.dial-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 314;
  transition: stroke-dashoffset 1s ease-in-out;
}
.dial-val-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dial-pct {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
}
.dial-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: -2px;
}
.dial-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-transform: uppercase;
  margin-top: 8px;
}

.sprint-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}
.link-view-all {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.link-view-all:hover {
  text-shadow: 0 0 8px var(--accent-cyan-glow);
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--badge-color);
}
.priority-hex {
  width: 12px;
  height: 12px;
  background-color: var(--badge-color);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  box-shadow: 0 0 10px var(--badge-color);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
}
.status-pill.in-progress {
  color: var(--accent-cyan);
  border-color: rgba(0, 238, 255, 0.25);
  background: rgba(0, 238, 255, 0.03);
}
.status-pill.completed {
  color: var(--text-green);
  border-color: rgba(60, 211, 149, 0.25);
  background: rgba(60, 211, 149, 0.03);
}
.status-pill.pending {
  color: var(--accent-amber);
  border-color: rgba(229, 169, 60, 0.25);
  background: rgba(229, 169, 60, 0.03);
}

.progress-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.progress-pct-val {
  font-size: 0.8rem;
  font-weight: 700;
  width: 32px;
}
.progress-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--accent-cyan), var(--accent-amber));
  border-radius: 4px;
  box-shadow: 0 0 6px var(--accent-cyan-glow);
}

.avatar-stack {
  display: flex;
  align-items: center;
}
.avatar-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--bg-dark);
  margin-left: -8px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #ffffff;
}
.avatar-circle:first-child {
  margin-left: 0;
}

/* details-backdrop and details-panel fixed positioning */
.details-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.details-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.details-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  background: rgba(8, 11, 18, 0.92);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -10px 0 45px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  z-index: 200;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.details-panel.active {
  right: 0;
}

/* Layout swapping feature styles */
.btn-expand-details {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.btn-expand-details:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

#tasks-sub-all-tasks {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#tasks-sub-all-tasks .glass-panel {
  display: flex;
  gap: 20px;
  flex: 1;
  min-height: 0;
}

#tasks-sub-all-tasks .inline-list-pane {
  flex: 1;
  transition: all 0.3s ease;
  width: 100%;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: 200px;
}

#tasks-sub-all-tasks .inline-details-pane {
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  flex: none;
  background: rgba(8, 11, 18, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#tasks-sub-all-tasks.inline-work-mode .inline-list-pane {
  display: none; /* It gets moved to the right column */
}

#tasks-sub-all-tasks.inline-work-mode .inline-details-pane {
  flex: 1;
  width: 100%;
  opacity: 1;
  padding: 0;
}

.inline-list-pane.in-right-col .tasks-data-table th:nth-child(3),
.inline-list-pane.in-right-col .tasks-data-table td:nth-child(3),
.inline-list-pane.in-right-col .tasks-data-table th:nth-child(4),
.inline-list-pane.in-right-col .tasks-data-table td:nth-child(4),
.inline-list-pane.in-right-col .tasks-data-table th:nth-child(6),
.inline-list-pane.in-right-col .tasks-data-table td:nth-child(6) {
  display: none !important;
}

.inline-list-pane.in-right-col .tasks-data-table td {
  padding: 14px 12px;
}

.inline-list-pane.in-right-col .tasks-data-table th {
  padding: 8px;
  font-size: 0.65rem;
}

.inline-list-pane.in-right-col {
  max-height: calc(100vh - 170px);
  padding: 28px 18px 48vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 238, 255, 0.45) rgba(255, 255, 255, 0.04);
  background:
    radial-gradient(circle at 28% 0%, rgba(0, 238, 255, 0.07), transparent 34%),
    linear-gradient(180deg, rgba(12, 17, 26, 0.94), rgba(7, 10, 16, 0.96));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 20px 50px rgba(0, 0, 0, 0.34);
}

.inline-list-pane.in-right-col::-webkit-scrollbar {
  width: 6px;
}

.inline-list-pane.in-right-col::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.inline-list-pane.in-right-col::-webkit-scrollbar-thumb {
  background: rgba(0, 238, 255, 0.45);
  border-radius: 999px;
}

.inline-list-pane.in-right-col .sprint-section-header {
  position: sticky;
  top: 0;
  z-index: 50;
  align-items: center;
  min-height: 54px;
  padding-bottom: 20px;
  background: linear-gradient(180deg, rgba(9, 13, 21, 0.98) 0%, rgba(9, 13, 21, 0.86) 72%, rgba(9, 13, 21, 0) 100%);
}

.inline-list-pane.in-right-col .section-title {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.inline-list-pane.in-right-col .tasks-data-table {
  display: block;
  border-spacing: 0;
  margin-top: 0;
}

.inline-list-pane.in-right-col .tasks-data-table thead,
.inline-list-pane.in-right-col .tasks-data-table tbody,
.inline-list-pane.in-right-col .tasks-data-table tr,
.inline-list-pane.in-right-col .tasks-data-table td {
  display: block;
}

.inline-list-pane.in-right-col .tasks-data-table thead tr {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 120px;
  align-items: center;
  padding: 0 8px 16px;
}

.inline-list-pane.in-right-col .tasks-data-table tbody {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.inline-list-pane.in-right-col .tasks-data-table tbody::before {
  content: "";
  position: absolute;
  inset: 10px auto 0 22px;
  width: 1px;
  background: linear-gradient(180deg, rgba(0, 238, 255, 0.36), rgba(255, 255, 255, 0.04));
  pointer-events: none;
}

.inline-list-pane.in-right-col .tasks-data-table tr.table-row-clickable {
  position: sticky;
  top: calc(78px + (var(--index) * 10px));
  z-index: calc(1 + var(--index));
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 116px;
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 34%),
    rgba(5, 8, 14, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 -18px 30px rgba(0, 0, 0, 0.46), 0 1px 0 rgba(255, 255, 255, 0.025) inset;
  overflow: hidden;
  transform: translateZ(0);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.inline-list-pane.in-right-col .tasks-data-table tr.table-row-clickable:hover {
  border-color: rgba(0, 238, 255, 0.24);
  transform: translateY(-3px);
}

.inline-list-pane.in-right-col .tasks-data-table tr.table-row-clickable.selected {
  border-color: rgba(0, 238, 255, 0.55);
  background:
    linear-gradient(90deg, rgba(0, 238, 255, 0.12), rgba(0, 238, 255, 0.02) 50%),
    rgba(7, 12, 19, 0.98);
  box-shadow: 0 -18px 30px rgba(0, 0, 0, 0.46), 0 0 30px rgba(0, 238, 255, 0.16);
}

.inline-list-pane.in-right-col .tasks-data-table tr.table-row-clickable.stack-arriving {
  animation: task-card-arrive 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.inline-list-pane.in-right-col .tasks-data-table tr.table-row-clickable.selected::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent-cyan);
  box-shadow: 0 0 18px var(--accent-cyan);
}

.inline-list-pane.in-right-col .tasks-data-table tr.table-row-clickable td {
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.inline-list-pane.in-right-col .tasks-data-table tr.table-row-clickable td:first-child {
  padding-left: 16px;
}

.inline-list-pane.in-right-col .tasks-data-table tr.table-row-clickable .td-task-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 14px;
  font-family: var(--font-display);
  color: var(--text-color);
}

.task-card-title {
  display: block;
  font-size: clamp(1.08rem, 1.5vw, 1.35rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

.task-card-meta {
  display: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inline-list-pane.in-right-col .task-card-meta {
  display: block;
}

.inline-list-pane.in-right-col .tasks-data-table tr.table-row-clickable td:nth-child(5) {
  padding-right: 18px;
}

.inline-list-pane.in-right-col .status-pill {
  min-width: 0;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
}

.inline-list-pane.in-right-col .table-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

@keyframes task-card-arrive {
  0% {
    transform: translateY(24px) scale(0.985);
    opacity: 0.78;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
}

.inline-list-pane.in-right-col .btn-expand-details .icon-expand {
  display: none !important;
}
.inline-list-pane.in-right-col .btn-expand-details .icon-collapse {
  display: block !important;
}

.mini-dials-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  width: 100%;
}
.dial-card.mini-mode {
  padding: 8px 12px !important;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 1;
}
.dial-card.mini-mode .dial-gauge-container {
  transform: scale(0.35);
  transform-origin: left center;
  margin: -42px -85px -42px 0;
}
.dial-card.mini-mode .dial-title {
  margin-top: 0;
  font-size: 0.7rem;
  text-align: left;
  line-height: 1.2;
}

.details-body {
  flex: 0 1 auto;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 4px;
  min-height: 0;
}
/* Custom scrollbar for details body */
.details-body::-webkit-scrollbar {
  width: 4px;
}
.details-body::-webkit-scrollbar-track {
  background: transparent;
}
.details-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.details-assignee-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.details-assignee-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.assignee-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
}
.status-dropdown-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(229, 169, 60, 0.15);
  border: 1px solid rgba(229, 169, 60, 0.25);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-amber);
  cursor: pointer;
  transition: all 0.2s ease;
}
.status-dropdown-pill:hover {
  background: rgba(229, 169, 60, 0.22);
}
.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-amber);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-amber-glow);
}
.details-section-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 16px 0;
}
.read-more-link {
  color: var(--accent-cyan);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-top: 8px;
  transition: opacity 0.2s ease;
}
.read-more-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}
.details-members-section {
  margin-top: 10px;
}

/* Status dropdown pill colors based on task status */
.status-dropdown-pill.completed {
  background: rgba(60, 211, 149, 0.15) !important;
  border-color: rgba(60, 211, 149, 0.25) !important;
  color: var(--text-green) !important;
}
.status-dropdown-pill.completed .status-dot {
  background-color: var(--text-green) !important;
  box-shadow: 0 0 6px rgba(60, 211, 149, 0.4);
}
.status-dropdown-pill.progress {
  background: rgba(0, 238, 255, 0.15) !important;
  border-color: rgba(0, 238, 255, 0.25) !important;
  color: var(--accent-cyan) !important;
}
.status-dropdown-pill.progress .status-dot {
  background-color: var(--accent-cyan) !important;
  box-shadow: 0 0 6px var(--accent-cyan-glow);
}
.status-dropdown-pill.todo {
  background: rgba(229, 169, 60, 0.15) !important;
  border-color: rgba(229, 169, 60, 0.25) !important;
  color: var(--accent-amber) !important;
}
.status-dropdown-pill.todo .status-dot {
  background-color: var(--accent-amber) !important;
  box-shadow: 0 0 6px var(--accent-amber-glow);
}


.details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.details-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.btn-close-details {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}
.btn-close-details:hover {
  color: #ffffff;
}

.details-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 24px;
}

.details-meta-grid {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 0.85rem;
}
.meta-label {
  color: var(--text-muted);
  font-weight: 500;
}
.meta-value {
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.details-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  margin-top: 24px;
}
.details-desc {
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px;
}

.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checklist-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
}
.checklist-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.checklist-checkbox svg {
  opacity: 0;
}
.checklist-row.checked .checklist-checkbox {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan-glow);
}
.checklist-row.checked .checklist-checkbox svg {
  opacity: 1;
}
.checklist-row.checked .checklist-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.details-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.03);
}
.btn-details-act {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  color: #ffffff;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-details-act:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-cyan);
}
.btn-details-act.btn-action-complete {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-amber));
  border: none;
  box-shadow: 0 4px 10px var(--accent-cyan-glow);
}

/* ==========================================
   8. MODAL WINDOW: ADD TASK
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  width: 500px;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}
.modal-overlay.active .modal-box {
  transform: translateY(0);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
}
.modal-close-btn {
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
}
.modal-close-btn:hover {
  color: #ffffff;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 16px;
  color: #ffffff;
  outline: none;
  font-size: 0.85rem;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}
.form-select option {
  background-color: var(--bg-base);
  color: #ffffff;
}
.form-textarea {
  height: 80px;
  resize: none;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  color: #ffffff;
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--panel-border-hover);
}

/* ==========================================
   9. NEW TASK MANAGEMENT SEPARATE CARD TABLE
   ========================================== */
.tasks-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
  font-size: 0.85rem;
  margin-top: -12px;
}
.tasks-data-table th {
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 16px;
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.tasks-data-table td {
  padding: 16px;
  background: var(--bg-card, rgba(8, 11, 18, 1));
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.95rem;
  z-index: 1;
}
.tasks-data-table td:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.03);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}
.tasks-data-table td:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}
.tasks-data-table tr {
  transition: all 0.2s ease;
  cursor: pointer;
}
.tasks-data-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 238, 255, 0.2) !important;
}
.tasks-data-table tr.selected td {
  background: rgba(0, 238, 255, 0.03) !important;
  border-top-color: rgba(0, 238, 255, 0.4) !important;
  border-bottom-color: rgba(0, 238, 255, 0.4) !important;
  box-shadow: 0 0 10px rgba(0, 238, 255, 0.05);
}
.tasks-data-table tr.selected td:first-child {
  border-left-color: rgba(0, 238, 255, 0.4) !important;
}
.tasks-data-table tr.selected td:last-child {
  border-right-color: rgba(0, 238, 255, 0.4) !important;
}

.table-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
}
.table-row-clickable:hover .table-checkbox,
.table-row-clickable.selected .table-checkbox {
  border-color: var(--accent-cyan);
  background: rgba(0, 238, 255, 0.05);
  box-shadow: 0 0 8px var(--accent-cyan-glow);
}
.table-checkbox.checked {
  background: var(--accent-cyan) !important;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 8px var(--accent-cyan-glow) !important;
}
.table-checkbox svg {
  display: none;
}
.table-checkbox.checked svg {
  display: block;
}

/* Priority hex alignment */
.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-transform: capitalize;
  font-size: 0.8rem;
}

.priority-hex {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: var(--badge-color);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  box-shadow: 0 0 8px var(--badge-color);
}

}

/* ==========================================
   STACKING TASK CARDS
   ========================================== */
.tasks-card-list-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 12px;
}

.tasks-card-list {
  display: flex;
  flex-direction: column;
  position: relative;
}

.task-card-row {
  display: flex;
  align-items: center;
  background: var(--bg-card, rgba(8, 11, 18, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  
  /* Stacking Logic */
  position: sticky;
  top: calc(0px + (var(--index) * 8px));
  box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.5);
}

.task-card-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.task-card-row.selected {
  background: rgba(43, 90, 255, 0.15);
  border-color: var(--accent-blue);
}


/* ==========================================
   VIEW TRANSITIONS (Apple-like Spatial Morphing)
   ========================================== */
.inline-list-pane {
  view-transition-name: task-list-pane;
}
.inline-details-pane {
  view-transition-name: task-details-pane;
}
#dials-wrapper {
  view-transition-name: dials-wrapper;
}
.dial-card:nth-child(1) { view-transition-name: dial-1; }
.dial-card:nth-child(2) { view-transition-name: dial-2; }
.dial-card:nth-child(3) { view-transition-name: dial-3; }

.details-footer {
  view-transition-name: task-footer;
}
.mini-dials-row {
  view-transition-name: mini-dials;
}

::view-transition-group(*) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
}
::view-transition-old(*),
::view-transition-new(*) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
}
