@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Orbitron:wght@800;900&family=Fira+Code:wght@400;500&display=swap');

:root {
  --bg-main: #0c0919;
  --bg-sidebar: rgba(18, 14, 33, 0.75);
  --bg-panel: rgba(24, 20, 44, 0.65);
  --bg-panel-solid: #1c1830;
  --bg-panel-hover: rgba(35, 30, 62, 0.8);
  --border-panel: rgba(120, 100, 180, 0.15);
  --border-glow: rgba(120, 100, 180, 0.2);

  --accent-cyan: #ab8eff;
  --accent-blue: #5c67f2;
  --accent-purple: #8c52ff;
  --accent-red: #ff3366;
  --accent-green: #2ecc71;
  --accent-yellow: #f1c40f;

  --text-primary: #fcfbfe;
  --text-secondary: #9b94b0;
  --text-muted: #5b5470;

  --shadow-neon-cyan: 0 0 20px rgba(171, 142, 255, 0.25);
  --shadow-neon-blue: 0 0 20px rgba(92, 103, 242, 0.25);
  --shadow-neon-purple: 0 0 20px rgba(140, 82, 255, 0.25);
  --shadow-neon-red: 0 0 20px rgba(255, 51, 102, 0.35);

  --font-display: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-ui: 'Inter', -apple-system, sans-serif;
  --font-code: 'Fira Code', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  background-color: var(--bg-main);
  background-image: radial-gradient(circle at 50% 10%, #1c0f3c 0%, var(--bg-main) 85%);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ==========================================
   HEADER
   ========================================== */
.app-header {
  height: 72px;
  background: rgba(6, 8, 19, 0.7);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-bottom: 1px solid var(--border-panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
  flex-shrink: 0;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 6px rgba(197, 163, 255, 0.3));
}

.logo-text h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(197, 163, 255, 0.35));
  line-height: 1.0;
}

.logo-text p {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.85;
  margin-top: 4px;
}

/* AI status dot */
.central-brain-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(35, 209, 96, 0.05);
  border: 1px solid rgba(35, 209, 96, 0.15);
  padding: 5px 12px;
  border-radius: 20px;
  margin-left: 24px;
  transition: all 0.3s;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
}

.green-pulse {
  box-shadow: 0 0 10px var(--accent-green);
  animation: light-pulse 2s infinite ease-out;
}

.status-text {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-green);
  letter-spacing: 0.2px;
}

/* Search Box */
.header-search {
  flex: 0 1 400px;
  margin: 0 20px;
}

.search-box {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-panel);
  border-radius: 24px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box:focus-within {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.1);
}

.search-box svg {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.8rem;
  width: 100%;
  outline: none;
  font-family: var(--font-ui);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.project-indicator {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.project-indicator .label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-indicator .val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.date-time-widget {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.weather-info {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.015);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-panel);
}

.weather-text {
  font-size: 0.75rem;
  font-family: var(--font-ui);
  color: var(--text-secondary);
}

.weather-icon {
  width: 16px;
  height: 16px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.04);
  border: 1.5px solid rgba(0, 242, 254, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.1);
  transition: all 0.3s;
}

.user-profile:hover .user-avatar {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-neon-cyan);
  transform: scale(1.05);
}

/* ==========================================
   MAIN LAYOUT CONTAINER
   ========================================== */
.dashboard-container {
  flex: 1;
  display: grid;
  grid-template-columns: 64px 1fr 360px;
  gap: 20px;
  padding: 20px;
  overflow: hidden;
  position: relative;
}

/* ==========================================
   LEFT TOOLBAR (Navigation Sidebar)
   ========================================== */
.left-toolbar {
  background: var(--bg-sidebar);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--border-panel);
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  gap: 20px;
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.4);
  height: 320px !important;
  align-self: center;
  width: 52px;
  margin: 0 auto;
}

.toolbar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.toolbar-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.0;
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transform: scale(1.08);
}

.toolbar-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(92, 103, 242, 0.45);
}

