/* ─────────────────────────────────────────────────────────
   Abrha Remote  ·  Cyber-Obsidian & Nebula Glassmorphism Theme
   High-performance, zero-dependency, ultra-modern HTML5 client
   ───────────────────────────────────────────────────────── */

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/JetBrainsMono-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/static/fonts/JetBrainsMono-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/static/fonts/JetBrainsMono-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/fonts/JetBrainsMono-Bold.woff2') format('woff2');
}

/* Reset */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html, body { width:100%; height:100%; overflow:hidden; }

/* ── Design Tokens ── */
:root {
    --bg:              #050811;
    --bg-surface:      rgba(11, 17, 32, 0.78);
    --bg-surface-2:    rgba(18, 26, 48, 0.85);
    --bg-well:         #070c18;
    --border:          rgba(255, 255, 255, 0.08);
    --border-bright:   rgba(255, 255, 255, 0.16);
    --border-soft:     rgba(255, 255, 255, 0.04);
    
    /* Neon Cyber Accents */
    --cyan:            #00d2ff;
    --cyan-glow:       rgba(0, 210, 255, 0.35);
    --blue:            #0080ff;
    --indigo:          #6366f1;
    --violet:          #a855f7;
    --rose:            #ff385c;
    --rose-glow:       rgba(255, 56, 92, 0.3);
    --emerald:         #10b981;
    --emerald-glow:    rgba(16, 185, 129, 0.4);
    --amber:           #f59e0b;
    
    /* Text Hierarchy */
    --text:            #f1f5f9;
    --text-muted:      #94a3b8;
    --text-dim:        #5f718d;
    
    /* Typography */
    --font-ui:         system-ui, -apple-system, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
    --font-mono:       'JetBrains Mono', Menlo, Monaco, Consolas, monospace;
    
    /* Radii */
    --radius-card:     20px;
    --radius-input:    12px;
    --radius-btn:      12px;
    --radius-chip:     8px;
    
    /* Shadows & Elevation */
    --shadow-card:     0 0 0 1px rgba(255, 255, 255, 0.07),
                       0 20px 60px -15px rgba(0, 0, 0, 0.85),
                       0 0 45px -10px rgba(0, 210, 255, 0.12);
    --shadow-input:    inset 0 2px 4px rgba(0, 0, 0, 0.5);
    --shadow-btn:      0 8px 24px -4px rgba(0, 180, 255, 0.45),
                       0 0 15px rgba(0, 210, 255, 0.2);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 14.5px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
}

/* ── Icons ── */
.sprite-source { position:absolute; width:0; height:0; overflow:hidden; }
.icon {
    width:1.05em; height:1.05em; flex:none;
    fill:none; stroke:currentColor;
    stroke-width:1.85; stroke-linecap:round; stroke-linejoin:round;
    vertical-align:-0.125em;
    transition: transform .2s ease, stroke .2s ease;
}

/* ── Ambient Background & Nebula Aurora ── */
#particle-canvas { position:fixed; inset:0; z-index:0; pointer-events:none; }

.bg-gradient {
    position: fixed; inset: 0; z-index: 1; pointer-events: none;
    background:
        radial-gradient(ellipse 90% 50% at 50% -15%, rgba(0, 210, 255, 0.13) 0%, transparent 65%),
        radial-gradient(ellipse 70% 45% at 90% 90%, rgba(99, 102, 241, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 10% 85%, rgba(168, 85, 247, 0.08) 0%, transparent 60%);
    animation: aurora-flow 18s ease-in-out infinite alternate;
}

@keyframes aurora-flow {
    0%   { opacity: 0.85; filter: hue-rotate(0deg); }
    50%  { opacity: 1; filter: hue-rotate(15deg); }
    100% { opacity: 0.9; filter: hue-rotate(-10deg); }
}

/* ── App Layout ── */
.app-wrapper { position:relative; z-index:10; display:flex; flex-direction:column; height:100vh; }

/* ════════════════════ TOP NAVBAR ════════════════════ */
.app-navbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 30px;
    background: rgba(6, 9, 18, 0.80);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-bottom: 1px solid var(--border-soft);
    flex-shrink: 0; z-index: 30;
}

