:root {
    --ssh-accent: #38bdf8;
    --ssh-accent-strong: #0ea5e9;
    --ssh-font-size: 14px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    background: #07111f;
    color: #eaf5ff;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
select {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.ssh-app {
    --app-bg: #07111f;
    --app-bg-2: #09182a;
    --surface: rgba(11, 25, 43, 0.82);
    --surface-solid: #0c1a2d;
    --surface-raised: rgba(18, 38, 61, 0.92);
    --surface-soft: rgba(255, 255, 255, 0.055);
    --surface-hover: rgba(255, 255, 255, 0.09);
    --text: #edf7ff;
    --text-soft: #c2d5e7;
    --muted: #8097ae;
    --muted-2: #5f788f;
    --border: rgba(165, 214, 242, 0.14);
    --border-strong: rgba(165, 214, 242, 0.26);
    --danger: #fb7185;
    --warning: #fbbf24;
    --success: #34d399;
    --shadow-window: 0 24px 70px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
    --radius-window: 16px;
    --topbar-h: 58px;
    position: relative;
    display: grid;
    grid-template-rows: var(--topbar-h) minmax(0, 1fr);
    width: 100%;
    height: 100dvh;
    min-height: 540px;
    overflow: hidden;
    color: var(--text);
    background:
        radial-gradient(900px 520px at 8% -10%, rgba(14, 165, 233, 0.18), transparent 65%),
        radial-gradient(900px 620px at 88% 0%, rgba(124, 58, 237, 0.18), transparent 62%),
        linear-gradient(150deg, var(--app-bg), var(--app-bg-2) 58%, #0c1023);
    font-family: system-ui, "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

.ssh-app[data-theme="light"] {
    --app-bg: #edf4fb;
    --app-bg-2: #e3eef9;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-solid: #ffffff;
    --surface-raised: rgba(255, 255, 255, 0.94);
    --surface-soft: rgba(11, 39, 66, 0.045);
    --surface-hover: rgba(11, 39, 66, 0.075);
    --text: #10253a;
    --text-soft: #334c63;
    --muted: #61798f;
    --muted-2: #8195a8;
    --border: rgba(21, 61, 94, 0.12);
    --border-strong: rgba(21, 61, 94, 0.22);
    --danger: #dc3b55;
    --warning: #b87500;
    --success: #0b9367;
    --shadow-window: 0 24px 65px rgba(31, 65, 98, 0.18), 0 1px 0 rgba(255, 255, 255, 0.92) inset;
    background:
        radial-gradient(900px 520px at 8% -10%, rgba(14, 165, 233, 0.15), transparent 65%),
        radial-gradient(900px 620px at 88% 0%, rgba(124, 58, 237, 0.11), transparent 62%),
        linear-gradient(150deg, var(--app-bg), var(--app-bg-2) 58%, #f6f1ff);
}

.ambient-layer,
.ambient-grid,
.ambient-orb {
    position: absolute;
    pointer-events: none;
}

.ambient-layer {
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.ambient-grid {
    inset: 0;
    opacity: 0.26;
    background-image:
        linear-gradient(rgba(125, 211, 252, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 252, 0.05) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

.ambient-orb {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    filter: blur(12px);
    opacity: 0.25;
}

.ambient-orb-a {
    left: -160px;
    top: 22%;
    background: color-mix(in srgb, var(--ssh-accent) 48%, transparent);
}

.ambient-orb-b {
    right: -160px;
    bottom: -130px;
    background: #7c3aed;
}

.app-topbar {
    position: relative;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 8px 18px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--app-bg) 68%, transparent);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid color-mix(in srgb, var(--ssh-accent) 42%, transparent);
    border-radius: 11px;
    background: linear-gradient(145deg, color-mix(in srgb, var(--ssh-accent) 24%, transparent), rgba(124, 58, 237, 0.15));
    box-shadow: 0 8px 22px color-mix(in srgb, var(--ssh-accent) 18%, transparent);
}

.brand-mark svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--ssh-accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand-copy {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.brand-copy strong {
    font-size: 15px;
    letter-spacing: 0.01em;
}

.brand-copy small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.topbar-spacer {
    flex: 1;
}

.privacy-pill,
.layout-select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
}

.privacy-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 14%, transparent);
}

.layout-select-wrap {
    padding-right: 7px;
    color: var(--muted);
}

.layout-select {
    min-width: 105px;
    padding: 5px 24px 5px 8px;
    border: 0;
    border-radius: 999px;
    color: var(--text);
    outline: 0;
    background: transparent;
    cursor: pointer;
}

.layout-select option {
    color: #10253a;
    background: #fff;
}

.icon-button,
.topbar-home {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text-soft);
    text-decoration: none;
    cursor: pointer;
    transition: 160ms ease;
}

.icon-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-button:hover,
.topbar-home:hover {
    border-color: var(--border-strong);
    color: var(--text);
    background: var(--surface-hover);
}

.theme-icon-light {
    display: none;
}

.ssh-app[data-theme="light"] .theme-icon-dark {
    display: none;
}

.ssh-app[data-theme="light"] .theme-icon-light {
    display: block;
}

.topbar-home {
    width: auto;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 650;
}

.app-main {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.launcher {
    position: relative;
    height: 100%;
    overflow: auto;
    padding: clamp(26px, 4vh, 54px) clamp(20px, 5vw, 74px) 38px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

.launcher-back {
    position: sticky;
    top: 0;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text-soft);
    font-size: 12px;
    cursor: pointer;
    backdrop-filter: blur(16px);
}

.launcher-back svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transform: rotate(180deg);
}

.launcher-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(350px, 0.92fr);
    gap: clamp(36px, 7vw, 110px);
    align-items: center;
    width: min(1240px, 100%);
    min-height: calc(100% - 52px);
    margin: 0 auto;
}

.launcher-intro {
    max-width: 630px;
}

.eyebrow,
.panel-kicker {
    color: var(--ssh-accent);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
}

.eyebrow span {
    width: 24px;
    height: 1px;
    background: currentColor;
}

.launcher h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(40px, 5vw, 72px);
    font-weight: 740;
    letter-spacing: -0.055em;
    line-height: 1.02;
}

.launcher h1 em {
    color: var(--ssh-accent);
    font-style: normal;
}

.launcher-lead {
    max-width: 570px;
    margin: 24px 0 26px;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.85;
}

.capability-card {
    padding: 17px 18px;
    border: 1px solid color-mix(in srgb, var(--warning) 32%, transparent);
    border-radius: 14px;
    background:
        linear-gradient(120deg, color-mix(in srgb, var(--warning) 9%, transparent), transparent 65%),
        var(--surface-soft);
}

.capability-head {
    display: flex;
    align-items: center;
    gap: 9px;
}

.capability-head strong {
    color: var(--text);
    font-size: 13px;
}

.status-symbol {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-symbol-warn {
    background: var(--warning);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--warning) 12%, transparent);
}

