/* Command Center — Unified Dashboard Styles */

.cc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  padding: 12px;
}

.cc-card {
  background: rgba(30, 30, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.cc-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cc-icon { font-size: 1.3em; }

.cc-title {
  font-weight: 700;
  font-size: 0.95em;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cc-card-body { color: #cbd5e1; font-size: 0.9em; }

/* Race Card */
.cc-race { grid-column: span 2; }

.cc-race-leader {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.4em;
  font-weight: 800;
  margin-bottom: 6px;
}

.cc-leader-crown { font-size: 1.2em; }
.cc-leader-name { color: #fbbf24; }
.cc-leader-score { color: #fcd34d; margin-left: auto; }

.cc-race-gap {
  font-size: 0.85em;
  color: #94a3b8;
  margin-bottom: 10px;
}

.cc-race-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.cc-race-name {
  font-weight: 600;
  min-width: 100px;
  font-size: 0.88em;
}

.cc-race-bar-container {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.cc-race-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.cc-race-score {
  font-weight: 700;
  min-width: 50px;
  text-align: right;
  font-size: 0.88em;
}

.cc-drama-flash {
  text-align: center;
  font-size: 1.1em;
  font-weight: 800;
  padding: 6px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.15);
  animation: cc-pulse 1.5s ease infinite;
}

@keyframes cc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Season Card */
.cc-season-num {
  font-size: 1.3em;
  font-weight: 800;
  color: #818cf8;
  margin-bottom: 8px;
}

.cc-progress-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 4px;
}

.cc-progress-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s ease;
}

.cc-progress-text { font-size: 0.85em; color: #94a3b8; }
.cc-season-time { font-size: 0.95em; margin-top: 6px; }
.cc-season-tick { font-size: 0.8em; color: #64748b; margin-top: 2px; }

/* Weather Card */
.cc-weather-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.cc-weather-emoji { font-size: 2em; }
.cc-weather-type { font-size: 1.3em; font-weight: 700; }

.cc-weather-effect {
  font-size: 0.95em;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

.cc-bonus { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.cc-penalty { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.cc-weather-duration { font-size: 0.8em; color: #64748b; margin-top: 4px; }

/* Agent Card */
.cc-agent-summary {
  font-size: 0.85em;
  color: #94a3b8;
  margin-bottom: 8px;
}

.cc-agent-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.cc-agent-status { font-size: 0.6em; }
.cc-online { color: #22c55e; }
.cc-offline { color: #ef4444; }
.cc-agent-emoji { font-size: 1em; }
.cc-agent-name { font-weight: 600; flex: 1; }
.cc-agent-level { font-size: 0.85em; color: #94a3b8; }

/* Drama Card */
.cc-drama-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  margin-bottom: 4px;
  border-radius: 6px;
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.03);
}

.cc-drama-surge { border-left: 3px solid #22c55e; }
.cc-drama-overtake { border-left: 3px solid #f59e0b; }
.cc-drama-close { border-left: 3px solid #ef4444; }

.cc-drama-time { font-size: 0.75em; color: #64748b; }

/* Milestones Card */
.cc-milestone-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.88em;
}

.cc-milestone-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.cc-milestone-bar {
  height: 100%;
  background: linear-gradient(90deg, #818cf8, #a78bfa);
  border-radius: 3px;
}

.cc-milestone-target { font-size: 0.8em; color: #94a3b8; min-width: 80px; text-align: right; }
.cc-milestone-done { color: #fbbf24; }

/* Territory Card */
.cc-territory-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.88em;
}

.cc-territory-name { min-width: 90px; }

.cc-territory-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.cc-territory-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.cc-territory-count { font-size: 0.8em; color: #94a3b8; min-width: 80px; text-align: right; }

/* Alerts Card */
.cc-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  font-size: 0.9em;
}

.cc-alert-danger { background: rgba(239, 68, 68, 0.15); border-left: 3px solid #ef4444; }
.cc-alert-warning { background: rgba(245, 158, 11, 0.15); border-left: 3px solid #f59e0b; }
.cc-alert-good { background: rgba(16, 185, 129, 0.15); border-left: 3px solid #10b981; }

.cc-alert-icon { font-size: 1.2em; }
.cc-alert-clear { color: #64748b; font-style: italic; }

/* Footer */
.cc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  font-size: 0.8em;
  color: #64748b;
}

.cc-refresh-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  color: #94a3b8;
  font-size: 1em;
  transition: all 0.2s;
}

.cc-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.cc-no-data { color: #64748b; font-style: italic; }

/* Light mode overrides */
[data-theme="light"] .cc-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .cc-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .cc-title { color: #1e293b; }
[data-theme="light"] .cc-card-body { color: #475569; }
[data-theme="light"] .cc-race-gap { color: #64748b; }
[data-theme="light"] .cc-progress-text { color: #64748b; }
[data-theme="light"] .cc-season-tick { color: #94a3b8; }
[data-theme="light"] .cc-agent-summary { color: #64748b; }
[data-theme="light"] .cc-agent-level { color: #64748b; }
[data-theme="light"] .cc-drama-item { background: rgba(0, 0, 0, 0.03); }
[data-theme="light"] .cc-drama-time { color: #94a3b8; }
[data-theme="light"] .cc-milestone-target { color: #64748b; }
[data-theme="light"] .cc-territory-count { color: #64748b; }
[data-theme="light"] .cc-no-data { color: #94a3b8; }
[data-theme="light"] .cc-alert-clear { color: #94a3b8; }

/* Mobile responsive */
@media (max-width: 768px) {
  .cc-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }

  .cc-race { grid-column: span 1; }

  .cc-race-leader { font-size: 1.1em; }
  .cc-race-name { min-width: 70px; font-size: 0.82em; }
  .cc-race-score { min-width: 40px; font-size: 0.82em; }

  .cc-card { padding: 10px; }
  .cc-weather-emoji { font-size: 1.5em; }
  .cc-weather-type { font-size: 1.1em; }
}