/* ==========================================
   CENTER WORKSPACE
   ========================================== */
.center-workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}

/* Workspace Header & Alarm Banner */
.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  height: 36px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.01);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-panel);
}

.loc-pin {
  display: flex;
  align-items: center;
  color: var(--accent-cyan);
}

.loc-pin svg {
  width: 15px;
  height: 15px;
}

.bc-item {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.bc-item.active {
  color: var(--text-primary);
  font-weight: 700;
}

.bc-separator {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Alarm notification banner */
.live-alert-banner {
  background: rgba(255, 56, 96, 0.08);
  border: 1px solid rgba(255, 56, 96, 0.3);
  box-shadow: var(--shadow-neon-red);
  padding: 6px 16px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-red);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: banner-glow 2.5s infinite ease-in-out;
}

@keyframes banner-glow {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(255, 56, 96, 0.15);
    border-color: rgba(255, 56, 96, 0.25);
  }

  50% {
    box-shadow: 0 0 22px rgba(255, 56, 96, 0.45);
    border-color: rgba(255, 56, 96, 0.5);
  }
}

/* 3D Map Viewport */
.map-viewport {
  flex: 1;
  background: var(--bg-panel-solid);
  border: 1px solid var(--border-panel);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.65), 0 12px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-background-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.map-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  filter: saturate(1.2) brightness(0.9) contrast(1.05);
}

/* 25M Danger Zone Marked Red */
.danger-zone-25m {
  position: absolute;
  background: rgba(255, 56, 96, 0.05);
  border: 1.5px dashed rgba(255, 56, 96, 0.5);
  box-shadow: 0 0 30px rgba(255, 56, 96, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotateX(60deg) rotateZ(-30deg);
  pointer-events: none;
  z-index: 5;
}

.zone-label {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%) rotateZ(30deg) rotateX(-60deg);
  color: var(--accent-red);
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(255, 56, 96, 0.5);
  white-space: nowrap;
}

.expanding-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 56, 96, 0.35);
  box-sizing: border-box;
  animation: hazard-ring-pulse 3s infinite linear;
}

.expanding-ring.ring2 {
  animation-delay: 1.5s;
}

@keyframes hazard-ring-pulse {
  0% {
    transform: scale(0.95);
    opacity: 1;
    box-shadow: inset 0 0 10px rgba(255, 56, 96, 0.15);
  }

  100% {
    transform: scale(1.35);
    opacity: 0;
    box-shadow: inset 0 0 25px rgba(255, 56, 96, 0);
  }
}

/* Map pins overlay */
.map-pins-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.map-pin {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
}

.pin-marker {
  width: 36px;
  height: 20px;
  background: var(--bg-panel-solid);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  color: #fff;
  border: 1.5px solid var(--accent-cyan);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), var(--shadow-neon-cyan);
  z-index: 2;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-pin:hover .pin-marker {
  transform: scale(1.15);
}

.pin-pulse {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  z-index: 1;
  animation: pulse 2s infinite ease-out;
}

/* active safe worker pin */
.active-pin .pin-marker {
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), var(--shadow-neon-cyan);
}

.active-pin .pin-pulse {
  background: rgba(0, 242, 254, 0.12);
  border: 1.5px solid rgba(0, 242, 254, 0.35);
}

/* warning worker pin near edge */
.active-pin-yellow .pin-marker {
  border-color: var(--accent-yellow);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), 0 0 12px rgba(255, 221, 87, 0.35);
}

.pin-pulse-yellow {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  z-index: 1;
  animation: pulse 2s infinite ease-out;
  background: rgba(255, 221, 87, 0.12);
  border: 1.5px solid rgba(255, 221, 87, 0.35);
}

/* warning worker pin INSIDE danger zone */
.warning-pin .pin-marker {
  background: #ff3860;
  border-color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), var(--shadow-neon-red);
}

.warning-pin .pin-pulse {
  background: rgba(255, 56, 96, 0.18);
  border: 1.5px solid rgba(255, 56, 96, 0.45);
}

