/* Security.Run workspace — the same blue, white and navy as the gallery. */
body:has(#session-view:not([hidden])) main { max-width: 1600px; }
.session-header { margin: 25px 0 20px; }
.session-header h1 { font-size: 25px; letter-spacing: -.8px; margin: 8px 0 3px; }
.back-link { color: var(--muted); font-size: 12px; }
.session-reference { font: 9px var(--mono); color: var(--muted); margin: 0; }
.workspace { border: 1px solid #cedbed; border-radius: 12px; overflow: hidden; box-shadow: 0 16px 55px #1437630c; background: #fff; }
.workspace-toolbar { min-height: 53px; padding: 8px 15px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); background: #fff; }
.connection-indicator { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; font-weight: 600; }
#connection-dot { width: 7px; height: 7px; border-radius: 100%; background: #90a4c3; box-shadow: 0 0 0 4px #edf2f9; }
#connection-dot.connected { background: #168267; box-shadow: 0 0 0 4px #e5f6f0; }
#session-status { margin: 0; font-size: 11px; color: var(--muted); }
.workspace-tools { margin-left: auto; display: flex; gap: 5px; }
.workspace-tools button { padding: 6px 10px; border: 1px solid transparent; border-radius: 6px; font-size: 13px; white-space: nowrap; }
.workspace-tools button:hover, .workspace-tools button[aria-expanded=true] { background: var(--pale); color: var(--blue); border-color: #d6e3ff; }
#fullscreen-button { font-size: 22px; padding: 0 10px; }
.workspace-body { display: flex; height: max(520px, calc(100dvh - 280px)); min-height: 0; position: relative; }
.remote-stage { position: relative; flex: 1; min-width: 0; overflow: hidden; background: #0b1322; display: flex; align-items: center; justify-content: center; }
#remote-display { flex: none; outline: none; line-height: 0; touch-action: none; }
#remote-display:focus-visible { box-shadow: inset 0 0 0 2px #729ffc; }
.remote-keyboard { position: absolute; bottom: 0; left: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; resize: none; pointer-events: none; }
.connection-cover { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 70% 20%, #e8f0ff 0, transparent 65%), #fbfcff; z-index: 2; padding: 24px; overflow: auto; }
.connection-cover::before { content: ''; position: absolute; inset: 0; opacity: .32; background-image: radial-gradient(#a9bddb .6px, transparent .6px); background-size: 22px 22px; mask-image: linear-gradient(transparent, #000); pointer-events: none; }
.connection-card { max-width: 370px; text-align: center; position: relative; padding-bottom: 24px; }
.loading-mark { margin: 0 auto 24px; width: 64px; height: 64px; display: grid; place-items: center; background: #fff; border: 1px solid #d6e3f8; border-radius: 18px; box-shadow: 0 9px 30px #1452cc14; animation: workspace-pulse 2.5s ease-in-out infinite; }
.loading-mark svg { width: 32px; fill: none; stroke: var(--blue); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.connection-card .eyebrow { font-size: 9px; margin-bottom: 16px; }
.connection-card h2 { font-size: 28px; line-height: 1.2; margin: 0 0 16px; letter-spacing: -.8px; }
.connection-card > p:not(.eyebrow) { font-size: 13px; color: var(--muted); margin: 0 0 24px; line-height: 1.7; }
#loading-steps { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 11px; width: max-content; text-align: left; font-size: 11px; color: #73849c; }
#loading-steps li::before { content: ''; display: inline-block; width: 6px; height: 6px; border: 1px solid #b1bed2; border-radius: 50%; margin-right: 11px; vertical-align: 1px; }
#loading-steps li.current { color: var(--blue); font-weight: 600; }
#loading-steps li.current::before { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 3px #e0eaff; }
#loading-steps li.done { color: #367c70; }
#loading-steps li.done::before { background: #367c70; border-color: #367c70; }
.loading-signature { position: absolute; bottom: 19px; font-size: 12px; font-weight: 650; letter-spacing: -.3px; color: #8091aa; }
.loading-signature span { color: var(--blue); }
#reconnect-button { margin-top: 22px; }
.workspace-panel { width: 300px; flex: 0 0 300px; padding: 20px; border-left: 1px solid var(--line); overflow-y: auto; background: #fff; z-index: 4; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; }
.panel-heading h2 { font-size: 19px; margin: 0; letter-spacing: -.5px; }
.panel-heading button { font-size: 24px; }
.workspace-panel p, .workspace-panel label { font-size: 12px; color: var(--muted); line-height: 1.7; }
.workspace-panel .file-hint { font-size: 10px; }
.workspace-panel .primary { font-size: 12px; padding: 10px; }
.file-actions { display: flex; gap: 10px; }
.folder-bar { display: flex; align-items: center; gap: 8px; margin: 20px 0 8px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
#folder-path { font: 10px var(--mono); overflow-wrap: anywhere; }
#file-list { display: grid; gap: 2px; }
.file-entry { width: 100%; display: flex; gap: 10px; text-align: left; align-items: center; padding: 9px 3px; border-bottom: 1px solid #f0f3f8; font-size: 12px; overflow-wrap: anywhere; }
.file-entry span { min-width: 0; flex: 1; }
.file-entry small { font-size: 10px; color: var(--blue); }
.file-entry:hover { color: var(--blue); }
.transfer { margin-top: 14px; font-size: 10px; overflow-wrap: anywhere; border-top: 1px solid var(--line); padding-top: 10px; }
.transfer progress { width: 100%; accent-color: var(--blue); height: 4px; display: block; margin-top: 7px; }
.transfer a { display: block; color: var(--blue); margin-top: 5px; text-decoration: underline; }
#clipboard-text { display: block; width: 100%; resize: vertical; margin: 8px 0 12px; border: 1px solid #cedbed; border-radius: 6px; padding: 10px; color: var(--ink); font: 12px/1.6 var(--mono); }
.panel-secondary { display: block; width: 100%; padding: 9px; font-size: 12px; color: var(--blue); margin-top: 5px; }
.workspace-statusbar { display: flex; gap: 10px; justify-content: space-between; padding: 7px 15px; font-size: 10px; color: var(--muted); border-top: 1px solid var(--line); background: #fff; min-height: 30px; }
#display-size { white-space: nowrap; font: 9px/1.8 var(--mono); }
#drop-cover { position: absolute; inset: 12px; border: 2px dashed var(--blue); border-radius: 9px; background: #eef4fff2; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--blue); font-weight: 600; }
#drop-cover span { font-size: 12px; font-weight: 400; margin-top: 8px; }
body:has(.workspace.expanded) { overflow: hidden; }
.workspace.expanded { position: fixed; inset: 0; z-index: 100; border: 0; border-radius: 0; display: flex; flex-direction: column; }
.workspace.expanded .workspace-body { flex: 1; height: auto; }
@keyframes workspace-pulse { 50% { box-shadow: 0 9px 38px #1452cc28; transform: translateY(-3px); } }
@media(max-width: 850px) { .workspace-panel { position: absolute; inset: 0 0 0 auto; box-shadow: -15px 0 35px #0c152730; width: min(320px, 95%); } #session-status { display: none; } .session-header { flex-direction: row; align-items: center; } .session-header .actions { flex-direction: column; gap: 5px; } .actions button { padding: 6px 9px; font-size: 10px; } }
@media(max-width: 520px) { .workspace-toolbar { padding: 8px 10px; gap: 7px; } .workspace-tools button { padding: 5px 7px; font-size: 11px; } .workspace-body { height: 65dvh; min-height: 450px; } .connection-card h2 { font-size: 24px; } .session-reference { font-size: 7px; } .session-header h1 { font-size: 21px; } }
@media(prefers-reduced-motion: reduce) { .loading-mark { animation: none; } }

.idle-controls,.idle-warning { padding:10px 18px; display:flex; align-items:center; gap:16px; flex-wrap:wrap; border-bottom:1px solid #d8e2f3; font-size:12px; }
.idle-controls span { color:#526786; }
.idle-controls label { display:flex; align-items:center; gap:8px; }
.idle-warning { background:#fff5dd; color:#654600; }
.idle-controls[hidden],.idle-warning[hidden] { display:none; }
