/* ========== 全局 ========== */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: #0b0e14;
  color: #c9d1d9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ========== 登录卡片 ========== */
#login {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card {
  width: 340px;
  padding: 28px;
  background: #131722;
  border: 1px solid #232a3b;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.card h1 { font-size: 16px; margin: 0 0 6px; color: #e6edf3; }
.card p { font-size: 12px; color: #7d8590; margin: 0 0 16px; }
input[type=password] {
  width: 100%;
  padding: 10px;
  background: #0b0e14;
  border: 1px solid #2a3247;
  color: #e6edf3;
  border-radius: 6px;
  outline: none;
  font-family: inherit;
}
input[type=password]:focus { border-color: #3b82f6; }
button {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
button:hover { background: #1d4ed8; }
button:disabled { opacity: 0.5; cursor: default; }
#err { color: #f85149; font-size: 12px; margin-top: 10px; min-height: 16px; }

/* ========== 终端区域 ========== */
#term { display: none; height: 100%; flex-direction: column; }

#bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: #131722;
  border-bottom: 1px solid #232a3b;
  font-size: 12px;
  color: #7d8590;
}
#bar .dot { width: 8px; height: 8px; border-radius: 50%; background: #f85149; }
#bar .dot.on { background: #3fb950; }
#cwdShow { margin-left: auto; }

/* 输出区：保留换行、长行折行、纵向滚动 */
#out {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
  scrollbar-width: thin;
  scrollbar-color: #2a3247 transparent;
}
#out::-webkit-scrollbar { width: 10px; }
#out::-webkit-scrollbar-track { background: transparent; }
#out::-webkit-scrollbar-thumb {
  background: #2a3247;
  border-radius: 5px;
  border: 2px solid #0b0e14;
}
#out::-webkit-scrollbar-thumb:hover { background: #3a4664; }
#out .cmd { color: #79c0ff; }
#out .err { color: #f85149; }
#out .ok  { color: #3fb950; }

/* 输入行 */
#row {
  display: flex;
  align-items: center;
  padding: 8px 12px 12px;
  border-top: 1px solid #232a3b;
}
#prompt { color: #3fb950; margin-right: 8px; white-space: nowrap; }
#cmdInput {
  flex: 1;
  padding: 4px 0;
  background: transparent;
  border: 0;
  color: #e6edf3;
  outline: none;
  font-family: inherit;
  font-size: 14px;
}
#cmdInput::placeholder { color: #4b5563; }