/* THE FUTURE 24/7 — Command Console: the single site-wide chat widget.
   Right-edge dock (mockup A). Replaces movable-chat + the main-page float. */
#cmdConsole,
#cmdConsole * { box-sizing: border-box; }

#cmdConsole {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 94vw;
  display: flex;
  flex-direction: column;
  z-index: 100000;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, rgba(6, 12, 24, 0.98), rgba(4, 8, 18, 0.99));
  border-left: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.55);
  transform: translateX(0);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
#cmdConsole.cc-collapsed { transform: translateX(102%); }

/* Launcher button (shown when collapsed) */
#cmdFab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: radial-gradient(circle at 32% 30%, #67e8f9, #0ea5e9 58%, #4338ca);
  color: #04101f;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 22px rgba(56, 189, 248, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#cmdFab:hover { transform: scale(1.06); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55), 0 0 30px rgba(56, 189, 248, 0.75); }
#cmdFab svg { width: 26px; height: 26px; }
#cmdFab.cc-hidden { display: none; }

/* Header */
.cc-head { padding: 13px 15px 11px; border-bottom: 1px solid rgba(56, 189, 248, 0.18); }
.cc-title { display: flex; align-items: center; gap: 10px; }
.cc-orb {
  position: relative;
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
  background: radial-gradient(circle at 30% 30%, #67e8f9, #0ea5e9 60%, #312e81);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: #04101f; font-size: 15px;
}
.cc-name { font-size: 14px; font-weight: 800; letter-spacing: 0.07em; color: #e8f4ff; line-height: 1.1; }
.cc-statusline { display: flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px; }
.cc-dot { width: 8px; height: 8px; border-radius: 50%; background: #64748b; box-shadow: 0 0 0 0 rgba(52,211,153,0.6); }
.cc-status--online .cc-dot { background: #34d399; }
.cc-status--active .cc-dot { background: #fbbf24; animation: ccpulse 1s infinite; }
.cc-status--offline .cc-dot { background: #ef4444; }
@keyframes ccpulse { 0% { box-shadow: 0 0 0 0 rgba(251,191,36,0.55);} 100% { box-shadow: 0 0 0 7px rgba(251,191,36,0);} }
.cc-status-text { color: #9fb3d1; }
.cc-status--online .cc-status-text { color: #34d399; }
.cc-status--active .cc-status-text { color: #fbbf24; }
.cc-status--offline .cc-status-text { color: #fca5a5; }

.cc-head-right { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cc-lvl { font-size: 10px; font-weight: 800; color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.4); border-radius: 999px; padding: 2px 9px; letter-spacing: 0.06em; }
.cc-model { font-size: 9.5px; color: #64748b; letter-spacing: 0.05em; white-space: nowrap; }
.cc-model i { color: #34d399; font-style: normal; }
.cc-min { position: absolute; top: 12px; right: 12px; background: none; border: none; color: #64748b; font-size: 20px; cursor: pointer; line-height: 1; padding: 2px 6px; }
.cc-min:hover { color: #e2ecfb; }

/* Usage meter — Claude-style token counter */
.cc-usage { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 10px; color: #7d93b5; }
.cc-usage b { color: #cfe2fb; font-weight: 800; }
.cc-usage .cc-usage-sep { color: #334155; }
.cc-usage .cc-tok-io { color: #5b6b8c; }

.cc-tabs { display: flex; gap: 6px; margin-top: 11px; }
.cc-tab { flex: 1; text-align: center; font-size: 10.5px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; padding: 7px 0; border-radius: 8px; color: #7d93b5; cursor: pointer; border: 1px solid transparent; background: none; font-family: inherit; }
.cc-tab.active { color: #67e8f9; background: rgba(14, 165, 233, 0.12); border-color: rgba(56, 189, 248, 0.35); }
.cc-tab .cc-badge { display: inline-block; min-width: 15px; margin-left: 4px; font-size: 9px; background: #ef4444; color: #fff; border-radius: 999px; padding: 0 4px; }

/* Panels */
.cc-panel { flex: 1; overflow-y: auto; display: none; flex-direction: column; }
.cc-panel.active { display: flex; }

/* Chat */
.cc-log { flex: 1; overflow-y: auto; padding: 15px 15px 8px; display: flex; flex-direction: column; gap: 11px; }
.cc-msg { max-width: 88%; font-size: 12.5px; line-height: 1.55; }
.cc-msg.user { align-self: flex-end; }
.cc-msg.bot { align-self: flex-start; }
.cc-who { font-size: 9px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 4px; color: #38bdf8; }
.cc-msg.user .cc-who { color: #94a3b8; text-align: right; }
.cc-bubble { padding: 10px 13px; border-radius: 12px; white-space: pre-wrap; word-wrap: break-word; }
.cc-msg.bot .cc-bubble { background: rgba(14, 165, 233, 0.08); border: 1px solid rgba(56, 189, 248, 0.22); border-left: 3px solid #38bdf8; border-top-left-radius: 3px; }
.cc-msg.user .cc-bubble { background: rgba(52, 211, 153, 0.09); border: 1px solid rgba(52, 211, 153, 0.25); border-bottom-right-radius: 3px; }
.cc-quick { display: flex; gap: 6px; padding: 8px 15px 0; flex-wrap: wrap; }
.cc-q { font-size: 10.5px; font-weight: 700; color: #c3d3ec; background: rgba(15, 23, 42, 0.8); border: 1px solid rgba(148, 163, 184, 0.25); border-radius: 999px; padding: 6px 11px; cursor: pointer; font-family: inherit; }
.cc-q:hover { border-color: #38bdf8; color: #fff; }
.cc-compose { margin: 11px 15px 15px; display: flex; align-items: flex-end; gap: 8px; background: rgba(15, 23, 42, 0.9); border: 1px solid rgba(56, 189, 248, 0.35); border-radius: 12px; padding: 9px 10px 9px 13px; }
.cc-compose textarea { flex: 1; background: none; border: none; outline: none; color: #e8f4ff; font-size: 13px; font-family: inherit; resize: none; max-height: 120px; line-height: 1.45; }
.cc-send { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; border: none; background: linear-gradient(135deg, #0ea5e9, #6366f1); color: #fff; font-size: 15px; cursor: pointer; box-shadow: 0 0 14px rgba(56, 189, 248, 0.4); }
.cc-send:disabled { opacity: 0.5; cursor: default; }

/* Intel feed */
.cc-feed { padding: 14px 15px; display: flex; flex-direction: column; gap: 10px; }
.cc-feed-item { border: 1px solid rgba(56, 189, 248, 0.2); border-radius: 11px; background: rgba(8, 15, 30, 0.8); padding: 11px 12px; }
.cc-feed-dom { font-size: 9px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #34d399; }
.cc-feed-title { font-size: 12.5px; font-weight: 700; color: #eaf4ff; margin: 4px 0 3px; }
.cc-feed-text { font-size: 11.5px; color: #a9bcd9; line-height: 1.5; }
.cc-empty { color: #64748b; font-size: 12px; padding: 20px 4px; text-align: center; }

/* Level log */
.cc-level { padding: 16px 15px; }
.cc-level-big { font-size: 30px; font-weight: 900; color: #fbbf24; letter-spacing: 0.03em; }
.cc-level-sub { font-size: 11px; color: #93a7c4; margin-bottom: 12px; }
.cc-xp-track { height: 10px; border-radius: 999px; background: rgba(251, 191, 36, 0.14); overflow: hidden; }
.cc-xp-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #fbbf24, #f59e0b); transition: width 0.5s ease; }
.cc-xp-num { font-size: 10.5px; color: #7d93b5; margin-top: 5px; }
.cc-loglist { margin-top: 16px; display: flex; flex-direction: column; gap: 7px; }
.cc-logrow { font-size: 11.5px; color: #c3d3ec; border-left: 2px solid rgba(251,191,36,0.5); padding: 4px 0 4px 10px; }
.cc-logrow em { color: #64748b; font-style: normal; font-size: 10px; margin-left: 6px; }

@media (max-width: 640px) {
  #cmdConsole { width: 100vw; max-width: 100vw; }
}