.status-symbol-success {
    background: var(--success);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 12%, transparent);
}

.capability-card-ready {
    border-color: color-mix(in srgb, var(--success) 30%, transparent);
    background:
        linear-gradient(120deg, color-mix(in srgb, var(--success) 8%, transparent), transparent 65%),
        var(--surface-soft);
}

.capability-card-ready .capability-tag {
    color: var(--success);
    background: color-mix(in srgb, var(--success) 12%, transparent);
}

.capability-tag {
    margin-left: auto;
    padding: 3px 7px;
    border-radius: 5px;
    color: var(--warning);
    background: color-mix(in srgb, var(--warning) 12%, transparent);
    font-size: 10px;
    font-weight: 700;
}

.capability-card p {
    margin: 10px 0 9px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}

.text-button,
.inline-action {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ssh-accent);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.text-button:hover,
.inline-action:hover {
    color: color-mix(in srgb, var(--ssh-accent) 80%, white);
}

.flow-strip {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
}

.flow-node {
    min-width: 0;
    flex: 1;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
}

.flow-node span,
.flow-node strong {
    display: block;
}

.flow-node span {
    color: var(--muted-2);
    font-family: ui-monospace, "SFMono-Regular", "Liberation Mono", monospace;
    font-size: 9px;
}

.flow-node strong {
    margin-top: 3px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
}

.flow-node-muted {
    border-style: dashed;
}

.flow-node-muted strong {
    color: var(--muted);
}

.flow-arrow {
    width: 20px;
    height: 1px;
    flex: 0 0 20px;
    background: var(--border-strong);
}

.launcher-feature-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 11px;
}

.launcher-feature-row span::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--ssh-accent);
    vertical-align: 1px;
}

.connection-panel {
    width: 100%;
    max-width: 520px;
    justify-self: end;
    padding: clamp(22px, 3vw, 32px);
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--ssh-accent) 5%, transparent), transparent 45%),
        var(--surface);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.055) inset;
    backdrop-filter: blur(28px) saturate(140%);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
}

.connection-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}

.connection-panel h2 {
    margin: 5px 0 0;
    font-size: 23px;
    letter-spacing: -0.035em;
}

.connection-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.connection-state > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted-2);
}

.connection-state.is-ready > span {
    background: var(--success);
}

.connection-state.is-error > span {
    background: var(--danger);
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field-grid-host {
    grid-template-columns: minmax(0, 1fr) 92px;
}

.field {
    display: block;
    margin-bottom: 14px;
}

.field > span:first-child,
.auth-fieldset legend {
    display: block;
    margin-bottom: 7px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
}

.field > span:first-child small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
}

.field input,
.field textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    color: var(--text);
    background: color-mix(in srgb, var(--surface-soft) 68%, transparent);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input {
    height: 42px;
    padding: 0 12px;
}

.field textarea {
    resize: vertical;
    min-height: 104px;
    max-height: 230px;
    padding: 11px 12px;
    font-family: ui-monospace, "SFMono-Regular", "Liberation Mono", monospace;
    font-size: 11px;
    line-height: 1.55;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--muted-2);
}

.field input:focus,
.field textarea:focus {
    border-color: color-mix(in srgb, var(--ssh-accent) 62%, transparent);
    background: color-mix(in srgb, var(--ssh-accent) 3%, var(--surface-solid));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ssh-accent) 12%, transparent);
}

.field.has-error input,
.field.has-error textarea {
    border-color: color-mix(in srgb, var(--danger) 68%, transparent);
}

.field-error {
    display: block;
    min-height: 13px;
    padding-top: 4px;
    color: var(--danger);
    font-size: 10px;
}

.password-wrap {
    position: relative;
    display: block;
}

.password-wrap input {
    padding-right: 56px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    padding: 5px 7px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.auth-fieldset {
    min-width: 0;
    margin: 0 0 13px;
    padding: 0;
    border: 0;
}

.segmented-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
}

.segmented-control.theme-choice {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segment {
    position: relative;
    cursor: pointer;
}

.segment input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segment span {
    display: grid;
    place-items: center;
    height: 33px;
    border-radius: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    transition: 160ms ease;
}

.segment input:checked + span {
    color: var(--text);
    background: var(--surface-raised);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.segment input:focus-visible + span {
    outline: 2px solid var(--ssh-accent);
    outline-offset: 1px;
}

.credential-zone {
    animation: rise-in 180ms ease both;
}

.credential-note {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: -7px 0 12px;
    color: var(--muted);
    font-size: 10px;
}

.credential-note span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--success);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 17px;
}

.check-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    cursor: pointer;
}

.check-row input {
    position: absolute;
    opacity: 0;
}

.custom-check {
    position: relative;
    width: 15px;
    height: 15px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: var(--surface-soft);
}

.check-row input:checked + .custom-check {
    border-color: var(--ssh-accent);
    background: var(--ssh-accent);
}

.check-row input:checked + .custom-check::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #05111f;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.primary-button,
.secondary-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    height: 42px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 160ms ease;
}

.primary-button {
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--ssh-accent) 70%, white);
    color: #04101b;
    background: var(--ssh-accent);
    box-shadow: 0 10px 26px color-mix(in srgb, var(--ssh-accent) 20%, transparent);
}

.primary-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.primary-button:hover {
    background: color-mix(in srgb, var(--ssh-accent) 82%, white);
    transform: translateY(-1px);
}