.critical-blink {
  animation: alert-blink-scale 1.5s infinite ease-in-out;
}

.critical-blink-bg {
  animation: alert-blink-bg-glow 1.5s infinite ease-in-out;
}

@keyframes alert-blink-scale {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1.0);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.15);
  }
}

@keyframes alert-blink-bg-glow {

  0%,
  100% {
    background: rgba(255, 56, 96, 0.015);
    border-color: var(--border-panel);
  }

  50% {
    background: rgba(255, 56, 96, 0.12);
    border-color: rgba(255, 56, 96, 0.4);
    box-shadow: inset 0 0 10px rgba(255, 56, 96, 0.2);
  }
}

/* Asset pins (cranes, excavators) */
.asset-pin .pin-marker-asset {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0f1326;
  border: 1.5px solid var(--accent-purple);
  color: var(--accent-purple);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.2s;
}

.asset-pin:hover .pin-marker-asset {
  transform: scale(1.15);
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-neon-cyan);
}

.asset-pin .pin-marker-asset svg {
  width: 14px;
  height: 14px;
}

/* Floating labels offset so they don't overlap with pins */
.pin-tag {
  position: absolute;
  bottom: -24px;
  /* Move tag below the pin to prevent overlap */
  background: rgba(255, 56, 96, 0.9);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.tag-critical {
  background: var(--accent-red) !important;
  color: white !important;
  border-color: #fff !important;
  animation: blink-anim 1.5s infinite steps(2);
}

@keyframes blink-anim {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

/* Floating controls HUD */
.map-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
}

.map-control-btn {
  width: 36px;
  height: 36px;
  background: rgba(8, 10, 20, 0.85);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-panel);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
}

.map-control-btn:hover {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-neon-blue);
}

.map-control-btn svg {
  width: 15px;
  height: 15px;
}

.zoom-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-panel);
  border-radius: 10px;
  overflow: hidden;
}

.zoom-group .map-control-btn {
  border-radius: 0;
  border: none;
}

/* Area selector floating HUD */
.area-panel {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(8, 10, 20, 0.85);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-panel);
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 20;
}

.area-panel-header {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.area-tabs {
  display: flex;
  gap: 6px;
}

.area-tab {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-panel);
  background: rgba(255, 255, 255, 0.015);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-display);
}

.area-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.area-tab.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(157, 78, 221, 0.15));
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.35);
}

/* ==========================================
   BOTTOM DATA PANELS
   ========================================== */
.bottom-metrics-grid {
  display: grid;
  grid-template-columns: 330px 1fr 1fr;
  gap: 20px;
  height: 190px;
  flex-shrink: 0;
}

.metric-card {
  background: var(--bg-panel);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--border-panel);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

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

.card-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
  letter-spacing: -0.1px;
}

.card-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* RAG Terminal styles */
.RAG-terminal-card {
  padding: 14px;
}

.terminal-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  overflow: hidden;
}

.terminal-body {
  flex: 1;
  padding: 10px 12px;
  font-family: var(--font-code);
  font-size: 0.7rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.terminal-msg {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.terminal-msg .sender {
  font-weight: 600;
  font-size: 0.72rem;
}

.worker-bubble .sender {
  color: var(--accent-blue);
}

.sentinel-bubble .sender {
  color: var(--accent-cyan);
}

.terminal-msg p {
  color: var(--text-secondary);
  line-height: 1.4;
}

.terminal-system {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-yellow);
}

.spinner {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 221, 87, 0.2);
  border-top-color: var(--accent-yellow);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.sys-msg {
  color: var(--text-muted);
  font-style: italic;
}

.terminal-input-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.005);
}

.terminal-input-bar .prompt {
  color: var(--accent-cyan);
  font-family: var(--font-code);
  font-weight: 700;
  font-size: 0.75rem;
}

.terminal-input-bar input {
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--text-primary);
  width: 100%;
}

/* Agentic AI Pipeline flows */
.pipeline-graphic-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 6px;
}

