/* ========================================================
   OPERATIONS & QUANT CONSOLE - 2-MODE DASHBOARD & 3D VOXEL HQ
   Mode 1: Real Executive Dashboard (Default View)
   Mode 2: Cozy Pixel Simulation (3D Isometric Voxel HQ - FRIDAY HQ Style)
   Strict Zero Emoji Policy
   ======================================================== */

/* View Mode Segmented Switcher Bar (No Numbers) */
.view-mode-switcher {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  gap: 4px;
}

.view-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.view-mode-btn:hover {
  color: #0f172a;
}

.view-mode-btn.active {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

/* ========================================================
   MODE 1: REAL EXECUTIVE DASHBOARD STYLES
   ======================================================== */
.real-dashboard-mode {
  display: block;
}

.agent-live-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
}

.agent-live-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.15s ease;
}

.agent-live-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.alc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.alc-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alc-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.alc-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.alc-role {
  font-size: 0.72rem;
  color: #64748b;
}

.alc-activity-box {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: #334155;
}

.alc-progress-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.alc-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.73rem;
  font-weight: 700;
  color: #475569;
}

.alc-progress-track {
  width: 100%;
  height: 7px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.alc-progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.35s ease;
}

/* ========================================================
   MODE 2: FIXED VIEWPORT 3D ISOMETRIC PIXEL HEADQUARTERS
   (Matches Uploaded Reference Image 2: Sky Blue Background,
    Left Personnel Roster, Top Floating Pill, Bottom Action Dock)
   ======================================================== */
.pixel-simulation-mode {
  display: none;
}

/* When Mode 2 is active, lock the main viewport so it NEVER scrolls! */
body.pixel-hq-locked,
body.pixel-hq-locked .app-layout,
body.pixel-hq-locked .main-viewport {
  overflow: hidden !important;
  height: 100vh !important;
  max-height: 100vh !important;
}

body.pixel-hq-locked .main-viewport {
  padding: 12px 16px !important;
  display: flex !important;
  flex-direction: column !important;
}

body.pixel-hq-locked .page-title-strip {
  margin-bottom: 10px !important;
  padding-bottom: 8px !important;
  flex-shrink: 0;
}

body.pixel-hq-locked .page-desc {
  display: none !important;
}

/* Sky-Blue Locked 3D Isometric Stage Container */
.voxel-hq-stage {
  position: relative;
  width: 100%;
  height: calc(100vh - 110px);
  min-height: 540px;
  max-height: calc(100vh - 110px);
  background: linear-gradient(180deg, #8fd3f4 0%, #7ec8ee 55%, #71bfe8 100%);
  border: 2px solid #0f172a;
  border-radius: 16px;
  overflow: hidden;
  user-select: none;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  transition: background 0.35s ease;
}

.voxel-hq-stage.night-ambience {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 60%, #090d16 100%);
}

/* Full-Stage Isometric Canvas */
#officeGameCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#officeGameCanvas:active {
  cursor: grabbing;
}

/* Right-Side Interactive Camera & Zoom HUD */
.voxel-camera-hud {
  position: absolute;
  right: 16px;
  bottom: 74px;
  z-index: 16;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid #0f172a;
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 5px 0 #0f172a, 0 10px 20px rgba(15, 23, 42, 0.16);
}

.cam-hud-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
}

.cam-hud-btn:hover {
  border-color: #0f172a;
  background: #f1f5f9;
}

.cam-hud-zoom-label {
  font-size: 0.62rem;
  font-weight: 900;
  color: #0f172a;
  text-align: center;
  padding: 2px 0;
}

.voxel-hint-pill {
  position: absolute;
  bottom: 74px;
  left: 282px;
  z-index: 14;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 0.68rem;
  font-weight: 700;
  pointer-events: none;
}

/* Top-Right Ambience & Liaison Floating Buttons */
.voxel-top-right-controls {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 8px;
}

.voxel-pill-btn {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  transition: all 0.15s ease;
}

.voxel-pill-btn:hover {
  border-color: #0f172a;
  transform: translateY(-1px);
}

/* 1. Top-Center Floating Status Pill (TIMELINE | AUM / PORTFOLIO | ACTIVE QUEUE | AMBIENCE) */
.voxel-top-status-pill {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-38%);
  z-index: 15;
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: 12px;
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 6px 0 #0f172a, 0 10px 20px rgba(15, 23, 42, 0.15);
}

.vtsp-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-right: 18px;
  border-right: 1px solid #e2e8f0;
}

.vtsp-item:last-child {
  padding-right: 0;
  border-right: none;
}

.vtsp-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.vtsp-label {
  font-size: 0.62rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.1;
}

.vtsp-val {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
}