.primary-button:disabled {
    opacity: 0.55;
    transform: none;
    cursor: wait;
}

.secondary-button {
    width: 100%;
    margin-top: 9px;
    border: 1px solid var(--border-strong);
    color: var(--text-soft);
    background: var(--surface-soft);
}

.secondary-button:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.form-message {
    display: none;
    margin-top: 11px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 11px;
    line-height: 1.65;
}

.form-message.is-visible {
    display: block;
}

.form-message.is-error {
    border-color: color-mix(in srgb, var(--danger) 30%, transparent);
    color: var(--danger);
}

.history-preview {
    margin-top: 19px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.history-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
}

.history-preview-head strong {
    color: var(--text-soft);
    font-size: 11px;
}

.history-chip-list {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
}

.history-chip-list::-webkit-scrollbar {
    display: none;
}

.history-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 10px;
    cursor: pointer;
}

.history-chip:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

.history-chip span {
    color: var(--muted);
}

.workspace {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.desktop {
    position: absolute;
    inset: 0 0 58px;
    overflow: hidden;
}

.desktop::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(720px 450px at 76% 18%, color-mix(in srgb, var(--ssh-accent) 10%, transparent), transparent 68%),
        radial-gradient(600px 460px at 26% 72%, rgba(124, 58, 237, 0.08), transparent 70%);
}

.desktop-heading {
    position: absolute;
    right: 28px;
    top: 23px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    pointer-events: none;
}

.desktop-date {
    color: var(--text);
    font-size: 12px;
    font-weight: 650;
    opacity: 0.72;
}

.desktop-caption {
    color: var(--muted);
    font-size: 10px;
}

.desktop-icons {
    position: absolute;
    z-index: 2;
    left: 20px;
    top: 20px;
    display: grid;
    grid-template-columns: repeat(2, 84px);
    gap: 10px;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    width: 84px;
    min-height: 76px;
    padding: 5px 3px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-soft);
    font-size: 10px;
    cursor: pointer;
}

.desktop-icon:hover,
.desktop-icon:focus-visible {
    border-color: var(--border);
    background: var(--surface-soft);
    outline: none;
}

.desktop-icon-art {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 9px 24px rgba(0, 0, 0, 0.2);
}

.desktop-icon-art svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.art-terminal {
    color: #d9f8ff;
    background: linear-gradient(145deg, #087ea4, #075985);
}

.art-files {
    color: #fff0c2;
    background: linear-gradient(145deg, #d97706, #92400e);
}

.art-history {
    color: #e7dcff;
    background: linear-gradient(145deg, #7c3aed, #4c1d95);
}

.art-overview {
    color: #d7fff2;
    background: linear-gradient(145deg, #059669, #065f46);
}

.art-settings {
    color: #dae8ff;
    background: linear-gradient(145deg, #475569, #1e293b);
}

.art-trash {
    color: #ffd9df;
    background: linear-gradient(145deg, #9f1239, #4c0519);
}

.window-layer {
    position: absolute;
    z-index: 10;
    inset: 0;
    pointer-events: none;
}

.app-window {
    position: absolute;
    display: flex;
    flex-direction: column;
    min-width: 330px;
    min-height: 240px;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-window);
    background: var(--surface);
    box-shadow: var(--shadow-window);
    pointer-events: auto;
    backdrop-filter: blur(26px) saturate(140%);
    -webkit-backdrop-filter: blur(26px) saturate(140%);
    animation: window-open 190ms ease both;
}

.app-window.is-focused {
    border-color: color-mix(in srgb, var(--ssh-accent) 28%, var(--border-strong));
}

.app-window.is-minimized {
    display: none;
}

.app-window.is-closed {
    display: none;
}

.app-window.is-maximized {
    left: 10px !important;
    top: 10px !important;
    width: calc(100% - 20px) !important;
    height: calc(100% - 20px) !important;
    border-radius: 13px;
}

.window-titlebar {
    display: flex;
    align-items: center;
    flex: 0 0 46px;
    gap: 10px;
    padding: 0 9px 0 15px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-raised) 88%, transparent);
    cursor: default;
    touch-action: none;
    user-select: none;
}

.window-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 650;
    pointer-events: none;
}

.window-title svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: var(--ssh-accent);
    stroke-width: 1.8;
}

.window-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.window-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.window-action {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.window-action svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.window-action:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.window-action[data-window-action="close"]:hover {
    color: white;
    background: #c42f48;
}

.window-body {
    position: relative;
    min-width: 0;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.terminal-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: color-mix(in srgb, #020a12 92%, var(--surface-solid));
}

.ssh-app[data-theme="light"] .terminal-shell {
    background: #f8fbff;
}

.ssh-app[data-theme="light"] .terminal-tabs,
.ssh-app[data-theme="light"] .terminal-side-tools,
.ssh-app[data-theme="light"] .terminal-statusbar {
    background: #f6f9fd;
}

.ssh-app[data-theme="light"] .terminal-tab.is-active {
    background: #f8fbff;
}

.terminal-tabs {
    display: flex;
    align-items: flex-end;
    flex: 0 0 38px;
    gap: 3px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 7px 0;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-solid) 94%, transparent);
    scrollbar-width: none;
}

.terminal-tabs::-webkit-scrollbar {
    display: none;
}

.terminal-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    max-width: 190px;
    height: 32px;
    padding: 0 7px 0 10px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    cursor: pointer;
}

.terminal-tab:hover {
    color: var(--text-soft);
    background: var(--surface-soft);
}

.terminal-tab.is-active {
    color: var(--text);
    border-color: var(--border);
    background: #06111e;
}

.session-light {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: var(--success);
}

.session-light.is-demo {
    background: var(--warning);
}

.session-light.is-offline {
    background: var(--muted-2);
}

.terminal-tab-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tab-close {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
}

