.terminal-page{display:grid;gap:18px;min-width:0;max-width:100%}
.terminal-page [hidden]{display:none!important}
.terminal-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px;flex-wrap:wrap}
.terminal-card{min-width:0;overflow:hidden}
.terminal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;flex-wrap:wrap}
.terminal-account{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-width:0}
.terminal-account strong{font-size:16px;color:#10213c}
.terminal-identity{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;color:#5b6281;overflow-wrap:anywhere}
.terminal-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.terminal-actions button,.terminal-header button{white-space:nowrap;min-height:38px}
.terminal-status{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border:1px solid #dce4f1;border-radius:20px;color:#64748b;background:#f8fafc;font-size:11px;font-weight:600;white-space:nowrap}
.terminal-status:before{content:"";height:6px;width:6px;border-radius:50%;background:currentColor;flex-shrink:0}
.terminal-status--connected{color:#047857;border-color:#a7f3d0;background:#ecfdf5}
.terminal-context{display:flex;align-items:center;justify-content:space-between;gap:10px 20px;padding:0 20px 14px;color:#66758d;font-size:12px;flex-wrap:wrap;overflow-wrap:anywhere}
.terminal-context code{font-size:12px;white-space:normal;overflow-wrap:anywhere;background:#f0f3fa;color:#334155;padding:2px 5px;border-radius:4px}
.terminal-root-warning{margin:0 20px 14px;padding:10px 12px;border:1px solid #fed7aa;border-radius:8px;color:#9a3412;background:#fff7ed;font-size:12px;line-height:1.6}
.terminal-output{position:relative;box-sizing:border-box;height:clamp(300px,62vh,720px);width:100%;max-width:100%;min-width:0;padding:14px 16px;background:#101625;color:#e2e8f0;overflow:hidden}
.terminal-output .xterm{height:100%;min-width:0}
.terminal-output .xterm-viewport{scrollbar-color:#475569 #101625;scrollbar-width:thin}
.terminal-output .xterm .xterm-accessibility{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}
.terminal-placeholder{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center;color:#a7b4ca;line-height:1.6;padding:16px;box-sizing:border-box}
.terminal-placeholder>i{font-size:32px;color:#BCA2F8}
.terminal-placeholder p{margin:0;font-size:15px;color:#e2e8f0}
.terminal-placeholder small{font-size:12px;max-width:30em}
.terminal-help{display:flex;justify-content:space-between;gap:10px 20px;padding:14px 20px;color:#64748b;font-size:11px;line-height:1.8;flex-wrap:wrap}
.terminal-help kbd{border:1px solid #dce4f1;background:#f8fafc;border-radius:4px;padding:1px 4px;font-family:inherit;font-size:10px;box-shadow:0 1px 0 #e2e8f0;color:#475569}
.terminal-message{padding:12px 16px;background:#F6F2FE;color:#5D2CC5;border:1px solid #D8C8FB;border-radius:9px;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.terminal-message--error{background:#fff1f2;color:#9f1239;border-color:#fecdd3}
@media(max-width:640px){.terminal-header{padding:18px}.terminal-toolbar{padding:16px;align-items:flex-start}.terminal-account{width:100%;gap:8px}.terminal-actions{width:100%}.terminal-actions button{flex:1 1 auto}.terminal-status{margin-right:auto}.terminal-context{padding:0 16px 12px}.terminal-root-warning{margin:0 16px 12px}.terminal-output{padding:12px 8px;height:56vh;min-height:300px}.terminal-help{padding:12px 16px}.terminal-help>span{width:100%}}
@media(prefers-reduced-motion:reduce){.terminal-output .xterm-cursor-blink{animation:none!important}}