.brand-badge {
    display: flex; align-items: center; gap: 11px;
    text-decoration: none; position: relative;
}

.brand-logo {
    display: block; width: 34px; height: 34px;
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12),
                0 4px 16px -2px rgba(0, 180, 255, 0.7);
    transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .25s ease;
}

.brand-badge:hover .brand-logo {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22),
                0 8px 25px -3px rgba(0, 210, 255, 0.9);
}

.brand-pill {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border);
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 10px; font-weight: 700;
    padding: 3px 8px; border-radius: 6px;
    letter-spacing: 0.14em;
    text-shadow: 0 0 10px var(--cyan-glow);
    transition: all .2s ease;
}

.brand-badge:hover .brand-pill {
    border-color: rgba(0, 210, 255, 0.35);
    background: rgba(0, 210, 255, 0.08);
}

.nav-right { display: flex; align-items: center; gap: 12px; }

/* Status Badge with Radar Pulse */
.status-badge {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    background: rgba(18, 26, 48, 0.75);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 11.5px; font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.05);
}

.status-dot {
    position: relative;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 10px var(--emerald);
    transition: all .25s ease;
}
.status-dot::after {
    content: '';
    position: absolute; inset: -3px; border-radius: 50%;
    border: 1px solid var(--emerald);
    animation: radar-pulse 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes radar-pulse {
    0%   { transform: scale(0.8); opacity: 0.9; }
    70%  { transform: scale(2.2); opacity: 0; }
    100% { transform: scale(2.4); opacity: 0; }
}

.status-dot.busy  { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.status-dot.busy::after { border-color: var(--amber); }
.status-dot.error { background: var(--rose); box-shadow: 0 0 10px var(--rose); }
.status-dot.error::after { border-color: var(--rose); }
.status-dot.live  { background: var(--emerald); box-shadow: 0 0 10px var(--emerald); }

.btn-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--bg-surface-2); border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; cursor: pointer;
    transition: all .2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-icon:hover {
    background: #1e2b48;
    color: var(--cyan);
    border-color: rgba(0, 210, 255, 0.35);
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* ════════════════════ MAIN CONTENT VIEWPORT ════════════════════ */
.main-content {
    flex: 1; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
}

/* ════════════════════ HERO FORM PANEL ════════════════════ */
.form-panel {
    width: 100%; max-width: 530px;
    background: var(--bg-surface);
    backdrop-filter: blur(32px) saturate(190%);
    -webkit-backdrop-filter: blur(32px) saturate(190%);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-card);
    padding: 34px 36px 26px;
    box-shadow: var(--shadow-card);
    position: relative;
    margin: 24px auto;
    animation: cardIn .5s cubic-bezier(.16, 1, .3, 1) both;
    overflow: hidden;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Elegant light beam streak on card top */
.form-panel::before {
    content: '';
    position: absolute; top: 0; left: 15%; right: 15%; height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--cyan) 50%, transparent 100%);
    opacity: 0.85;
    filter: blur(0.5px);
}

/* ── Card Header ── */
.card-header {
    display: flex; align-items: center; gap: 15px;
    margin-bottom: 24px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border-soft);
}

.card-header-icon {
    width: 44px; height: 44px; border-radius: 13px; flex: none;
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.12), rgba(99, 102, 241, 0.12));
    border: 1px solid rgba(0, 210, 255, 0.25);
    color: var(--cyan);
    display: flex; align-items: center; justify-content: center;
    font-size: 21px;
    box-shadow: 0 0 20px -5px var(--cyan-glow);
}

