/* SHC Co-Pilot Dashboard — Brand: Navy #1B2A4A + Gold #C9A84C */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1B2A4A;
  color: #FFFFFF;
  overflow-x: hidden;
}

.command-centre {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === HEADER === */
.cc-header {
  background: linear-gradient(135deg, #0D1525 0%, #1B2A4A 100%);
  border-bottom: 2px solid #C9A84C;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.header-left h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #C9A84C;
}

.header-left .subtitle {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #22c55e;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(34,197,94,0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(34,197,94,0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34,197,94,0);
  }
}

.timestamp {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* === BODY LAYOUT === */
.cc-body {
  display: flex;
  flex: 1;
  gap: 1.5rem;
  padding: 1.5rem;
}

.sidebar-left {
  width: 220px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 1.5rem 1rem;
  height: fit-content;
  position: sticky;
  top: 1.5rem;
}

.sidebar-left h3 {
  font-size: 1rem;
  color: #C9A84C;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-launch-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ql-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: #FFFFFF;
  position: relative;
}

.ql-item:hover {
  background: rgba(201,168,76,0.2);
  transform: translateX(4px);
}

.ql-icon {
  font-size: 1.2rem;
}

.ql-details {
  flex: 1;
}

.ql-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.ql-port {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

.ql-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: absolute;
  top: 8px;
  right: 8px;
}

.ql-status-dot.healthy {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.2);
}

.ql-status-dot.degraded {
  background: #eab308;
  box-shadow: 0 0 0 2px rgba(234,179,8,0.2);
}

.ql-status-dot.stopped {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239,68,68,0.2);
}

/* === MAIN CONTENT === */
.cc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-card {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.1);
}

.section-card h2 {
  font-size: 1.25rem;
  color: #C9A84C;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === PLATFORM HEALTH GRID === */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.platform-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  border-radius: 8px;
  padding: 1.25rem;
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  transition: all 0.3s ease;
}

.platform-card:hover {
  border-color: #C9A84C;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.platform-card.status-healthy {
  border-left: 4px solid #22c55e;
}

.platform-card.status-degraded {
  border-left: 4px solid #eab308;
}

.platform-card.status-stopped {
  border-left: 4px solid #ef4444;
}

.platform-status-dot {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.platform-status-dot.pulse-green {
  background: #22c55e;
  animation: pulse-green 2s infinite;
}

.platform-status-dot.pulse-yellow {
  background: #eab308;
  animation: pulse-yellow 1s infinite;
}

.platform-status-dot.pulse-red {
  background: #ef4444;
  animation: pulse-red 0.5s infinite;
}

@keyframes pulse-yellow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.platform-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #C9A84C;
}

.platform-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.platform-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}

.platform-stats .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.platform-stats .stat-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.25rem;
}

.platform-stats .stat-value {
  font-weight: 600;
  color: #FFFFFF;
}

.btn-launch {
  width: 100%;
  padding: 0.5rem;
  background: linear-gradient(135deg, #C9A84C 0%, #A8883E 100%);
  border: none;
  border-radius: 4px;
  color: #1B2A4A;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.btn-launch:hover {
  background: linear-gradient(135deg, #D4B55E 0%, #C9A84C 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(201,168,76,0.3);
}

/* === STATS + ACTION ITEMS ROW === */
.stats-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-box {
  background: rgba(255,255,255,0.05);
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
}

.stat-box .label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.5rem;
}

.stat-box .value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #C9A84C;
}

/* === ACTION ITEMS === */
.action-items-container {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action-item {
  background: rgba(255,255,255,0.05);
  padding: 1rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
}

.action-item:hover {
  background: rgba(255,255,255,0.08);
}

.action-item.priority-p1, .action-item.priority-critical {
  border-left: 4px solid #ef4444;
}

.action-item.priority-p2, .action-item.priority-high {
  border-left: 4px solid #C9A84C;
}

.action-item.priority-p3, .action-item.priority-medium {
  border-left: 4px solid #2E5FA3;
}

.priority-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.priority-badge.critical, .priority-badge.p1 {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
}

.priority-badge.high, .priority-badge.p2 {
  background: rgba(201,168,76,0.2);
  color: #C9A84C;
}

.priority-badge.medium, .priority-badge.p3 {
  background: rgba(46,95,163,0.2);
  color: #2E5FA3;
}

.action-desc {
  flex: 1;
  font-size: 0.9rem;
}

.action-platform {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

.btn-complete {
  padding: 0.4rem 0.8rem;
  background: rgba(34,197,94,0.2);
  border: 1px solid #22c55e;
  border-radius: 4px;
  color: #22c55e;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-complete:hover {
  background: rgba(34,197,94,0.3);
}

/* === ACTIVITY FEED === */
.activity-feed {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  font-size: 0.85rem;
}

.feed-time {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  min-width: 60px;
}

.feed-icon {
  font-size: 1.2rem;
}

.feed-message {
  flex: 1;
  color: rgba(255,255,255,0.9);
}

/* === SCOREBOARD === */
.scoreboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.team-card {
  background: rgba(255,255,255,0.05);
  padding: 1.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
}

.team-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #C9A84C;
}

.team-score {
  font-size: 2.5rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 1rem;
}

.team-missions {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
  .cc-body {
    flex-direction: column;
  }

  .sidebar-left {
    width: 100%;
    position: static;
  }

  .stats-actions-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .platform-grid {
    grid-template-columns: 1fr;
  }

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