/* 2. Left Floating Personnel Roster Card (Matches Reference Image 2) */
.voxel-roster-panel {
  position: absolute;
  top: 14px;
  left: 14px;
  bottom: 14px;
  width: 256px;
  z-index: 15;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border: 2px solid #0f172a;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 0 #0f172a, 0 12px 24px rgba(15, 23, 42, 0.16);
}

.vrp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.vrp-title {
  font-size: 0.72rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.vrp-dispatch-btn {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 0.7rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.vrp-dispatch-btn:hover {
  background: #1d4ed8;
}

.vrp-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-right: 2px;
}

.vrp-list::-webkit-scrollbar {
  width: 4px;
}

.vrp-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 99px;
}

.vrp-agent-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.14s ease;
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.vrp-agent-card:hover,
.vrp-agent-card.selected {
  border-color: #0f172a;
  background: #f8fafc;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.07);
}

.vrp-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  color: #ffffff;
  flex-shrink: 0;
  position: relative;
}

.vrp-info {
  flex: 1;
  min-width: 0;
}

.vrp-row1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.vrp-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vrp-room {
  font-size: 0.64rem;
  font-weight: 700;
  color: #94a3b8;
  flex-shrink: 0;
}

.vrp-task {
  font-size: 0.69rem;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0 5px 0;
}

.vrp-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.vrp-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #334155;
}

.vrp-badge.busy {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.vrp-badge.moving {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.vrp-pct {
  font-size: 0.66rem;
  font-weight: 800;
  color: #0f172a;
}

.vrp-minibar {
  width: 100%;
  height: 4px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 4px;
}

.vrp-minifill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
}

/* 3. Bottom-Center Floating Action Dock (Matches Reference Image 2) */
.voxel-bottom-dock {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-34%);
  z-index: 15;
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: 14px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 6px 0 #0f172a, 0 12px 28px rgba(15, 23, 42, 0.18);
  max-width: calc(100% - 290px);
  overflow-x: auto;
}

.dock-btn {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.14s ease;
  line-height: 1.2;
}

.dock-btn:hover {
  border-color: #0f172a;
  background: #f8fafc;
}

.dock-btn.primary-dark {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.dock-btn.primary-dark:hover {
  background: #1e293b;
}

.dock-btn.active-cam {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

.dock-divider {
  width: 1px;
  height: 24px;
  background: #e2e8f0;
  margin: 0 2px;
  flex-shrink: 0;
}

/* Floating Character Inspector Modal (Right Side) */
.char-inspector-card {
  position: absolute;
  top: 62px;
  right: 16px;
  width: 295px;
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
  border: 2px solid #0f172a;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 6px 0 #0f172a, 0 16px 32px rgba(15, 23, 42, 0.22);
  z-index: 25;
}

.char-inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.char-inspector-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.char-inspector-role {
  font-size: 0.72rem;
  color: #2563eb;
  margin-top: 2px;
  font-weight: 700;
}

.char-inspector-close {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
}

.char-inspector-close:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.char-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 5px;
  gap: 8px;
}

.char-stat-label {
  color: #64748b;
  font-weight: 600;
}

.char-stat-val {
  color: #0f172a;
  font-weight: 800;
  text-align: right;
}

.char-energy-bar {
  width: 100%;
  height: 7px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin: 4px 0 10px 0;
}

.char-energy-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.char-inspector-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.char-action-btn {
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  border: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.char-action-btn.primary {
  background: #0f172a;
  color: #ffffff;
}

.char-action-btn.primary:hover {
  background: #1e293b;
}

.char-action-btn.secondary {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.char-action-btn.secondary:hover {
  background: #e2e8f0;
}

/* Department Hub Grid (Mode 1) */
.dept-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.dept-hub-card {
  background: #ffffff;
  border: 1px solid var(--border-card, #e2e8f0);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-subtle);
}

.dept-hub-card:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.dept-hub-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}

.dept-hub-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
}

.dept-hub-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.dept-metrics-list {
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  border: 1px solid #f1f5f9;
}

.dept-metric-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.79rem;
  padding: 4px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.dept-metric-item:last-child {
  border-bottom: none;
}

.dept-metric-item span:first-child {
  color: var(--text-muted);
}

.dept-metric-item span:last-child {
  font-weight: 700;
  color: var(--text-primary);
}

@media (max-width: 1024px) {
  .voxel-roster-panel {
    width: 210px;
  }
  .voxel-top-status-pill {
    transform: translateX(-30%);
    padding: 6px 12px;
    gap: 10px;
  }
  .voxel-bottom-dock {
    transform: translateX(-28%);
  }
}

@media (max-width: 768px) {
  .voxel-roster-panel {
    display: none;
  }
  .voxel-top-status-pill {
    left: 12px;
    transform: none;
  }
  .voxel-bottom-dock {
    left: 12px;
    right: 12px;
    transform: none;
    max-width: none;
  }
}
