/* Campaign Command Center — community-collaboration.md #1.
   The tabbed per-campaign control panel the docs describe as the social hub of the
   game, replacing the flat card the campaigns list used to be the only view of. */

.command-center {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}

.cc-header { margin-bottom: 16px; }
.cc-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cc-title h2 { margin: 0; font-size: 22px; }
.cc-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: #21262d;
  color: #8b949e;
  border: 1px solid #30363d;
}
.badge.danger { color: #f85149; border-color: #6e2b28; }
.badge.warn, .badge.claimed { color: #d29922; border-color: #6b5320; }
.badge.open { color: #58a6ff; border-color: #1f4b7f; }
.badge.done, .badge.passed, .badge.executed { color: #2ea043; border-color: #23682f; }
.badge.rejected { color: #f85149; border-color: #6e2b28; }

.cc-progress { margin-top: 12px; }
.bar {
  height: 8px;
  background: #21262d;
  border-radius: 999px;
  overflow: hidden;
}
.bar.small { height: 5px; margin-top: 6px; }
.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2ea043, #58a6ff);
}
.cc-progress-label { font-size: 12px; color: #8b949e; margin-top: 6px; }

.cc-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #30363d;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.cc-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #8b949e;
  padding: 9px 14px;
  font-size: 14px;
  cursor: pointer;
}
.cc-tab:hover { color: #e6edf3; }
.cc-tab.active { color: #58a6ff; border-bottom-color: #58a6ff; }

.cc-panel { display: none; }
.cc-panel.active { display: block; }

/* Overview */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.stat {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #8b949e; }
.stat-value { font-size: 21px; font-variant-numeric: tabular-nums; }
.stat-hint { font-size: 11px; color: #6e7681; }

.owner-controls {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.owner-controls h3 { width: 100%; margin: 0 0 4px; font-size: 14px; }
.owner-controls.locked { opacity: .65; }
.owner-controls label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #8b949e; }
.owner-controls label.checkbox { flex-direction: row; align-items: center; gap: 6px; }
.ctl-msg { margin-top: 10px; font-size: 13px; min-height: 18px; }
.ctl-msg.ok { color: #2ea043; }
.ctl-msg.err { color: #f85149; }

/* Blueprint Editor — desired vs. live vs. per-pixel state */
.blueprint-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #8b949e;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.blueprint-legend i.sw {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}
.sw.completed { background: #2ea043; }
.sw.wrong_color { background: #d29922; }
.sw.contested { background: #f85149; }
.sw.available { background: #30363d; }

.blueprint-compare {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.blueprint-compare figure { margin: 0; }
.blueprint-compare figcaption { font-size: 12px; color: #8b949e; margin-bottom: 6px; }
.blueprint-compare canvas {
  image-rendering: pixelated;
  border: 1px solid #30363d;
  border-radius: 4px;
  background: #0d1117;
}
.bp-summary { margin-top: 14px; font-size: 14px; }

/* Tasks */
.task-form, .proposal-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.task-form input[type=number] { width: 74px; }
.proposal-form { flex-direction: column; max-width: 560px; }
.proposal-form textarea { min-height: 70px; resize: vertical; }

.task {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}
.task-main { flex: 1; min-width: 0; }
.task-side { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Chat */
.chat-log {
  height: 340px;
  overflow-y: auto;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.chat-msg { display: flex; gap: 8px; font-size: 14px; }
.chat-who { color: #58a6ff; flex-shrink: 0; }
.chat-msg.mine .chat-who { color: #2ea043; }
.chat-body { color: #e6edf3; word-break: break-word; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; }

/* Governance */
.proposal {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
}
.proposal-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.proposal p { color: #8b949e; font-size: 14px; margin: 8px 0; }
.proposal-meta { font-size: 12px; color: #6e7681; }
.proposal-meta .ok { color: #2ea043; }
.proposal-meta .warn { color: #d29922; }
.proposal-vote { margin-top: 10px; display: flex; gap: 8px; }

/* --- Map / Contributors / Strategy tabs (added 2026-08-19) ----------------- */
.cc-map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.cc-minimap-wrap { display: inline-block; padding: 8px; border: 1px solid #30363d;
  border-radius: 4px; background: #0d1117; }
#cc-minimap, #cc-footprint { display: block; image-rendering: pixelated; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px;
  margin: 0 3px 0 10px; vertical-align: middle; }

.cc-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 18px; }
.cc-table th, .cc-table td { padding: 7px 10px; border-bottom: 1px solid #21262d; text-align: left; }
.cc-table th { color: #8b949e; font-weight: 600; font-size: 12px; }
.cc-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.role-chip { display: inline-block; font-size: 10px; text-transform: uppercase;
  letter-spacing: .06em; padding: 2px 7px; border-radius: 999px;
  border: 1px solid currentColor; }
/* Creator is visually distinct because it is derived, not granted — it can't be
   revoked in the roster the way the others can. */
.role-creator    { color: #E5D900; }
.role-architect  { color: #58a6ff; }
.role-strategist { color: #CF6EE4; }
.role-defender   { color: #f85149; }
.role-artist     { color: #94E044; }
.role-supporter  { color: #8b949e; }

.cc-role-admin, .cc-discord { margin-top: 22px; padding: 14px 16px;
  border: 1px solid #30363d; border-radius: 4px; background: #0d1117; }
.cc-role-admin h4, .cc-discord h4 { margin: 0 0 6px 0; font-size: 13px; }
.cc-role-form { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.cc-role-form input { flex: 1; min-width: 200px; padding: 6px 9px; font: inherit; font-size: 13px;
  background: #010409; color: inherit; border: 1px solid #30363d; border-radius: 3px; }
.cc-role-form select { padding: 6px 9px; font: inherit; font-size: 13px;
  background: #010409; color: inherit; border: 1px solid #30363d; border-radius: 3px; }
.cc-role-form button { font: inherit; font-size: 13px; padding: 6px 14px; cursor: pointer;
  border-radius: 3px; border: 1px solid #58a6ff; background: transparent; color: #58a6ff; }
.cc-role-form button.ghost { border-color: #30363d; color: #8b949e; }

.cc-strat-advice { padding: 11px 14px; border-left: 3px solid #E59500;
  background: rgba(229,149,0,.07); font-size: 13.5px; margin-bottom: 16px; }
.cc-strat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 20px; }
.cc-stat { padding: 11px; border: 1px solid #30363d; border-radius: 4px; text-align: center; }
.cc-stat .n { display: block; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cc-stat .l { display: block; font-size: 11px; color: #8b949e; margin-top: 3px; }
.cc-hotspots { margin: 0 0 4px 18px; font-size: 13px; }
.cc-hotspots li { margin-bottom: 4px; }

@media (max-width: 900px) {
  .cc-map-grid { grid-template-columns: 1fr; }
  .cc-strat-grid { grid-template-columns: repeat(3, 1fr); }
}