.pipeline-node {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-panel);
  border-radius: 16px;
  width: 64px;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.3s;
}

.pipeline-node .node-icon {
  font-size: 1.25rem;
}

.pipeline-node .node-name {
  font-size: 0.6rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-family: var(--font-display);
}

.pipeline-arrow {
  flex: 1;
  max-width: 44px;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
}

.pipeline-arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 8px;
  height: 8px;
  border-top: 2px solid rgba(255, 255, 255, 0.15);
  border-right: 2px solid rgba(255, 255, 255, 0.15);
  transform: rotate(45deg);
}

.pipeline-arrow.active {
  background: var(--accent-cyan);
  box-shadow: var(--shadow-neon-cyan);
}

.pipeline-arrow.active::after {
  border-color: var(--accent-cyan);
}

/* Pipeline channels */
.pipeline-channels {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.channel-line {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-panel);
  border-radius: 8px;
  padding: 4px 10px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.channel-line .label {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 500;
}

.channel-line.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.12), rgba(79, 172, 254, 0.12));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
}

.channel-line.active .label {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Construction Database */
.dataset-stats-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.ds-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ds-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ds-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.dataset-pipe-visual {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pipe-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.flowing-data-bit {
  position: absolute;
  top: 0;
  left: -24px;
  width: 24px;
  height: 100%;
  border-radius: 3px;
  animation: flow-bit 3s infinite linear;
}

.flowing-data-bit.bg-cyan {
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

.flowing-data-bit.bg-purple {
  background: var(--accent-purple);
  box-shadow: 0 0 6px var(--accent-purple);
}

.flowing-data-bit.bg-blue {
  background: var(--accent-blue);
  box-shadow: 0 0 6px var(--accent-blue);
}

@keyframes flow-bit {
  0% {
    left: -24px;
  }

  100% {
    left: 100%;
  }
}

.pipe-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================
   RIGHT SIDEBAR
   ========================================== */
.right-sidebar {
  background: var(--bg-sidebar);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border-left: 1px solid var(--border-panel);
  border-radius: 24px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  box-shadow: -6px 0 30px rgba(0, 0, 0, 0.35);
}

.sidebar-section {
  background: rgba(255, 255, 255, 0.005);
  border: 1px solid var(--border-panel);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  padding-bottom: 8px;
}

.section-header h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  padding-left: 10px;
  font-family: var(--font-display);
}

.section-header h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 10px;
  background: var(--accent-cyan);
  border-radius: 2px;
}

.sec-right-label {
  font-size: 0.58rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Quick Metrics tiles */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.q-stat-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-panel);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.3s;
}

.q-stat-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.q-label {
  font-size: 0.62rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.q-num-container {
  display: flex;
  align-items: baseline;
}

.q-num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.glow-text-cyan {
  color: var(--accent-cyan);
  text-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

.glow-text-blue {
  color: var(--accent-blue);
  text-shadow: 0 0 12px rgba(79, 172, 254, 0.25);
}

.glow-text-purple {
  color: var(--accent-purple);
  text-shadow: 0 0 12px rgba(157, 78, 221, 0.25);
}

.glow-text-red {
  color: var(--accent-red);
  text-shadow: 0 0 12px rgba(255, 56, 96, 0.35);
}

.warning-stat {
  border-color: rgba(255, 56, 96, 0.2);
  background: rgba(255, 56, 96, 0.015);
}

/* Neural Network layout */
.aibrain-central-section .yield-layout {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 0;
}

.radial-chart-wrapper.neural-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yield-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding-left: 14px;
}

.yield-rate-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.015);
  padding: 5px 10px;
  border-radius: 8px;
  border-left: 3px solid var(--accent-cyan);
}

.yield-rate-item .rate-name {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.yield-rate-item .rate-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.yield-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
}

.yield-table td {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.015);
}

.yield-table td:nth-child(2) {
  text-align: right;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
}

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

