:root {
    color-scheme: dark;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #0c0f14;
    color: #f5f7fb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, #25334a, transparent 42%),
        #0c0f14;
}

.auth-card {
    width: min(430px, 100%);
    padding: 30px;
    border: 1px solid #29313d;
    border-radius: 16px;
    background: rgba(18, 23, 31, 0.96);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

h1 {
    margin: 0 0 8px;
}

label {
    display: block;
    margin: 18px 0;
    font-weight: 650;
}

input {
    width: 100%;
    margin-top: 8px;
    padding: 12px 14px;
    border: 1px solid #394454;
    border-radius: 9px;
    background: #0b1017;
    color: #fff;
    font: inherit;
}

button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 9px;
    background: #ffffff;
    color: #11151c;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.muted {
    color: #a8b1bf;
}

.notice {
    padding: 12px;
    border-radius: 9px;
}

.notice.error {
    background: #421d25;
    color: #ffd8df;
}

.notice.success {
    background: #173825;
    color: #d9ffe6;
}

.terminal-page {
    height: 100vh;
    overflow: hidden;
    background: #07090d;
}

.terminal-header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 18px;
    border-bottom: 1px solid #242b35;
    background: #11161d;
}

.terminal-header div {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.terminal-header #cwd {
    overflow: hidden;
    color: #9eabbc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.terminal-header a {
    color: #fff;
}

.terminal-shell {
    height: calc(100vh - 56px);
    display: grid;
    grid-template-rows: 1fr auto;
}

.terminal-output {
    overflow: auto;
    padding: 18px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    line-height: 1.45;
}

.terminal-output pre {
    margin: 0 0 9px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.system-message {
    color: #8ca5c7;
}

.command {
    color: #7fffa5;
}

.result {
    color: #e9edf3;
}

.error-output {
    color: #ff9cae;
}

.command-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #242b35;
    background: #11161d;
}

.command-row .prompt {
    color: #7fffa5;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 800;
}

.command-row input {
    margin: 0;
    border: 0;
    background: transparent;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    outline: none;
}

.command-row button {
    min-height: 36px;
    padding: 7px 13px;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.command-row textarea {
    width: 100%;
    min-height: 38px;
    max-height: 180px;
    resize: none;
    margin: 0;
    padding: 9px 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 16px;
    line-height: 1.35;
    outline: none;
}

.dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
}

.dialog-backdrop[hidden] {
    display: none;
}

.dialog-card {
    width: min(430px, 100%);
    padding: 24px;
    border: 1px solid #394454;
    border-radius: 14px;
    background: #151b24;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.dialog-card h2 {
    margin: 0 0 8px;
}

.dialog-card p {
    margin: 0 0 18px;
    color: #a8b1bf;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.secondary-button {
    border: 1px solid #465264;
    background: transparent;
    color: #fff;
}
