/* Dashboard Landing Page - FOB: Business Command */

/* Reset for landing page */
.landing-page {
  display: flex;
  min-height: 100vh;
  background: var(--bg-primary);
}

/* ========================================
   SIDEBAR
   ======================================== */

.sidebar {
  width: 70px;
  background: linear-gradient(180deg, #0f1419 0%, #0a0d10 100%);
  border-right: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 1rem;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border-default);
}

.sidebar-logo .logo-icon {
  width: 40px;
  height: 40px;
  font-size: 0.65rem;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  gap: 0.25rem;
}

.sidebar-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-link span {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  text-decoration: none;
}

.sidebar-link.active {
  background: rgba(243, 156, 18, 0.15);
  color: var(--accent-primary);
}

.sidebar-footer {
  padding: 0.5rem;
  border-top: 1px solid var(--border-default);
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */

.main-content {
  flex: 1;
  margin-left: 70px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-default);
}

.header-left .logo-text {
  font-size: 1rem;
  font-weight: 600;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-name {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

/* Dashboard Container */
.dashboard {
  flex: 1;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
}

/* ========================================
   HERO BANNER - Immersive Full-Width Style
   ======================================== */

.hero-banner {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-default);
  overflow: hidden;
}

/* Background Image Layer */
.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../media/hero-dashboard.png') center/cover no-repeat;
  z-index: 0;
}

/* Gradient Overlay Layer */
.hero-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
    rgba(13, 17, 23, 0.92) 0%,
    rgba(13, 17, 23, 0.75) 40%,
    rgba(13, 17, 23, 0.5) 70%,
    rgba(13, 17, 23, 0.3) 100%);
  z-index: 1;
}

.hero-text-section,
.hero-stats-section,
.hero-video-btn {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
  margin: 0;
  font-style: italic;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-title .highlight {
  color: var(--accent-primary);
}

/* Stats Section */
.hero-stats-section {
  display: flex;
  gap: 2rem;
}

.stat-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  background: rgba(243, 156, 18, 0.1);
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Video Button */
.hero-video-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(243, 156, 18, 0.2);
  border: 1px solid var(--accent-primary);
  border-radius: 6px;
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
}

.hero-video-btn:hover {
  background: var(--accent-primary);
  color: var(--text-on-accent);
}

/* ========================================
   MISSION MAP
   ======================================== */

.mission-map {
  flex: 1;
}

.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

/* Phases Grid - 2x2 */
.phases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* Phase Card */
.phase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  display: block;
}

.phase-card:hover {
  border-color: var(--accent-primary);
  text-decoration: none;
}

.phase-card.phase-available {
  border-color: rgba(39, 174, 96, 0.5);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(39, 174, 96, 0.05) 100%);
}

.phase-card.phase-available:hover {
  border-color: var(--accent-success);
  box-shadow: 0 0 20px rgba(39, 174, 96, 0.2);
}

.phase-card.phase-locked {
  opacity: 0.7;
}