.card-header-title {
    font-size: 21px; font-weight: 700; color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.card-header-subtitle {
    font-size: 12.5px; color: var(--text-dim);
    margin-top: 4px; font-weight: 400;
}

/* ── Form Controls & Inputs ── */
.form-group { margin-bottom: 18px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 105px; gap: 14px; }

.form-label {
    display: flex; align-items: center; gap: 7px;
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.form-label .icon {
    color: var(--cyan);
    opacity: 0.85;
    font-size: 1.1em;
}

.label-optional {
    text-transform: none; letter-spacing: 0;
    color: var(--text-dim); opacity: 0.8;
    font-size: 10px; font-weight: 400;
    margin-left: 2px;
}

.mb0 { margin-bottom: 0; }

.ssh-input {
    width: 100%; height: 46px; padding: 0 16px;
    background: var(--bg-well);
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 13.5px;
    outline: none;
    box-shadow: var(--shadow-input);
    transition: all .2s ease;
}
.ssh-input:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: #091020;
}
.ssh-input::placeholder {
    color: var(--text-dim);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 400;
}
.ssh-input:focus {
    background: #0b1428;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.15),
                0 0 20px -3px rgba(0, 210, 255, 0.25);
}
.ssh-input.text-center { text-align: center; font-weight: 600; }

.ssh-input.masked {
    -webkit-text-security: disc;
    text-security: disc;
    letter-spacing: 0.18em;
}
.ssh-input.masked::placeholder { letter-spacing: 0; }

/* Protocol Segmented Selector */
.auth-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0;
}

.auth-tabs {
    display: flex; gap: 3px; padding: 4px;
    background: var(--bg-well);
    border: 1px solid var(--border-soft);
    border-radius: 11px;
    box-shadow: var(--shadow-input);
}

.auth-tab {
    padding: 6px 14px; border-radius: 8px;
    background: transparent; border: none;
    color: var(--text-dim); font-size: 12px; font-weight: 600;
    cursor: pointer; transition: all .2s ease;
    display: flex; align-items: center; gap: 6px;
    letter-spacing: 0.03em;
}
.auth-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }

/* Protocol specific active glows */
.auth-tab.active {
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.auth-tab[data-protocol="rdp"].active {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.25), rgba(0, 140, 255, 0.25));
    border: 1px solid rgba(0, 210, 255, 0.4);
    color: var(--cyan);
}
.auth-tab[data-protocol="vnc"].active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(121, 40, 202, 0.25));
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #c084fc;
}
.auth-tab[data-protocol="ssh"].active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.25));
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

/* Password reveal */
.pwd-input-wrap { position: relative; }
.pwd-input-wrap .ssh-input { padding-right: 44px; }
.btn-eye {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: transparent; border: none; color: var(--text-dim);
    cursor: pointer; font-size: 16px; padding: 6px; line-height: 0;
    border-radius: 6px;
    transition: all .2s ease;
}
.btn-eye:hover {
    color: var(--cyan);
    background: rgba(0, 210, 255, 0.1);
    transform: translateY(-50%) scale(1.1);
}

/* Connect Action Button */
.form-actions { margin-top: 24px; }

.btn-connect {
    position: relative;
    width: 100%; height: 48px; border-radius: var(--radius-btn);
    background: linear-gradient(135deg, #00d2ff 0%, #0088ff 50%, #6366f1 100%);
    border: none;
    color: #ffffff;
    font-family: var(--font-ui);
    font-size: 14.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    cursor: pointer;
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-btn);
    transition: all .25s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

/* Shimmer sweep animation */
.btn-connect::after {
    content: '';
    position: absolute; top: -50%; left: -60%; width: 50%; height: 200%;
    background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: rotate(25deg);
    transition: none;
}
.btn-connect:hover::after {
    left: 130%;
    transition: left 0.85s ease-in-out;
}

.btn-connect:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -4px rgba(0, 180, 255, 0.6),
                0 0 25px rgba(0, 210, 255, 0.4);
    filter: brightness(1.08);
}
.btn-connect:active {
    transform: translateY(1px);
    box-shadow: 0 4px 15px rgba(0, 180, 255, 0.4);
}
.btn-connect:disabled {
    opacity: 0.6; cursor: not-allowed; transform: none;
    box-shadow: none; filter: grayscale(0.4);
}

/* Status Message */
.status-msg {
    margin-top: 15px; text-align: center;
    font-size: 12.5px; font-weight: 500; min-height: 18px;
    line-height: 1.4;
    transition: all .25s ease;
}
.status-msg.error { color: var(--rose); text-shadow: 0 0 12px var(--rose-glow); }
.status-msg.busy  { color: var(--amber); }
.status-msg.live  { color: var(--cyan); text-shadow: 0 0 12px var(--cyan-glow); }