/* Worker network list items */
.worker-telemetry-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.worker-vitals-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-panel);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.worker-vitals-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.worker-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.worker-card-header .w-info {
  display: flex;
  flex-direction: column;
}

.worker-card-header .w-id {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.worker-card-header .w-task {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.w-safety-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 6px;
}

.w-safety-score.score-high {
  background: rgba(35, 209, 96, 0.08);
  color: var(--accent-green);
  border: 1.5px solid rgba(35, 209, 96, 0.15);
}

.w-safety-score.score-low {
  background: rgba(255, 56, 96, 0.08);
  color: var(--accent-red);
  border: 1.5px solid rgba(255, 56, 96, 0.25);
  box-shadow: 0 0 6px rgba(255, 56, 96, 0.15);
}

.w-vitals-row {
  display: flex;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.15);
  padding: 6px 10px;
  border-radius: 8px;
}

.w-vitals-row .vital {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.w-vitals-row .vital .v-icon {
  font-size: 0.72rem;
}

.w-vitals-row .vital .v-val {
  font-family: var(--font-display);
  font-weight: 600;
}

.w-alert-desc {
  border-top: 1px dashed rgba(255, 255, 255, 0.04);
  padding-top: 8px;
  margin-top: 2px;
}

.w-alert-desc .rec-title {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
}

.w-alert-desc p {
  font-size: 0.65rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-top: 2px;
}

/* warning glowing borders */
.warning-eq {
  border-color: rgba(255, 56, 96, 0.3) !important;
  background: rgba(255, 56, 96, 0.03) !important;
}

.animate-glowing {
  animation: border-glow-anim 2.5s infinite ease-in-out;
}

@keyframes border-glow-anim {

  0%,
  100% {
    border-color: rgba(255, 56, 96, 0.25);
    box-shadow: 0 0 4px rgba(255, 56, 96, 0.05);
  }

  50% {
    border-color: rgba(255, 56, 96, 0.55);
    box-shadow: 0 0 10px rgba(255, 56, 96, 0.2);
  }
}

.color-red {
  color: var(--accent-red) !important;
}

.font-bold {
  font-weight: 700 !important;
}

/* Supervisor Feed Live timeline */
.supervisor-feed-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.alerts-timeline-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 2px;
}

.timeline-item {
  display: flex;
  gap: 10px;
  border-left: 2px solid rgba(255, 255, 255, 0.04);
  padding-left: 12px;
  margin-left: 5px;
  position: relative;
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.timeline-item .time {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  width: 48px;
  flex-shrink: 0;
  margin-top: 1px;
}

.timeline-item .content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-item .content h4 {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.timeline-item .content p {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.timeline-item .content .loc {
  font-size: 0.6rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}

/* Timeline colors */
.timeline-critical {
  border-left-color: var(--accent-red);
}

.timeline-warning {
  border-left-color: var(--accent-yellow);
}

.timeline-info {
  border-left-color: var(--accent-blue);
}

.timeline-critical::after {
  background: var(--accent-red);
  box-shadow: 0 0 6px var(--accent-red);
}

.timeline-warning::after {
  background: var(--accent-yellow);
  box-shadow: 0 0 6px var(--accent-yellow);
}

.timeline-info::after {
  background: var(--accent-blue);
}

/* ==========================================
   INTERACTIVE TOOLTIPS
   ========================================== */
.pin-tooltip {
  background: rgba(8, 10, 20, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(79, 172, 254, 0.35);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), var(--shadow-neon-blue);
  border-radius: 12px;
  padding: 12px 16px;
  z-index: 999;
  width: 200px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  pointer-events: none;
}

.tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.tooltip-header h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.tooltip-status {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.tooltip-body p {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.35;
}

.tooltip-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.015);
  padding: 4px 8px;
  border-radius: 6px;
}

.tooltip-metric .lbl {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.tooltip-metric .val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--accent-cyan);
}

/* Animations */
@keyframes light-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(35, 209, 96, 0.4);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(35, 209, 96, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(35, 209, 96, 0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.4);
    opacity: 1;
  }

  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}