* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  background: #1a1b26;
  color: #a9b1d6;
}

#cc-app { display: flex; flex-direction: column; height: 100vh; }

/* ---- Login ---- */
#cc-login-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1b26 0%, #2f3340 100%);
}
.login-card {
  background: #24283b;
  padding: 48px 40px;
  border-radius: 12px;
  width: 380px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.login-card h1 { font-size: 1.8rem; color: #7aa2f7; margin-bottom: 4px; text-align: center; }
.login-sub { text-align: center; color: #565f89; margin-bottom: 32px; font-size: 0.9rem; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 0.85rem; color: #a9b1d6; }
.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #3b4261;
  border-radius: 8px;
  font-size: 1rem;
  background: #1a1b26;
  color: #c0caf5;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: #7aa2f7; }
#cc-login-btn {
  width: 100%;
  padding: 12px;
  background: #7aa2f7;
  color: #1a1b26;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
#cc-login-btn:hover { background: #89b4fa; }
#cc-login-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.form-error { color: #f7768e; font-size: 0.85rem; margin-top: 12px; text-align: center; }
.hidden { display: none !important; }

/* ---- Terminal ---- */
#cc-terminal-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.term-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  background: #24283b;
  border-bottom: 1px solid #3b4261;
  flex-shrink: 0;
}
.term-title { font-weight: 700; color: #7aa2f7; }
#cc-session-status { font-size: 0.8rem; color: #565f89; flex: 1; }
.term-actions { display: flex; gap: 8px; }
.term-actions button {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 600;
}
#cc-start-btn { background: #7aa2f7; color: #1a1b26; }
#cc-start-btn:hover { background: #89b4fa; }
#cc-start-btn:disabled { opacity: 0.5; cursor: not-allowed; }
#cc-stop-btn { background: #f7768e; color: #fff; }
#cc-stop-btn:hover { background: #ff8fa6; }

#cc-terminal-container {
  flex: 1;
  overflow: hidden;
  padding: 4px;
}
#cc-terminal-container .xterm { height: 100%; padding: 8px; }