/* Security Note Banner */
.security-note {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 22px; padding: 12px 14px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 10px;
    font-size: 11.5px; color: #a7f3d0;
    font-weight: 500;
}
.security-note .icon {
    color: var(--emerald);
    font-size: 1.15em;
    filter: drop-shadow(0 0 6px var(--emerald-glow));
}

/* ════════════════════ SESSION TAB BAR ════════════════════ */
.session-bar {
    height: 44px;
    background: rgba(8, 12, 22, 0.92);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border-soft);
    display: flex; align-items: center;
    padding: 0 16px; gap: 9px;
    flex-shrink: 0; z-index: 25;
}

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

.session-chip {
    display: flex; align-items: stretch;
    max-width: 260px; border-radius: var(--radius-chip); overflow: hidden;
    background: rgba(18, 26, 46, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--font-mono); font-size: 12px; font-weight: 500;
    color: #94a3b8;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all .2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.session-chip:hover {
    background: rgba(28, 40, 68, 0.95);
    border-color: rgba(255, 255, 255, 0.16);
    color: #f1f5f9;
    transform: translateY(-1px);
}
.session-chip.active {
    color: #ffffff;
    border-color: rgba(0, 210, 255, 0.45);
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.16), rgba(99, 102, 241, 0.16));
    box-shadow: 0 0 15px -2px rgba(0, 210, 255, 0.25);
}

.chip-main {
    display: flex; align-items: center; gap: 8px; min-width: 0;
    padding: 5px 6px 5px 12px;
    background: none; border: none; cursor: pointer;
    font: inherit; color: inherit;
}
.chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chip-proto {
    flex-shrink: 0; padding: 2px 6px; border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: #cbd5e1;
}
.session-chip.active .chip-proto {
    background: rgba(0, 210, 255, 0.25);
    color: var(--cyan);
    text-shadow: 0 0 8px var(--cyan-glow);
}

.session-dot {
    flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%;
    background: var(--emerald); box-shadow: 0 0 8px var(--emerald);
}
.session-chip:not(.active) .session-dot { opacity: 0.4; box-shadow: none; }
.session-dot.down { background: var(--rose); box-shadow: 0 0 8px var(--rose); }
.session-chip:not(.active) .session-dot.down { opacity: 1; box-shadow: 0 0 8px var(--rose); }

.chip-close {
    display: flex; align-items: center; padding: 0 9px;
    background: none; border: none; cursor: pointer;
    color: inherit; opacity: 0.45; font-size: 13px;
    transition: all .2s ease;
}
.chip-close:hover {
    opacity: 1; color: #ffffff;
    background: rgba(255, 56, 92, 0.35);
}

.chip-main:focus-visible, .chip-close:focus-visible { outline-offset: -2px; }

/* + New Tab button in session bar */
.btn-tab-add {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: var(--radius-chip);
    background: rgba(18, 26, 46, 0.7);
    border: 1px dashed rgba(255, 255, 255, 0.16);
    color: var(--text-dim); font-size: 11.5px; font-weight: 600;
    cursor: pointer; transition: all .2s ease;
}
.btn-tab-add:hover {
    background: rgba(28, 40, 68, 0.95);
    color: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.2);
}
.btn-tab-add.active {
    background: rgba(0, 210, 255, 0.14);
    border-color: var(--cyan);
    color: var(--cyan);
}
.btn-tab-add:disabled { opacity: 0.35; cursor: default; border-style: solid; }

.toolbar-spacer { flex: 1; }