.tab-close:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.tab-close svg {
    width: 11px;
    height: 11px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.terminal-new-tab {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    margin: auto 1px 2px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.terminal-new-tab:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.terminal-new-tab svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.terminal-workarea {
    position: relative;
    display: flex;
    min-height: 0;
    flex: 1;
}

.terminal-stage {
    position: relative;
    min-width: 0;
    min-height: 0;
    flex: 1;
    padding: 9px 7px 6px 12px;
    overflow: hidden;
}

.terminal-instance {
    position: absolute;
    inset: 9px 7px 6px 12px;
}

.terminal-instance[hidden] {
    display: none;
}

.terminal-instance .xterm {
    height: 100%;
}

.terminal-instance .xterm-viewport {
    scrollbar-color: rgba(148, 163, 184, 0.36) transparent;
    scrollbar-width: thin;
}

.terminal-empty {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--muted);
    text-align: center;
}

.terminal-empty strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 12px;
}

.terminal-empty p {
    margin: 0;
    font-size: 10px;
}

.terminal-side-tools {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 0 0 36px;
    padding: 8px 7px;
    border-left: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-solid) 85%, transparent);
}

.terminal-tool {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--muted);
    font-family: ui-monospace, "SFMono-Regular", "Liberation Mono", monospace;
    font-size: 9px;
    cursor: pointer;
}

.terminal-tool:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.terminal-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 27px;
    padding: 0 10px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-solid) 96%, transparent);
    color: var(--muted);
    font-family: ui-monospace, "SFMono-Regular", "Liberation Mono", monospace;
    font-size: 9px;
}

.terminal-status-left,
.terminal-status-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.terminal-status-left span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.terminal-demo-badge {
    padding: 2px 5px;
    border: 1px solid color-mix(in srgb, var(--warning) 38%, transparent);
    border-radius: 4px;
    color: var(--warning);
    font-family: inherit;
}

.command-rail {
    position: absolute;
    z-index: 7;
    right: 18px;
    bottom: 16px;
    width: 118px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(20px);
}

.command-rail-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 650;
    cursor: pointer;
}

.command-rail-toggle svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: var(--ssh-accent);
    stroke-width: 1.8;
}

.command-rail-toggle .chevron {
    margin-left: auto;
    stroke: var(--muted);
    transform: rotate(90deg);
    transition: transform 160ms ease;
}

.command-rail.is-collapsed .command-rail-toggle .chevron {
    transform: rotate(0);
}

.command-rail-body {
    padding: 0 5px 5px;
}

.command-rail.is-collapsed .command-rail-body {
    display: none;
}

.command-rail-body button {
    display: grid;
    grid-template-columns: 50px 1fr;
    align-items: center;
    width: 100%;
    padding: 7px 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-soft);
    text-align: left;
    cursor: pointer;
}

.command-rail-body button:hover {
    background: var(--surface-hover);
}

.command-rail-body code {
    color: var(--ssh-accent);
    font-family: ui-monospace, "SFMono-Regular", "Liberation Mono", monospace;
    font-size: 9px;
}

.command-rail-body span {
    color: var(--muted);
    font-size: 8px;
}

.taskbar {
    position: absolute;
    z-index: 55;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 58px;
    padding: 7px 11px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--app-bg) 74%, transparent);
    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);
}

.start-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 650;
    cursor: pointer;
}

.start-button:hover,
.start-button[aria-expanded="true"] {
    border-color: var(--border);
    background: var(--surface-hover);
}

.start-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 17px;
    height: 17px;
}

.start-grid i {
    border-radius: 2px;
    background: var(--ssh-accent);
}

.start-grid i:nth-child(2) {
    opacity: 0.72;
}

.start-grid i:nth-child(3) {
    opacity: 0.55;
}

.start-grid i:nth-child(4) {
    opacity: 0.88;
}

.taskbar-apps,
.taskbar-sessions {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.taskbar-sessions {
    flex: 1;
    overflow: hidden;
}

.taskbar-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 170px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    cursor: pointer;
}

.taskbar-button:hover,
.taskbar-button.is-active {
    border-color: var(--border);
    background: var(--surface-soft);
    color: var(--text-soft);
}

.taskbar-button.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--ssh-accent);
    transform: translateX(-50%);
}

.taskbar-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.taskbar-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.taskbar-sessions .taskbar-button {
    max-width: 190px;
}

.taskbar-tray {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.tray-button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.tray-button:hover {
    border-color: var(--border);
    background: var(--surface-soft);
    color: var(--text);
}

.tray-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.tray-clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 62px;
    padding: 0 4px;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

.tray-clock span {
    font-size: 11px;
    font-weight: 650;
}

.tray-clock small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 8px;
}

.start-menu {
    position: fixed;
    z-index: 80;
    left: 14px;
    bottom: 66px;
    width: 290px;
    padding: 10px;
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    background: var(--surface-raised);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(26px) saturate(145%);
    -webkit-backdrop-filter: blur(26px) saturate(145%);
    animation: menu-in 150ms ease both;
}

.start-menu[hidden] {
    display: none;
}

.start-menu-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 9px 13px;
}

.start-menu-user .avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #04101b;
    background: var(--ssh-accent);
    font-size: 14px;
    font-weight: 800;
}

.start-menu-user strong,
.start-menu-user small {
    display: block;
}

.start-menu-user strong {
    color: var(--text);
    font-size: 11px;
}

.start-menu-user small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.start-menu-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    padding: 5px;
    border-radius: 11px;
    background: var(--surface-soft);
}

.start-menu-secondary {
    margin-top: 6px;
}

.start-menu-section button {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 37px;
    padding: 7px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-soft);
    font-size: 10px;
    text-align: left;
    cursor: pointer;
}

.start-menu-section button:hover {
    background: var(--surface-hover);
}

.start-menu-section svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    fill: none;
    stroke: var(--ssh-accent);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.start-menu-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 9px 7px 2px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 9px;
}

.start-menu-footer a {
    color: var(--text-soft);
    text-decoration: none;
}

.context-menu {
    position: fixed;
    z-index: 100;
    min-width: 178px;
    padding: 5px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface-raised);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    animation: menu-in 120ms ease both;
}

.context-menu[hidden] {
    display: none;
}

.context-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 32px;
    padding: 6px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-soft);
    font-size: 10px;
    text-align: left;
    cursor: pointer;
}

.context-menu button:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.context-menu svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: var(--ssh-accent);
    stroke-width: 1.8;
}