/* Phase Header */
.phase-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.phase-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.phase-icon-badge.phase-1 { background: linear-gradient(135deg, #27ae60, #1e8449); }
.phase-icon-badge.phase-2 { background: linear-gradient(135deg, #f39c12, #d68910); }
.phase-icon-badge.phase-3 { background: linear-gradient(135deg, #3498db, #2980b9); }
.phase-icon-badge.phase-4 { background: linear-gradient(135deg, #9b59b6, #8e44ad); }

.phase-header h3 {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.phase-header h3 span {
  color: var(--text-secondary);
  font-weight: 500;
}

.phase-status-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phase-status-icon.available {
  background: var(--accent-success);
  color: white;
}

.phase-status-icon.locked {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.phase-status-icon.in-progress {
  background: var(--accent-primary);
  color: var(--text-on-accent);
}

/* Progress Bar */
.phase-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-success));
  border-radius: 3px;
  transition: width 0.3s;
}

.progress-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Phase Items */
.phase-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.phase-items li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
}

.phase-items li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* ========================================
   DASHBOARD FOOTER
   ======================================== */

.dashboard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-default);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon.small {
  width: 32px;
  height: 32px;
  font-size: 0.55rem;
}

.brand-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================
   VIDEO MODAL
   ======================================== */

.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.video-modal.active {
  opacity: 1;
  visibility: visible;
}

.video-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.video-modal.active .video-modal-content {
  transform: scale(1);
}

.video-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}

.video-modal-close:hover {
  background: rgba(243, 156, 18, 0.8);
}

#video-player-container {
  min-height: 400px;
  max-height: 80vh;
  aspect-ratio: 16 / 9;
}

#video-player-container .video-player {
  width: 100%;
  height: 100%;
}

#video-player-container .video-player__display {
  aspect-ratio: 16 / 9;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
  .hero-stats-section {
    gap: 1.5rem;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
  }

  .stat-icon svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 992px) {
  .hero-banner {
    flex-wrap: wrap;
    gap: 1.5rem;
    min-height: 280px;
    padding: 2rem 1.5rem;
  }

  .hero-text-section {
    flex: 1 1 100%;
  }

  .hero-stats-section {
    flex: 1;
  }

  .phases-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: 60px;
    flex-direction: row;
    bottom: 0;
    top: auto;
    border-right: none;
    border-top: 1px solid var(--border-default);
  }

  .sidebar-logo {
    border-bottom: none;
    border-right: 1px solid var(--border-default);
    padding: 0.5rem 1rem;
  }

  .sidebar-nav {
    flex-direction: row;
    justify-content: center;
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .sidebar-link {
    padding: 0.5rem 0.75rem;
  }

  .sidebar-link span {
    display: none;
  }

  .sidebar-footer {
    border-top: none;
    border-left: 1px solid var(--border-default);
    padding: 0.5rem;
  }

  .main-content {
    margin-left: 0;
    margin-bottom: 60px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-banner {
    min-height: 240px;
    padding: 1.5rem 1.25rem;
  }

  .hero-stats-section {
    gap: 1rem;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
  }

  .stat-value {
    font-size: 1rem;
  }

  .dashboard-footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  /* Video Modal - Mobile */
  .video-modal-content {
    width: 95%;
    max-width: none;
    border-radius: 8px;
  }

  #video-player-container {
    min-height: 200px;
    max-height: 60vh;
  }

  .video-modal-close {
    top: -36px;
    right: 0;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
  }

  .video-modal-close svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .dashboard {
    padding: 1rem;
  }

  .hero-banner {
    min-height: 200px;
    padding: 1.25rem 1rem;
  }

  .hero-title {
    font-size: 1.25rem;
  }

  .hero-video-btn span {
    display: none;
  }

  .phase-card {
    padding: 0.875rem 1rem;
  }

  .phase-header h3 {
    font-size: 0.75rem;
  }

  .phase-items li {
    font-size: 0.75rem;
  }

  /* Video Modal - Extra small screens */
  .video-modal-content {
    width: 98%;
  }

  #video-player-container {
    min-height: 180px;
    max-height: 55vh;
  }

  .video-modal-close {
    top: -32px;
    width: 28px;
    height: 28px;
  }

  .video-modal-close svg {
    width: 16px;
    height: 16px;
  }
}

/* ========================================
   LIGHT THEME OVERRIDES
   ======================================== */

/* Light sidebar */
[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f5f6f8 100%);
  border-right-color: #d1d5db;
}

[data-theme="light"] .sidebar-logo {
  border-bottom-color: #d1d5db;
}

[data-theme="light"] .sidebar-link {
  color: #6b7280;
}

[data-theme="light"] .sidebar-link:hover {
  background: #eef1f5;
  color: #1a1a2e;
}

[data-theme="light"] .sidebar-link.active {
  background: rgba(154, 98, 0, 0.1);
  color: #9a6200;
}

[data-theme="light"] .sidebar-footer {
  border-top-color: #d1d5db;
}

[data-theme="light"] .sidebar-logo .logo-icon {
  background: #9a6200;
}
