/* Secondary application surfaces. Shared palette comes from liquid_glass.css. */
body.lg-login-page,
body.lg-ssh-page {
    color: var(--lg-text, var(--text-main));
    font-family: var(--lg-font-ui);
    font-size: 14px;
    line-height: 1.65;
    letter-spacing: 0;
}
body.lg-login-page {
    min-height: 100dvh;
    height: auto;
    padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
    overflow-y: auto;
}
html.liquid-glass body.lg-login-page .login-card {
    position: relative;
    isolation: isolate;
    width: min(100%, 444px);
    max-width: 444px;
    padding: 40px !important;
    border: 1px solid var(--lg-border, rgba(255, 255, 255, .72)) !important;
    border-radius: 32px !important;
    background-color: var(--lg-surface, rgba(255, 255, 255, .18)) !important;
    background-image: var(--lg-reflection, linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,0) 42%, rgba(255,255,255,.07))) !important;
    box-shadow: var(--lg-shadow) !important;
    -webkit-backdrop-filter: var(--lg-blur, blur(18px) saturate(160%)) !important;
    backdrop-filter: var(--lg-blur, blur(18px) saturate(160%)) !important;
}
body.lg-login-page .login-logo { display: inline-flex; margin-bottom: 18px; padding: 7px; border: 1px solid var(--lg-border); border-radius: 25px; background: var(--lg-selected); box-shadow: var(--lg-highlight); }
body.lg-login-page .login-logo img { width: 58px; height: 58px; border-radius: 18px; box-shadow: var(--lg-highlight); }
.login-eyebrow { color: var(--lg-muted); font-size: 11px; font-weight: 500; letter-spacing: .15em; margin: 0 0 9px; }
body.lg-login-page .login-title { color: var(--lg-text, var(--text-main)); font-size: 28px; font-weight: 600; letter-spacing: 0; line-height: 1.4; margin: 0 0 10px; }
body.lg-login-page .login-subtitle,
body.lg-login-page .login-footnote { color: var(--lg-muted, var(--text-sub)); line-height: 1.7; }
body.lg-login-page .login-subtitle { font-size: 13px; margin: 0 0 30px; }
body.lg-login-page .login-form-group { margin-bottom: 20px; }
.login-footnote { margin: 12px 0 0; padding-top: 18px; border-top: 1px solid var(--lg-line); text-align: center; font-size: 12px; letter-spacing: 0; }
body.lg-login-page .login-label { color: var(--lg-text, var(--text-main)); margin-bottom: 8px; font-size: 13px; font-weight: 500; line-height: 1.5; }
body.lg-login-page .login-input {
    min-height: 49px; height: 49px; padding: 12px 15px; border-radius: 14px;
    color: var(--lg-text, var(--text-main));
    background: var(--lg-input, rgba(255, 255, 255, .6));
    border-color: var(--lg-border, var(--border));
    font-size: 14px !important; font-weight: 400;
}
body.lg-login-page .login-btn { min-height: 48px; font-size: 14px !important; font-weight: 500 !important; letter-spacing: 0; line-height: 1.5; border-radius: 15px; color: var(--lg-action-text) !important; background: var(--lg-action-bg) !important; border-color: var(--lg-action-border) !important; box-shadow: var(--lg-action-shadow) !important; text-shadow: none; }
.login-feedback { color: #ba344d; margin: 11px 0 0; font-size: 13px; min-height: 21px; line-height: 1.7; overflow-wrap: anywhere; }
html[data-theme="dark"] .login-feedback { color: #ffa1b0; }
body.lg-login-page :is(input, button):focus-visible,
body.lg-ssh-page :is(input, button, a):focus-visible,
body:is(.vfp-app-body, .vfp-inline-editor-open) :is(button, input, select, textarea, a):focus-visible { outline: 3px solid var(--lg-accent, #1682f5); outline-offset: 3px; }

body.lg-ssh-page { height: 100dvh; min-height: 0; padding: 22px; gap: 18px; }
body.lg-ssh-page .ssh-header {
    display: grid; grid-template-columns: minmax(178px, 1.2fr) minmax(150px, 1fr) 78px minmax(125px, .8fr) minmax(125px, .8fr) auto auto;
    align-items: end; height: auto; min-height: 100px; gap: 16px; padding: 22px 24px; border-radius: 26px; margin: 0;
    border: 1px solid var(--lg-border, rgba(255, 255, 255, .6));
    background-color: var(--lg-surface, rgba(255, 255, 255, .18));
    background-image: var(--lg-reflection, linear-gradient(150deg, rgba(255,255,255,.22), transparent 50%, rgba(255,255,255,.07)));
    box-shadow: var(--lg-shadow);
    -webkit-backdrop-filter: var(--lg-blur, blur(18px) saturate(160%)); backdrop-filter: var(--lg-blur, blur(18px) saturate(160%));
}
.ssh-brand { display: flex; align-items: center; align-self: center; gap: 11px; min-width: 0; }
.ssh-brand-mark { display: grid; place-items: center; flex: none; width: 42px; height: 42px; color: var(--lg-accent); background: var(--lg-selected); border: 1px solid var(--lg-border); box-shadow: var(--lg-highlight); border-radius: 15px; font: 500 19px ui-monospace, monospace; }
.ssh-brand strong { font-size: 15px; font-weight: 600; letter-spacing: 0; line-height: 1.5; white-space: nowrap; }
.ssh-brand small { display: block; margin-top: 4px; font-size: 12px; letter-spacing: 0; line-height: 1.5; color: var(--lg-muted, var(--text-sub)); }
body.lg-ssh-page .ssh-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; width: auto; margin: 0; }
.ssh-field label { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--lg-text, var(--text-main)); }
body.lg-ssh-page .form-input { min-height: 41px; height: 41px; border-radius: 12px; padding: 9px 12px; background: var(--lg-input, rgba(255, 255, 255, .18)); border: 1px solid var(--lg-line); color: var(--lg-text, var(--text-main)); width: 100%; font-family: inherit; font-size: 14px !important; font-weight: 400; }
body.lg-ssh-page #port { width: 100%; font-variant-numeric: tabular-nums; }
body.lg-ssh-page .ssh-field:focus-within label { color: var(--lg-accent); }
body.lg-ssh-page .ssh-field :disabled { opacity: .65; cursor: default; }
body.lg-ssh-page #btn-conn:hover:not(:disabled) { filter: brightness(1.05); }
body.lg-ssh-page #btn-conn:active:not(:disabled) { transform: translateY(1px); }
body.lg-ssh-page .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 41px; padding: 10px 17px; border: 1px solid var(--lg-action-border); border-radius: 13px; font: 500 13px var(--lg-font-ui); line-height: 1.4; color: var(--lg-action-text); cursor: pointer; white-space: nowrap; background: var(--lg-action-bg); box-shadow: var(--lg-action-shadow); }
body.lg-ssh-page .btn:disabled { cursor: default; opacity: .5; box-shadow: none; }
.ssh-back { display: inline-flex; align-items: center; justify-content: center; align-self: end; min-height: 41px; margin: 0; color: var(--lg-muted); text-decoration: none; font-size: 13px; padding: 10px 6px; border-radius: 12px; white-space: nowrap; }
.ssh-back:hover { color: var(--lg-accent); background: var(--lg-soft); }
.ssh-terminal-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow: hidden; background: linear-gradient(145deg,rgba(16,30,44,.9),rgba(9,17,28,.9)); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: #dce8f5; border-radius: 26px; border: 1px solid rgba(153,186,223,.26); box-shadow: 0 0 20px -7px rgba(0,0,0,.25),inset 0 0 0 1px rgba(214,233,255,.05); }
.ssh-terminal-title { display: flex; gap: 14px; align-items: center; padding: 16px 22px; border-bottom: 1px solid rgba(255,255,255,.06); background: linear-gradient(130deg,rgba(194,217,241,.055),transparent 60%); font-size: 12px; line-height: 1.5; color: #a9bdd2; }
.ssh-terminal-dots { display: flex; gap: 7px; }
.ssh-terminal-dots i { width: 8px; height: 8px; border-radius: 50%; background: #56738c; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.ssh-terminal-dots i:first-child { background: #b87776; }
.ssh-terminal-dots i:nth-child(2) { background: #b5a070; }
.ssh-terminal-dots i:last-child { background: #6d9e87; }
body.lg-ssh-page #terminal-wrap { padding: 23px; font-family: var(--lg-font-mono); font-size: 13px; line-height: 1.8; white-space: normal; }
body.lg-ssh-page #terminal-wrap:focus-visible { outline: 2px solid #78beff; outline-offset: -3px; }
body.lg-ssh-page #output-content { white-space: pre-wrap; overflow-wrap: anywhere; }
.ssh-command-form { display: flex; gap: 12px; align-items: center; margin: 0; padding: 13px 20px max(13px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.07); background: rgba(192,215,242,.025); }
.ssh-command-prompt { font: 500 20px ui-monospace, monospace; color: #73befb; }
body.lg-ssh-page #cmd-input { position: static; flex: 1; min-width: 0; width: auto; height: 40px; opacity: 1; color: #e7f1ff; caret-color: #77c6ff; text-shadow: none; font: 14px/1.6 var(--lg-font-mono); background: transparent; }
html.liquid-glass body.lg-ssh-page #cmd-input::placeholder { color: #a9bdd2 !important; opacity: 1 !important; }
.ssh-command-form .btn { flex: none; align-self: center !important; min-width: 68px; --lg-action-bg: linear-gradient(145deg,rgba(180,212,246,.16),rgba(102,152,206,.075)),rgba(37,68,103,.28); --lg-action-text: #b6dcff; --lg-action-border: rgba(163,203,243,.25); --lg-action-shadow: 0 0 10px -5px rgba(0,0,0,.28),inset 0 0 0 1px rgba(223,238,255,.07); }
.ssh-command-form :disabled { opacity: .55; }
.ssh-terminal-help { margin-left: auto; font-size: 12px; }
body.lg-ssh-page .terminal-end-spacer { height: 18px; }
body.lg-ssh-page .cursor-block { display: none; }
@media (max-width: 1100px) and (min-width: 701px) {
    body.lg-ssh-page .ssh-header { grid-template-columns: minmax(160px,1.3fr) 78px minmax(120px,1fr) minmax(130px,1fr) auto; gap: 14px; }
    .ssh-brand { grid-column: 1 / 4; grid-row: 1; }
    .ssh-back { grid-column: 4 / -1; grid-row: 1; justify-self: end; }
}

/* The rule workspace keeps one glass frame; the empty state belongs to its canvas. */
body.vfp-inline-editor-open #main-content > .top-bar,
body.vfp-inline-editor-open #main-content > #global-alert-strip { display: none !important; }
body.vfp-inline-editor-open .vfp-inline-shell { background: transparent; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-content-area { background: transparent; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-page { padding: 20px; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-eyebrow { display: none; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-app-page-title strong { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: 0; line-height: 1.45; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-back-btn { min-height: 38px; border-radius: 12px; font-weight: 500; }
body:is(.vfp-app-body, .vfp-inline-editor-open) :is(.vfp-rule-board, .vfp-dialog, .vfp-preview-drawer) { border: 1px solid var(--lg-border, var(--border)); border-radius: 24px; background: var(--lg-panel-surface, var(--lg-surface)); box-shadow: var(--lg-shadow); -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur); }
body:is(.vfp-app-body, .vfp-inline-editor-open) :is(.vfp-dialog, .vfp-preview-drawer) { background-color: var(--lg-elevated); }
body:is(.vfp-app-body, .vfp-inline-editor-open) :is(.vfp-board-head, .vfp-dialog-head) { border-color: var(--lg-line, var(--border)); background: transparent; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-board-head { justify-content: space-between; gap: 18px; padding: 18px 20px; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-board-head h2 { font-size: 14px; font-weight: 600; letter-spacing: 0; line-height: 1.5; white-space: nowrap; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-board-rule-count { font-weight: 400; font-size: 12px; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-board-head .vfp-action-bar { margin-left: auto; gap: 8px; padding-left: 0; border-left: 0; }
body:is(.vfp-app-body, .vfp-inline-editor-open) :is(.vfp-input, .vfp-select, .vfp-preview) { border-radius: 12px; background: var(--lg-input, var(--bg-card)); font-weight: 400; }
body:is(.vfp-app-body, .vfp-inline-editor-open) :is(.vfp-secondary-btn, .vfp-primary-btn, .vfp-add-btn, .vfp-header-action) { min-height: 40px; border-radius: 12px; font-weight: 500; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-header-action { padding-inline: 13px; gap: 7px; font-size: 12px; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-secondary-btn { background: var(--lg-soft); color: var(--lg-text); border-color: var(--lg-line); box-shadow: var(--lg-highlight); }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-secondary-btn:hover:not(:disabled) { background: var(--lg-hover); border-color: var(--lg-border); }
body:is(.vfp-app-body, .vfp-inline-editor-open) :is(.vfp-primary-btn, .vfp-add-btn) { background: var(--lg-action-bg, var(--lg-selected)); color: var(--lg-action-text, var(--lg-accent)); border-color: var(--lg-action-border, var(--lg-border)); box-shadow: var(--lg-action-shadow, var(--lg-highlight)); }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-all-mode-card:not(.hidden) { flex: 1 1 auto; min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 32px 20px; margin: 0; border: 0; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; text-align: center; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-all-mode-card .vfp-empty-icon { display: grid; place-items: center; width: 66px; height: 66px; color: var(--lg-accent); background: var(--lg-panel-surface); border: 1px solid var(--lg-border); border-radius: 21px; box-shadow: var(--lg-highlight); }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-all-mode-card .vfp-empty-icon svg { width: 30px; height: 30px; stroke-width: 1.3; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-all-mode-card strong { font-size: 16px; font-weight: 500; line-height: 1.5; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-all-mode-card small { max-width: 29ch; margin: 8px auto 0; font-size: 13px; font-weight: 400; line-height: 1.75; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-rule-board:has(.vfp-all-mode-card:not(.hidden)) .vfp-rule-list { display: none; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-page-status { padding: 12px 20px; border-top: 1px solid var(--lg-line); font-size: 12px; font-weight: 400; line-height: 1.65; color: var(--lg-muted); }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-rule-list { padding: 18px; gap: 14px; background: none; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-rule-poster { border-color: var(--lg-line); background: var(--lg-soft); box-shadow: var(--lg-shadow); }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-rule-poster.is-placeholder { color: var(--lg-muted); background: var(--lg-selected); }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-rule-poster.is-placeholder :is(b, small) { font-weight: 500; }
html.liquid-glass body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-rule-card { border-color: var(--lg-line) !important; background: var(--lg-soft) !important; border-radius: 18px !important; box-shadow: var(--lg-highlight) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.liquid-glass body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-rule-card:hover { border-color: var(--lg-border) !important; box-shadow: var(--lg-shadow) !important; }
html.liquid-glass body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-rule-card.is-unsaved { border-color: color-mix(in srgb, var(--lg-control-warning) 38%, transparent) !important; background: var(--lg-control-warning-bg) !important; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-rule-card.is-custom { border-style: solid; border-radius: 17px; padding: 16px; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-custom-mark { font-family: var(--lg-font-mono, monospace); color: var(--lg-accent); background: transparent; border: 0; box-shadow: none; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-custom-content strong { font-size: 14px; font-weight: 500; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-card-match-meta { font-size: 12px; font-weight: 400; line-height: 1.5; letter-spacing: 0; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-delete-btn { width: 32px; min-width: 32px; height: 32px; border-color: transparent; background: transparent; color: var(--lg-control-danger); font-weight: 400; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-delete-btn:hover { background: var(--lg-control-danger-bg); color: var(--lg-control-danger); }
body:is(.vfp-app-body, .vfp-inline-editor-open) :is(.vfp-custom-dialog, .vfp-preview-drawer) .vfp-dialog-kicker { display: none; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-dialog-head h2 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: 0; line-height: 1.45; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-dialog-description { font-size: 13px; font-weight: 400; line-height: 1.75; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-dialog-close { width: 36px; height: 36px; border-radius: 50%; background: var(--lg-soft); border-color: var(--lg-line); color: var(--lg-muted); }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-dialog-field > span { font-size: 13px; font-weight: 500; line-height: 1.55; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-save-note { color: var(--lg-control-warning); background: var(--lg-control-warning-bg); border-color: color-mix(in srgb, var(--lg-control-warning) 24%, transparent); font-size: 13px; font-weight: 400; line-height: 1.75; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-preview { color: var(--lg-text); font: 12px/1.8 var(--lg-font-mono, monospace); }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-tmdb-result { border-color: var(--lg-line); background: var(--lg-soft); border-radius: 14px; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-result-title { font-size: 13px; font-weight: 500; line-height: 1.5; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-result-add { min-height: 36px; border-radius: 10px; font-weight: 500; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-tmdb-empty { border-color: transparent; background: transparent; color: var(--lg-muted); }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-card-title-field .vfp-input { height: 34px; font-weight: 500; letter-spacing: 0; }
body:is(.vfp-app-body, .vfp-inline-editor-open) :is(.vfp-card-filters .vfp-card-field, .vfp-card-condition) { min-height: 48px; height: auto; padding: 5px 8px; background: var(--lg-input); border-color: var(--lg-line); border-radius: 10px; }
body:is(.vfp-app-body, .vfp-inline-editor-open) :is(.vfp-card-field > span, .vfp-condition-toggle, .vfp-card-sharer > span, .vfp-config-section-title) { font-size: 12px; font-weight: 500; line-height: 1.5; letter-spacing: 0; }
html.liquid-glass body:is(.vfp-app-body, .vfp-inline-editor-open) :is(.vfp-card-filters .vfp-select, .vfp-card-condition .vfp-input) { min-height: 25px; height: 25px; padding-block: 0; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; font-weight: 400; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-card-match-meta > span:first-child { color: var(--lg-control-success); }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-card-match-meta > .vfp-unsaved-badge { color: var(--lg-control-warning); background: var(--lg-control-warning-bg); border-color: color-mix(in srgb, var(--lg-control-warning) 28%, transparent); font-weight: 500; }
body:is(.vfp-app-body, .vfp-inline-editor-open) :is(.vfp-result-meta, .vfp-tool-title small, .vfp-tmdb-empty, .vfp-toast) { font-size: 12px; font-weight: 400; line-height: 1.7; letter-spacing: 0; }
body:is(.vfp-app-body, .vfp-inline-editor-open) :is(.vfp-tool-title h2, .vfp-drawer-head strong) { font-weight: 600; line-height: 1.5; letter-spacing: 0; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-save-note strong { font-weight: 500; }
/* Override legacy dark_controls' broad action-name match only inside the editor. */
html.liquid-glass[data-theme="dark"] body:is(.vfp-app-body, .vfp-inline-editor-open) :is(#vfp-page, .vfp-dialog, .vfp-preview-drawer) :is(.vfp-secondary-btn, .vfp-result-add, .vfp-dialog-close) { background: var(--lg-soft) !important; color: var(--lg-text) !important; border-color: var(--lg-line) !important; box-shadow: var(--lg-highlight) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.liquid-glass[data-theme="dark"] body:is(.vfp-app-body, .vfp-inline-editor-open) :is(#vfp-page, .vfp-dialog, .vfp-preview-drawer) :is(.vfp-primary-btn, .vfp-add-btn) { background: var(--lg-action-bg, var(--lg-selected)) !important; color: var(--lg-action-text, var(--lg-accent)) !important; border-color: var(--lg-action-border, var(--lg-border)) !important; box-shadow: var(--lg-action-shadow, var(--lg-highlight)) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.liquid-glass[data-theme="dark"] body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-delete-btn { color: var(--lg-control-danger) !important; background: transparent !important; border-color: transparent !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-dialog-footer .vfp-secondary-btn { display: inline-flex; }
body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-dialog-footer :is(.vfp-primary-btn,.vfp-secondary-btn) { min-width: 90px; min-height: 42px; }
@container (max-width: 680px) {
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-board-head { gap: 16px; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-board-head .vfp-action-bar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; width: 100%; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-board-head .vfp-action-bar .vfp-header-action { min-width: 0; min-height: 41px; font-size: 12px; padding-inline: 7px; }
}
@media (max-width: 700px) {
    body.lg-ssh-page { padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); gap: 12px; }
    body.lg-ssh-page .ssh-header { grid-template-columns: repeat(4,minmax(0,1fr)); padding: 17px; gap: 13px 12px; border-radius: 23px; }
    .ssh-brand { grid-column: 1 / 3; grid-row: 1; }
    .ssh-brand small { display: none; }
    .ssh-brand-mark { width: 34px; height: 34px; border-radius: 12px; font-size: 16px; }
    .ssh-brand strong { font-size: 14px; }
    .ssh-back { grid-column: 3 / 5; grid-row: 1; justify-self: end; min-height: 44px; padding: 7px 0; }
    body.lg-ssh-page .ssh-field { grid-column: span 2; }
    body.lg-ssh-page .ssh-field:has(#host) { grid-column: span 3; }
    body.lg-ssh-page .ssh-field:has(#port) { grid-column: span 1; }
    body.lg-ssh-page .ssh-field .form-input { width: 100%; font-size: 16px !important; }
    body.lg-ssh-page #btn-conn { grid-column: 1 / -1; width: 100%; }
    body.lg-ssh-page .btn { min-height: 44px; }
    .ssh-terminal-panel { border-radius: 23px; }
    .ssh-terminal-title { padding: 14px 17px; }
    .ssh-terminal-help { display: none; }
    .ssh-command-form { padding: 10px 14px; gap: 8px; }
    body.lg-ssh-page #terminal-wrap { padding: 17px; }
    body.lg-ssh-page #cmd-input { font-size: 16px; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-page { padding: 10px; }
    html.liquid-glass body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-app-topbar { gap: 8px !important; flex-wrap: nowrap !important; }
    html.liquid-glass body.vfp-inline-editor-open .vfp-app-topbar { border-radius: 20px; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-board-head { padding: 16px 14px; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-app-page-title strong { font-size: 13px; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-all-mode-card:not(.hidden) { padding: 28px 18px; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-all-mode-card strong { font-size: 15px; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-page-status { padding: 11px 15px; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-rule-list { padding: 12px; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-app-page-title { min-width: 0; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) :is(.vfp-input, .vfp-select) { font-size: 16px; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-rule-card:not(.is-custom) { grid-template-columns: 60px minmax(0, 1fr); gap: 9px; padding: 10px; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-rule-poster { width: 60px; height: 96px; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-card-title-field .vfp-input { min-height: 36px; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-card-filters .vfp-select { padding-right: 0; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) .vfp-dialog .vfp-tmdb-search-row { grid-template-columns: minmax(0, 1fr) auto; }
    body:is(.vfp-app-body, .vfp-inline-editor-open) #vfp-tmdb-search-input { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    body.lg-login-page { padding-left: 18px; padding-right: 18px; }
    html.liquid-glass body.lg-login-page .login-card { padding: 32px 25px 26px !important; border-radius: 29px !important; }
    body.lg-login-page .login-title { font-size: 26px; }
    body.lg-login-page .login-input { font-size: 16px !important; }
    body.lg-login-page .login-subtitle { margin-bottom: 26px; font-size: 13px; }
    body.lg-login-page .login-logo { margin-bottom: 16px; }
}
@media (max-height: 620px) {
    body.lg-login-page { justify-content: flex-start; align-items: center; }
    html.liquid-glass body.lg-login-page .login-card { margin: auto; }
    body.lg-ssh-page { height: auto; min-height: 100dvh; overflow-y: auto; }
    .ssh-terminal-panel { min-height: 230px; }
    body.lg-ssh-page #terminal-wrap { max-height: 45dvh; }
}
@media (prefers-reduced-motion: reduce) {
    :is(.lg-login-page, .lg-ssh-page, .vfp-app-body) *, :is(.lg-login-page, .lg-ssh-page, .vfp-app-body) *::before, :is(.lg-login-page, .lg-ssh-page, .vfp-app-body) *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