.context-menu hr {
    height: 1px;
    margin: 4px 6px;
    border: 0;
    background: var(--border);
}

.content-panel {
    height: 100%;
    overflow: auto;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

.panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-toolbar h3 {
    margin: 0;
    color: var(--text);
    font-size: 13px;
}

.panel-toolbar p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 9px;
}

.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 9px;
    font-weight: 650;
    cursor: pointer;
}

.small-button:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

.small-button svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.file-pathbar {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    margin-bottom: 10px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    background: var(--surface-soft);
    font-family: ui-monospace, "SFMono-Regular", "Liberation Mono", monospace;
    font-size: 9px;
}

.file-pathbar strong {
    color: var(--text-soft);
    font-weight: 500;
}

.file-list {
    border: 1px solid var(--border);
    border-radius: 9px;
    overflow: hidden;
}

.file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px 90px;
    gap: 10px;
    align-items: center;
    min-height: 37px;
    padding: 0 11px;
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 10px;
}

.file-row:last-child {
    border-bottom: 0;
}

.file-row:hover {
    background: var(--surface-soft);
}

.file-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.file-name svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    fill: none;
    stroke: var(--ssh-accent);
    stroke-width: 1.7;
}

.file-name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-row small {
    color: var(--muted);
    font-size: 9px;
}

.file-empty {
    padding: 30px 16px;
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

.history-list {
    display: grid;
    gap: 8px;
}

.history-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-soft);
}

.history-item-main {
    min-width: 0;
}

.history-item strong {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-family: ui-monospace, "SFMono-Regular", "Liberation Mono", monospace;
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
}

.history-actions {
    display: flex;
    gap: 4px;
}

.history-actions button {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.history-actions button:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.history-actions svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.empty-state {
    padding: 48px 20px;
    color: var(--muted);
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 12px;
}

.empty-state p {
    max-width: 300px;
    margin: 0 auto;
    font-size: 10px;
    line-height: 1.7;
}

.settings-layout {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    min-height: 100%;
}

.settings-nav {
    padding: 14px 8px;
    border-right: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-soft) 55%, transparent);
}

.settings-nav button {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 32px;
    padding: 6px 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 9px;
    text-align: left;
    cursor: pointer;
}

.settings-nav button:hover,
.settings-nav button.is-active {
    color: var(--text);
    background: var(--surface-hover);
}

.settings-content {
    padding: 18px;
    overflow: auto;
}

.settings-section {
    display: none;
}

.settings-section.is-active {
    display: block;
    animation: rise-in 180ms ease both;
}

.settings-section h3 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 13px;
}

.settings-section > p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.6;
}

.layout-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.layout-card {
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 9px;
    cursor: pointer;
}

.layout-card:hover,
.layout-card.is-active {
    border-color: color-mix(in srgb, var(--ssh-accent) 55%, transparent);
    color: var(--text);
}

.layout-card-preview {
    position: relative;
    height: 47px;
    margin-bottom: 7px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: color-mix(in srgb, var(--surface-solid) 80%, transparent);
}

.layout-card-preview::before,
.layout-card-preview::after {
    content: "";
    position: absolute;
    background: var(--ssh-accent);
    opacity: 0.45;
}

.layout-card-preview::before {
    left: 5px;
    right: 5px;
    top: 4px;
    height: 3px;
}

.layout-card-preview::after {
    left: 5px;
    right: 5px;
    bottom: 4px;
    height: 4px;
}

.layout-card[data-layout-option="neo"] .layout-card-preview::before {
    left: 4px;
    right: auto;
    top: 4px;
    bottom: 4px;
    width: 5px;
    height: auto;
}

.layout-card[data-layout-option="modern"] .layout-card-preview::before {
    left: 14px;
    right: 14px;
    border-radius: 3px;
}

.layout-card[data-layout-option="modern"] .layout-card-preview::after {
    left: 22px;
    right: 22px;
    border-radius: 3px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
    border-bottom: 0;
}

.setting-row strong,
.setting-row small {
    display: block;
}

.setting-row strong {
    color: var(--text-soft);
    font-size: 10px;
}

.setting-row small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.range-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

.range-wrap input[type="range"] {
    width: 110px;
    accent-color: var(--ssh-accent);
}

.range-wrap output {
    min-width: 31px;
    color: var(--text-soft);
    font-size: 9px;
    text-align: right;
}

.switch-row {
    position: relative;
    width: 35px;
    height: 20px;
    flex: 0 0 35px;
}

.switch-row input {
    position: absolute;
    opacity: 0;
}

.switch-row span {
    position: absolute;
    inset: 0;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface-soft);
    cursor: pointer;
    transition: 150ms ease;
}

.switch-row span::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--muted);
    transition: 150ms ease;
}

.switch-row input:checked + span {
    border-color: var(--ssh-accent);
    background: color-mix(in srgb, var(--ssh-accent) 25%, transparent);
}

.switch-row input:checked + span::after {
    background: var(--ssh-accent);
    transform: translateX(15px);
}

.accent-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.accent-swatch {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    background: var(--swatch);
    cursor: pointer;
}

.accent-swatch.is-active {
    border-color: var(--text);
    box-shadow: 0 0 0 2px var(--surface-solid) inset;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.overview-card {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-soft);
}

.overview-card span,
.overview-card strong {
    display: block;
}

