* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: #0a0f0a;
  color: #c9d8c9;
  font-family: "Cascadia Code", ui-monospace, Consolas, "Courier New", "Microsoft YaHei", monospace;
  font-size: 14px;
  overflow: hidden;
}
.hidden { display: none !important; }

/* ---------- boot / auth ---------- */
.boot { height: 100%; padding: 40px 24px; overflow-y: auto; }
.boot-logo { color: #48e08b; font-size: 12px; line-height: 1.15; margin-bottom: 18px; text-shadow: 0 0 8px rgba(72,224,139,.45); }
.boot-line { color: #6f8f6f; margin-bottom: 26px; }
.boot-line::after { content: "▊"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.auth { max-width: 520px; }
.auth-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.auth-row .p { color: #48e08b; min-width: 150px; }
.auth-row input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #e6f2e6; font: inherit; border-bottom: 1px dashed #2f4a2f; padding: 3px 2px;
}
.auth-row input:focus { border-bottom-color: #48e08b; }
.auth-actions { align-items: center; }
.tbtn {
  background: #12301a; color: #48e08b; border: 1px solid #2f5a38;
  border-radius: 3px; padding: 4px 12px; font: inherit; cursor: pointer;
}
.tbtn:hover { background: #174122; }
.tlink { background: none; border: none; color: #7fd4a0; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.auth-msg { color: #ff7d7d; min-height: 18px; margin: 8px 0; }
.auth-hint { color: #6f8f6f; }

/* ---------- terminal ---------- */
.term { height: 100%; display: flex; flex-direction: column; background: #0a0f0a; }
.titlebar {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 12px; background: #101710; border-bottom: 1px solid #1d2b1d; flex: none;
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.tb-title { margin-left: 10px; color: #6f8f6f; font-size: 12px; }
.scroll { flex: 1; overflow-y: auto; padding: 14px 16px 20px; }
.lines { display: flex; flex-direction: column; gap: 1px; }
.line { white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.line.sys { color: #6f8f6f; }
.line.err { color: #ff7d7d; }
.line.cmd { color: #e6f2e6; }
.line.cmd .p { color: #48e08b; }
.line.ok { color: #48e08b; }
.line.warn { color: #febc2e; }
.agent-block { border-left: 2px solid var(--ac, #48e08b); padding: 4px 0 4px 12px; margin: 8px 0 8px 2px; }
.agent-block .a-head { color: var(--ac, #48e08b); font-weight: 700; margin-bottom: 2px; }
.agent-block .a-body { color: #d7e7d7; white-space: pre-wrap; }
.agent-block .a-meta { color: #567656; font-size: 12px; margin-top: 4px; }
.agent-block.dim { opacity: .68; }
.input-row { display: flex; gap: 8px; margin-top: 6px; }
.prompt { color: #48e08b; white-space: nowrap; }
.prompt .path { color: #7fd4a0; }
#cmd {
  flex: 1; background: transparent; border: none; outline: none;
  color: #e6f2e6; font: inherit; caret-color: #48e08b;
}
.spin { color: #7fd4a0; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-thumb { background: #233523; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
