#windowManager {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
}

.shell-window {
    position: absolute;
    display: flex;
    flex-direction: column;
    min-width: 320px;
    min-height: 220px;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    resize: both;
    overflow: hidden;
    pointer-events: auto;
    color: #e5e7eb;
    background: #111827;
    border: 1px solid #536173;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.shell-window-titlebar {
    display: flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-left: 12px;
    color: #f9fafb;
    background: #263445;
    cursor: move;
    touch-action: none;
    user-select: none;
}

.shell-window-title {
    overflow: hidden;
    font: 600 13px sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shell-window-controls {
    display: flex;
    height: 100%;
}

.shell-window-control {
    width: 42px;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    font-size: 19px;
}

.shell-window-control:hover {
    background: #43566d;
}

.shell-window-control:last-child:hover {
    background: #b42318;
}

.shell-window-content {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.shell-window-content[hidden] {
    display: none;
}

.shell-login-form {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    max-width: 420px;
    margin: auto;
    padding: 24px;
    font: 14px sans-serif;
}

.shell-login-form h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.shell-login-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shell-login-form input {
    box-sizing: border-box;
    width: 100%;
    padding: 9px;
    border: 1px solid #536173;
    border-radius: 4px;
    color: #f9fafb;
    background: #080d13;
}

.shell-login-status {
    min-height: 1.2em;
    margin: 0;
    color: #fca5a5;
}

.shell-terminal-host {
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 8px;
    background: #080d13;
}

.shell-terminal-host .xterm {
    height: 100%;
}