.overview-card span {
    color: var(--muted);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.overview-card strong {
    margin-top: 6px;
    color: var(--text);
    font-family: ui-monospace, "SFMono-Regular", "Liberation Mono", monospace;
    font-size: 11px;
    font-weight: 500;
}

.modal-backdrop {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(2, 8, 16, 0.68);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

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

.modal-card {
    position: relative;
    width: min(540px, 100%);
    padding: 28px;
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    background: var(--surface-raised);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
    animation: window-open 180ms ease both;
}

.modal-card h2 {
    margin: 7px 0 13px;
    color: var(--text);
    font-size: 22px;
    letter-spacing: -0.025em;
}

.modal-card > p {
    margin: 0 0 14px;
    color: var(--text-soft);
    font-size: 11px;
    line-height: 1.8;
}

.modal-close {
    position: absolute;
    right: 14px;
    top: 14px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.modal-close svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.modal-flow {
    display: grid;
    grid-template-columns: 1fr 24px 1fr 24px 1fr;
    align-items: center;
    gap: 3px;
    margin: 18px 0;
}

.modal-flow div {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.modal-flow div.muted {
    border-style: dashed;
    opacity: 0.65;
}

.modal-flow strong,
.modal-flow span {
    display: block;
}

.modal-flow strong {
    color: var(--text-soft);
    font-size: 9px;
}

.modal-flow span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.modal-flow i {
    height: 1px;
    background: var(--border-strong);
}

.modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.modal-actions .primary-button,
.modal-actions .secondary-button {
    margin: 0;
    padding: 0 16px;
}

.modal-actions .primary-button {
    width: auto;
}

.toast-stack {
    position: fixed;
    z-index: 140;
    right: 16px;
    bottom: 70px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    pointer-events: none;
}

.toast {
    max-width: 330px;
    padding: 10px 13px;
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    background: var(--surface-raised);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
    color: var(--text-soft);
    font-size: 10px;
    line-height: 1.55;
    animation: toast-in 180ms ease both;
    backdrop-filter: blur(18px);
}

.toast.is-error {
    border-color: color-mix(in srgb, var(--danger) 34%, transparent);
    color: var(--danger);
}

.noscript-message {
    position: fixed;
    z-index: 200;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    color: white;
    background: #07111f;
    text-align: center;
}

@keyframes window-open {
    from {
        opacity: 0;
        transform: scale(0.975) translateY(6px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes menu-in {
    from {
        opacity: 0;
        transform: translateY(5px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ssh-app[data-layout="modern"] .app-topbar {
    margin: 10px 12px 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.ssh-app[data-layout="modern"] {
    grid-template-rows: calc(var(--topbar-h) + 10px) minmax(0, 1fr);
}

.ssh-app[data-layout="modern"] .taskbar {
    left: 12%;
    right: 12%;
    bottom: 8px;
    height: 50px;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 5px 8px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.28);
}

.ssh-app[data-layout="modern"] .desktop {
    bottom: 64px;
}

.ssh-app[data-layout="modern"] .desktop-icons {
    left: 50%;
    top: auto;
    bottom: 15px;
    grid-template-columns: repeat(6, 86px);
    transform: translateX(-50%);
}

.ssh-app[data-layout="modern"] .desktop-icon {
    width: 86px;
}

.ssh-app[data-layout="modern"] .app-window {
    --radius-window: 21px;
}

.ssh-app[data-layout="modern"] .command-rail {
    right: auto;
    left: 18px;
}

.ssh-app[data-layout="modern"] .start-menu {
    left: 50%;
    bottom: 66px;
    transform: translateX(-50%);
}

.ssh-app[data-layout="neo"] {
    display: block;
    padding-left: 84px;
}

.ssh-app[data-layout="neo"] .app-topbar {
    position: fixed;
    z-index: 70;
    left: 0;
    top: 0;
    bottom: 0;
    width: 84px;
    height: auto;
    flex-direction: column;
    gap: 10px;
    padding: 12px 9px;
    border-right: 1px solid var(--border);
    border-bottom: 0;
}

.ssh-app[data-layout="neo"] .brand-copy,
.ssh-app[data-layout="neo"] .privacy-pill span,
.ssh-app[data-layout="neo"] .layout-select-wrap > span,
.ssh-app[data-layout="neo"] .topbar-home {
    display: none;
}

.ssh-app[data-layout="neo"] .topbar-spacer {
    flex: 0;
}

.ssh-app[data-layout="neo"] .privacy-pill {
    justify-content: center;
    width: 35px;
    padding: 0;
}

.ssh-app[data-layout="neo"] .layout-select-wrap {
    width: 63px;
    height: 82px;
    padding: 5px;
    border-radius: 11px;
}

.ssh-app[data-layout="neo"] .layout-select {
    width: 52px;
    min-width: 0;
    height: 100%;
    padding: 3px;
    font-size: 9px;
    text-align: center;
}

.ssh-app[data-layout="neo"] .icon-button {
    flex: 0 0 34px;
}

.ssh-app[data-layout="neo"] .app-main {
    height: 100dvh;
}

.ssh-app[data-layout="neo"] .start-menu {
    left: 90px;
}

.ssh-app[data-layout="neo"] .taskbar {
    left: 84px;
    border-left: 1px solid var(--border);
}

.ssh-app[data-layout="neo"] .launcher-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(350px, 0.85fr);
}

.ssh-app[data-layout="neo"] .desktop-icons {
    grid-template-columns: 84px;
    max-height: calc(100% - 120px);
    overflow-y: auto;
}

@media (max-width: 1100px) {
    .launcher-grid,
    .ssh-app[data-layout="neo"] .launcher-grid {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
        gap: 38px;
    }

    .launcher h1 {
        font-size: clamp(38px, 5vw, 54px);
    }

    .privacy-pill {
        display: none;
    }

    .ssh-app[data-layout="modern"] .taskbar {
        left: 8%;
        right: 8%;
    }
}

@media (max-width: 860px) {
    .ssh-app {
        --topbar-h: 54px;
    }

    .brand-copy small,
    .layout-select-wrap > span,
    .topbar-home {
        display: none;
    }

    .layout-select-wrap {
        height: 34px;
        padding: 0 4px;
    }

    .launcher {
        padding: 22px 16px 30px;
    }

    .launcher-grid,
    .ssh-app[data-layout="neo"] .launcher-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .launcher-intro {
        max-width: 670px;
    }

    .connection-panel {
        justify-self: stretch;
        max-width: none;
    }

    .ssh-app[data-layout="modern"] {
        grid-template-rows: var(--topbar-h) minmax(0, 1fr);
    }

    .ssh-app[data-layout="modern"] .app-topbar {
        margin: 0;
        border-width: 0 0 1px;
        border-radius: 0;
    }

    .ssh-app[data-layout="neo"] {
        display: grid;
        grid-template-rows: var(--topbar-h) minmax(0, 1fr);
        padding-left: 0;
    }

    .ssh-app[data-layout="neo"] .app-topbar {
        position: relative;
        width: auto;
        height: var(--topbar-h);
        flex-direction: row;
        padding: 8px 12px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .ssh-app[data-layout="neo"] .brand-copy,
    .ssh-app[data-layout="neo"] .topbar-home {
        display: flex;
    }

    .ssh-app[data-layout="neo"] .privacy-pill {
        display: none;
    }

    .ssh-app[data-layout="neo"] .layout-select-wrap {
        width: auto;
        height: 34px;
        padding: 0 4px;
    }

    .ssh-app[data-layout="neo"] .layout-select {
        width: auto;
        height: auto;
        min-width: 94px;
        font-size: 11px;
    }

    .ssh-app[data-layout="neo"] .app-main {
        height: auto;
    }

    .ssh-app[data-layout="neo"] .taskbar,
    .ssh-app[data-layout="modern"] .taskbar {
        left: 0;
        right: 0;
        bottom: 0;
        height: 54px;
        border-radius: 0;
        border-width: 1px 0 0;
        padding: 6px 8px;
    }

    .ssh-app[data-layout="neo"] .start-menu,
    .ssh-app[data-layout="modern"] .start-menu {
        left: 10px;
        transform: none;
    }

    .ssh-app[data-layout="modern"] .desktop-icons,
    .ssh-app[data-layout="neo"] .desktop-icons {
        grid-template-columns: repeat(3, 84px);
        max-height: none;
        left: 12px;
        top: 12px;
        bottom: auto;
        transform: none;
    }

    .ssh-app[data-layout="modern"] .command-rail,
    .ssh-app[data-layout="neo"] .command-rail {
        right: 10px;
        left: auto;
    }

    .desktop-heading {
        display: none;
    }

    .app-window {
        left: 8px !important;
        top: 8px !important;
        width: calc(100% - 16px) !important;
        height: calc(100% - 16px) !important;
        min-width: 0;
        border-radius: 12px;
    }

    .window-titlebar {
        cursor: default;
    }

    .window-title {
        pointer-events: auto;
    }

    .window-action[data-window-action="maximize"] {
        display: none;
    }

    .taskbar-apps {
        display: none;
    }
}

@media (max-width: 620px) {
    .app-topbar {
        gap: 7px;
        padding-right: 9px;
        padding-left: 9px;
    }

    .brand-copy {
        display: none;
    }

    .layout-select {
        min-width: 90px;
        font-size: 10px;
    }

    .launcher h1 {
        font-size: 39px;
    }

    .launcher-lead {
        font-size: 13px;
    }

    .flow-strip {
        gap: 5px;
    }

    .flow-node {
        padding: 9px 8px;
    }

    .flow-node strong {
        font-size: 10px;
    }

    .flow-arrow {
        width: 9px;
        flex-basis: 9px;
    }

    .connection-panel {
        padding: 19px;
        border-radius: 17px;
    }

    .field-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .field-grid-host {
        grid-template-columns: minmax(0, 1fr) 82px;
        gap: 8px;
    }

    .desktop-icons {
        grid-template-columns: repeat(3, 76px) !important;
        gap: 3px !important;
    }

    .desktop-icon {
        width: 76px !important;
    }

    .desktop-icon-art {
        width: 39px;
        height: 39px;
    }

    .start-button {
        width: 39px;
        padding: 0;
        justify-content: center;
    }

    .start-button > span:last-child {
        display: none;
    }

    .taskbar-sessions .taskbar-button {
        width: 34px;
        padding: 0;
        justify-content: center;
    }

    .taskbar-sessions .taskbar-button span {
        display: none;
    }

    .tray-clock {
        display: none;
    }

    .command-rail {
        width: 102px;
    }

    .command-rail-body button {
        grid-template-columns: 43px 1fr;
    }

    .settings-layout {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .settings-content {
        padding: 13px;
    }

    .layout-card-grid {
        grid-template-columns: 1fr;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .range-wrap {
        min-width: 120px;
    }

    .range-wrap input[type="range"] {
        width: 80px;
    }

    .modal-card {
        padding: 22px 18px;
    }

    .modal-flow {
        grid-template-columns: 1fr;
    }

    .modal-flow i {
        width: 1px;
        height: 10px;
        margin: 0 auto;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .primary-button,
    .modal-actions .secondary-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Readability and interaction pass */
.ssh-app {
    --radius-window: 11px;
    --shadow-window: 0 18px 55px rgba(0, 0, 0, 0.34), 0 1px 0 rgba(255, 255, 255, 0.045) inset;
    background: linear-gradient(180deg, #0b1523 0%, #08111d 100%);
    font-size: 14px;
}

.ssh-app[data-theme="light"] {
    --shadow-window: 0 18px 50px rgba(31, 65, 98, 0.14), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
    background: linear-gradient(180deg, #eef4fa 0%, #e7eff7 100%);
}

.ambient-grid {
    opacity: 0.13;
}

.ambient-orb {
    display: none;
}

.app-topbar {
    background: color-mix(in srgb, var(--app-bg) 92%, transparent);
    backdrop-filter: blur(16px);
}

.privacy-pill,
.layout-select-wrap,
.connection-panel,
.capability-card,
.command-rail {
    border-radius: 9px;
}

.privacy-pill,
.layout-select-wrap,
.topbar-home,
.launcher-feature-row,
.credential-note,
.form-options,
.history-preview-head,
.connection-state {
    font-size: 12px;
}

.layout-select,
.topbar-home {
    min-height: 34px;
}

.launcher h1 {
    font-size: clamp(42px, 4.4vw, 62px);
    letter-spacing: -0.035em;
}

.eyebrow {
    font-size: 11px;
}

.launcher-lead {
    max-width: 590px;
    font-size: 15px;
    line-height: 1.75;
}

.capability-card p {
    font-size: 12px;
    line-height: 1.65;
}

.text-button,
.connection-panel-head .panel-kicker,
.field-hint,
.form-message,
.credential-note,
.check-row {
    font-size: 12px;
}

.connection-panel {
    box-shadow: 0 24px 70px rgba(2, 9, 18, 0.32);
}

.connection-panel h2 {
    font-size: 24px;
}

.field > span:first-child,
.auth-fieldset legend {
    font-size: 13px;
}

.field input,
.field textarea {
    min-height: 43px;
    padding: 10px 12px;
    font-size: 14px;
}

.field textarea {
    min-height: 118px;
    line-height: 1.55;
}

.field-hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.55;
}

.field-hint + .field-error {
    margin-top: 4px;
}

.segmented-control .segment span {
    min-height: 36px;
    font-size: 13px;
}

.fingerprint-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fingerprint-wrap input {
    min-width: 0;
    flex: 1;
}

.fingerprint-button {
    flex: 0 0 auto;
    min-height: 43px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    cursor: pointer;
}

.fingerprint-button:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

.connection-advanced {
    margin: 14px 0 16px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-soft);
}

.connection-advanced summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 0 12px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    list-style: none;
}

.connection-advanced summary::-webkit-details-marker {
    display: none;
}

.connection-advanced summary::before {
    content: "+";
    width: 15px;
    color: var(--ssh-accent);
    font-family: ui-monospace, "SFMono-Regular", monospace;
}

.connection-advanced[open] summary::before {
    content: "−";
}

.connection-advanced summary span {
    flex: 1;
}

.connection-advanced summary small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.advanced-content {
    padding: 2px 12px 12px;
    border-top: 1px solid var(--border);
}

.advanced-content .field {
    margin-top: 12px;
}

.primary-button,
.secondary-button {
    min-height: 44px;
    font-size: 13px;
}

.modal-footnote {
    padding-left: 11px;
    border-left: 2px solid var(--ssh-accent);
    color: var(--text-soft);
}

.start-button {
    gap: 8px;
    min-width: 78px;
    font-size: 12px;
}

.start-mark {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: var(--ssh-accent);
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.desktop-icon > span:last-child {
    font-size: 12px;
}

.session-light.is-connected {
    background: var(--success);
}

.session-light.is-connecting {
    background: var(--warning);
}

.terminal-tab {
    height: 34px;
    font-size: 12px;
}

.terminal-tool {
    width: 27px;
    height: 27px;
    font-size: 10px;
}

.terminal-side-tools {
    flex-basis: 42px;
    padding: 8px 7px;
}

.terminal-statusbar {
    flex-basis: 30px;
    font-size: 11px;
}

.terminal-demo-badge {
    font-size: 10px;
}

.terminal-demo-badge.is-live {
    border-color: color-mix(in srgb, var(--success) 42%, transparent);
    color: var(--success);
}

.command-rail {
    width: 154px;
}

.command-rail-toggle {
    height: 40px;
    font-size: 12px;
}

.command-rail-body button {
    min-height: 38px;
    font-size: 11px;
}

.command-rail-body code {
    font-size: 10px;
}

.file-manager {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
}

.file-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 54px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

.file-navigation {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1;
}

.file-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 12px;
    cursor: pointer;
}

.file-nav-button:hover:not(:disabled) {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

.file-nav-button:disabled {
    opacity: 0.4;
    cursor: default;
}

.file-nav-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transform: rotate(180deg);
}

.file-home-button {
    white-space: nowrap;
}

.file-path-form {
    min-width: 0;
    flex: 1;
}

.file-path-form input {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    outline: 0;
    background: var(--surface-soft);
    color: var(--text);
    font-family: ui-monospace, "SFMono-Regular", "Liberation Mono", monospace;
    font-size: 12px;
}

.file-path-form input:focus {
    border-color: var(--ssh-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ssh-accent) 14%, transparent);
}

.file-refresh-button {
    min-height: 34px;
    font-size: 12px;
}

.file-status {
    flex: 0 0 32px;
    padding: 0 14px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    line-height: 32px;
}

.file-table-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px 116px;
    gap: 12px;
    flex: 0 0 34px;
    align-items: center;
    padding: 0 14px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.file-list {
    min-height: 0;
    flex: 1;
    overflow: auto;
    border: 0;
    border-radius: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

.file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px 116px;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    color: var(--text-soft);
    text-align: left;
    font-size: 13px;
    cursor: pointer;
}

.file-row:hover,
.file-row:focus-visible {
    outline: 0;
    background: color-mix(in srgb, var(--ssh-accent) 9%, var(--surface-soft));
}

.file-row.is-directory .file-name span {
    color: var(--text);
    font-weight: 650;
}

.file-name {
    gap: 9px;
}

.file-name svg {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
}

.file-row small {
    font-size: 11px;
}

.file-empty {
    display: grid;
    place-items: center;
    min-height: 180px;
    padding: 32px 18px;
    color: var(--muted);
    font-size: 13px;
}

.file-empty.is-error {
    color: var(--danger);
}

.file-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 180px;
    color: var(--muted);
    font-size: 13px;
}

.file-loading span {
    width: 15px;
    height: 15px;
    border: 2px solid var(--border-strong);
    border-top-color: var(--ssh-accent);
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

.file-preview {
    display: flex;
    flex-direction: column;
    min-height: 180px;
    max-height: 46%;
    border-top: 1px solid var(--border-strong);
    background: var(--surface-solid);
}

.file-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: 0 0 42px;
    padding: 0 12px;
    border-bottom: 1px solid var(--border);
}

.file-preview-head strong {
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-preview pre {
    min-height: 0;
    margin: 0;
    padding: 14px;
    overflow: auto;
    color: var(--text-soft);
    font-family: ui-monospace, "SFMono-Regular", "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.panel-toolbar h3,
.settings-section h3 {
    font-size: 15px;
}

.panel-toolbar p,
.settings-section > p,
.setting-row small,
.history-item strong,
.history-item small,
.overview-card span,
.overview-card strong,
.small-button {
    font-size: 12px;
}

.overview-card strong {
    line-height: 1.5;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 620px) {
    .file-table-head {
        display: none;
    }

    .file-row {
        grid-template-columns: minmax(0, 1fr) 74px;
        min-height: 46px;
        padding: 0 11px;
    }

    .file-row small:last-child {
        display: none;
    }

    .file-home-button {
        display: none;
    }

    .command-rail {
        width: 132px;
    }
}