.btn-tool {
    padding: 5px 12px; border-radius: var(--radius-chip);
    background: rgba(18, 26, 46, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8; font-size: 11.5px; font-weight: 600;
    display: flex; align-items: center; gap: 6px; cursor: pointer;
    transition: all .2s ease;
}
.btn-tool:hover {
    background: #1e2b48;
    color: #ffffff;
    transform: translateY(-1px);
}
.btn-tool:disabled { opacity: 0.35; cursor: default; transform: none; }
.btn-tool:disabled:hover { background: rgba(18, 26, 46, 0.85); color: #94a3b8; }

#btn-reconnect { color: var(--cyan); border-color: rgba(0, 210, 255, 0.25); }
#btn-reconnect:hover:not(:disabled) {
    background: rgba(0, 210, 255, 0.16);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
}
#btn-reconnect:disabled { color: var(--cyan); }
#btn-reconnect:disabled .icon { animation: tool-spin .8s linear infinite; }
@keyframes tool-spin { to { transform: rotate(360deg); } }

.btn-disconnect { color: var(--rose); border-color: rgba(255, 56, 92, 0.25); }
.btn-disconnect:hover {
    background: rgba(255, 56, 92, 0.16);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(255, 56, 92, 0.25);
}

/* ════════════════════ DESKTOP VIEWPORT ════════════════════ */
.desktop-viewport {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    background: #060913; z-index: 15;
    margin: 0; padding: 0;
}
.session-frames { width: 100%; height: 100%; position: relative; margin: 0; padding: 0; }
.session-frame {
    position: absolute; inset: 0;
    width: 100%; height: 100%; border: none; background: #060913;
    visibility: hidden; margin: 0; padding: 0;
}
.session-frame.visible { visibility: visible; }

/* ════════════════════ FULLSCREEN IMMERSION (EDGE-TO-EDGE) ════════════════════ */
:fullscreen .app-navbar,
:fullscreen .app-footer,
body.is-fullscreen .app-navbar,
body.is-fullscreen .app-footer {
    display: none !important;
}

:fullscreen .app-wrapper,
body.is-fullscreen .app-wrapper {
    height: 100vh !important;
    width: 100vw !important;
    max-height: 100vh !important;
    max-width: 100vw !important;
}

:fullscreen .main-content,
body.is-fullscreen .main-content {
    height: 100vh !important;
    width: 100vw !important;
    max-height: 100vh !important;
    max-width: 100vw !important;
    padding: 0 !important;
    margin: 0 !important;
}

:fullscreen .desktop-viewport,
body.is-fullscreen .desktop-viewport {
    height: 100vh !important;
    width: 100vw !important;
    inset: 0 !important;
}

:fullscreen .session-frame,
body.is-fullscreen .session-frame {
    height: 100vh !important;
    width: 100vw !important;
}

/* In fullscreen, session bar floats at the top edge and auto-hides */
:fullscreen .session-bar,
body.is-fullscreen .session-bar {
    position: fixed !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-38px) !important;
    border-radius: 0 0 12px 12px !important;
    border: 1px solid var(--border-bright) !important;
    border-top: none !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85) !important;
    opacity: 0.15 !important;
    transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity .25s ease !important;
    z-index: 9999 !important;
}

:fullscreen .session-bar:hover,
body.is-fullscreen .session-bar:hover {
    transform: translateX(-50%) translateY(0) !important;
    opacity: 1 !important;
}

/* ════════════════════ FOOTER ════════════════════ */
.app-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 30px;
    background: rgba(6, 9, 18, 0.80);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--border-soft);
    font-size: 11.5px; color: var(--text-dim); flex-shrink: 0;
}
.footer-brand { color: var(--text-muted); font-weight: 500; }

.hidden { display: none !important; }

/* ════════════════════ FOCUS STYLES ════════════════════ */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.ssh-input:focus-visible { outline: none; }

/* ════════════════════ RESPONSIVE ════════════════════ */
@media (max-width: 640px) {
    .form-panel { padding: 26px 20px 20px; margin: 12px; }
    .form-grid-2 { grid-template-columns: 1fr 85px; gap: 10px; }
    .app-navbar { padding: 10px 16px; }
    .card-header-title { font-size: 18px; }
    .footer-brand { display: none; }

    .session-bar { padding: 0 10px; gap: 6px; }
    .btn-tool { padding: 5px 8px; }
    .session-chip { max-width: 140px; font-size: 11px; }
    .chip-main { padding: 4px 2px 4px 8px; gap: 5px; }
    .chip-close { padding: 0 7px; }
    .chip-proto { font-size: 8px; padding: 1px 4px; }
    #btn-reconnect, #btn-fullscreen-session, #btn-disconnect, #btn-add-session { font-size: 0; gap: 0; }
    #btn-reconnect .icon, #btn-fullscreen-session .icon,
    #btn-disconnect .icon, #btn-add-session .icon { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    #particle-canvas { display: none; }
}
