/* Configuration is a separate, nonmodal workspace: the emergency stop stays reachable. */
.device-config-workspace[hidden],.device-config-workspace [hidden]{display:none!important}
.device-config-open{border:1px solid #b8c9eb;background:#eef4ff;color:#1d4090;border-radius:8px;padding:8px 12px;font:inherit;font-weight:600;cursor:pointer;white-space:nowrap}
.device-config-workspace{position:fixed;top:90px;right:20px;bottom:42px;width:min(880px,calc(100vw - 40px));z-index:1000;display:flex;flex-direction:column;background:#f8fbff;color:#172033;border:1px solid #cedcf0;border-radius:14px;box-shadow:0 18px 60px #14264c35;overflow:hidden}
.device-config-header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 20px;background:#fff;border-bottom:1px solid #dfe7f2;flex-shrink:0}
.device-config-header h2{font-size:19px;margin:0 0 4px}.device-config-header p{margin:0;font-size:13px;overflow-wrap:anywhere}
.device-config-header button{padding:8px 12px;border:1px solid #ccd7e8;border-radius:8px;background:#fff;color:#24395f;cursor:pointer;white-space:nowrap}
.device-config-note{margin:12px 20px;font-size:12px;line-height:1.6;color:#52657e}
.device-config-groups{display:flex;gap:8px;padding:0 20px 12px;border-bottom:1px solid #dfe7f2;flex-shrink:0}
.device-config-groups button{flex:1;min-width:0;min-height:40px;display:flex;align-items:center;justify-content:center;white-space:nowrap;padding:8px;border:1px solid #cfdaeb;border-radius:8px;background:#fff;color:#415677;cursor:pointer;font:inherit}
.device-config-groups button[aria-selected="true"]{background:#e6efff;color:#1746aa;border-color:#9db9ef;font-weight:700}
.device-config-content{overflow:auto;flex:1;min-height:0;padding:16px;overscroll-behavior:contain}
.device-config-section{background:#fff;border:1px solid #dce5f2;border-radius:10px;margin-bottom:14px;overflow:hidden}
.device-config-section>summary{padding:14px 16px;font-weight:650;cursor:pointer;color:#243d64}
.device-config-workspace [data-config-host]{min-width:0;overflow-wrap:anywhere}
.device-config-workspace .oneclick-view{height:auto;min-height:0;overflow:visible;display:block}
.device-config-workspace .oneclick-carriers,.device-config-workspace .oneclick-console{max-height:none;overflow:visible;padding:16px}
.device-config-workspace .resource-management-view{height:auto;min-height:200px;padding:16px}
.device-config-workspace #modulePanel,.device-config-workspace #samplePanel{height:auto!important;overflow:visible!important;padding:18px!important}
.device-config-workspace .preparation-panel{height:auto;overflow:visible}
.device-config-workspace button:focus-visible{outline:3px solid #76a1f5;outline-offset:2px}
html.cyberclaw-light .task-panel .header-model-picker{display:flex;align-items:center;gap:8px;margin-top:8px;min-width:0;width:100%}
.task-panel .header-model-picker label{font-size:12px;white-space:nowrap}.task-panel #modelSelect{flex:1;min-width:0;width:100%;padding:6px;border:1px solid #cad7e8;border-radius:6px;background:#fff;color:#172033}
@media(max-width:1366px){.device-config-workspace{top:82px;right:8px;bottom:12px;width:calc(100vw - 16px)}}
@media(max-width:700px){.device-config-workspace{top:120px;bottom:8px;border-radius:10px}.device-config-header{padding:12px}.device-config-groups{padding:0 10px 10px;gap:5px}.device-config-note{margin:10px 12px}.device-config-content{padding:10px}.video-actions{gap:6px!important}.device-config-open{padding:7px 8px;font-size:12px}}

.task-panel #modelSelect{height:32px!important;min-height:32px!important;line-height:normal!important;box-sizing:border-box}.task-panel .header-model-picker{min-height:36px;flex-shrink:0}

/* Phase 2: current-device status and explicit viewing/task context. */
html.cyberclaw-light .left-rail,html.cyberclaw-light .left-rail.answer-final-mode{grid-template-rows:clamp(205px,24vh,245px) auto minmax(0,1fr)}
.context-task-summary{padding:9px 12px;border:1px solid #dbe5f4;border-radius:10px;background:#f5f9ff;color:#294369;font-size:12px;line-height:1.5;min-width:0;overflow-wrap:anywhere}
.context-task-summary b,.context-task-summary span{display:block}.context-task-summary span{color:#63768f;margin-top:3px}.context-task-summary[data-mismatch="true"]{border-color:#e8bb6b;background:#fff8ec}
.context-video-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 12px;color:#526780;background:#f5f9ff;border-bottom:1px solid #e0e8f5;font-size:12px;min-height:32px;flex-shrink:0}
.context-video-banner[data-mismatch="true"]{background:#fff7e8;color:#79521a}.context-video-banner button{border:1px solid #adc2e6;border-radius:6px;padding:4px 7px;background:white;color:#285498;cursor:pointer;white-space:nowrap}.context-video-banner button[hidden]{display:none!important}
html.cyberclaw-light .right{grid-template-rows:repeat(3,minmax(0,1fr));align-content:stretch}
.context-overview{min-height:0!important}.context-overview .title{padding:9px 12px!important;min-height:34px!important}.context-overview .body{padding:8px 12px!important}.context-overview strong{font-size:13px}.context-state-grid{display:grid;grid-template-columns:76px minmax(0,1fr);gap:3px 8px;font-size:11px;line-height:1.5;margin:5px 0}.context-state-grid span{color:#6d7e96}.context-state-grid b{font-weight:500;overflow-wrap:anywhere}.context-overview small{font-size:10px;color:#7d8b9d;display:block;line-height:1.5}
#connectionDevice[hidden]{display:none!important}#connectionOtherDevice{border:1px solid #cfdaeb;background:white;color:#315480;border-radius:6px;font:inherit;padding:5px;cursor:pointer}

.context-device-directory>summary{padding:12px;color:#526780;font-size:12px;cursor:pointer}.context-device-directory{width:100%;min-width:0}

/* Three visible panels fill the right rail after overview consolidation. */
html.cyberclaw-light .right > .agent-space-module{min-height:0;align-self:stretch;height:auto!important;max-height:none}
html.cyberclaw-light .right .agent-space-body{display:flex;flex-direction:column;min-height:0;overflow:hidden}
html.cyberclaw-light .right .agent-pane.active:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0;overflow:auto}
html.cyberclaw-light .right .context-device-directory{flex:0 0 auto}
html.cyberclaw-light .right #entityTable{flex:1;min-height:80px}

/* Align view tabs and configuration/fullscreen controls on one baseline. */
html.cyberclaw-light .video-panel .video-title{display:flex!important;align-items:center!important;gap:8px!important;min-height:52px!important;box-sizing:border-box}
html.cyberclaw-light .video-panel .video-tabbar{align-self:center!important;height:40px!important;min-height:40px!important;box-sizing:border-box;padding:3px!important;align-items:stretch!important}
html.cyberclaw-light .video-panel .video-tab{height:32px!important;min-height:32px!important;box-sizing:border-box;display:flex!important;align-items:center!important;justify-content:center!important;padding-top:0!important;padding-bottom:0!important}
html.cyberclaw-light .video-panel .video-actions{height:40px!important;align-self:center!important;align-items:center!important;padding:0!important;margin-top:0!important;margin-bottom:0!important}
html.cyberclaw-light #deviceConfigOpen{height:40px!important;min-height:40px!important;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;padding:0 12px!important;line-height:1.2!important;border-radius:8px;border:1px solid var(--ui-line,#b8c9eb)}
html.cyberclaw-light #fullscreenBtn{height:40px!important;display:inline-flex;align-items:center}
html.cyberclaw-light #fullscreenBtn::part(base){height:40px!important;min-height:40px!important;box-sizing:border-box;padding:0 10px!important;border-radius:8px!important;border:1px solid var(--ui-line,#b8c9eb)!important}

/* Compact testfield dialog: the select is scoped here, leaving other forms unchanged. */
.device-config-workspace.testfield-panel{top:var(--testfield-top,90px);bottom:auto;width:min(600px,calc(100vw - 16px));max-height:calc(100dvh - var(--testfield-top,90px) - 8px)}
.testfield-panel .testfield-content{flex:0 1 auto;overflow:auto;padding:16px 20px}
.testfield-panel .testfield-label{display:block;font-weight:700;font-size:13px;margin-bottom:8px}
html.cyberclaw-light .testfield-panel .testfield-select,.testfield-panel select.testfield-select{display:block;box-sizing:border-box;width:100%;height:44px;min-height:44px;margin:0;padding:0 38px 0 12px;line-height:normal;font-size:14px;color:#172b49;background-color:#fff;border:1px solid #c9d8ee;border-radius:8px}
.testfield-panel .testfield-select option{color:#172b49;background:#fff}
.testfield-panel .testfield-notice,.testfield-panel .testfield-hint{color:#596d88;font-size:12px;line-height:1.55;margin:10px 0}
.testfield-panel h3{font-size:15px;margin:16px 0 4px}.testfield-carriers{display:grid;gap:8px}.testfield-carrier{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 12px;border:1px solid #dce5f2;border-radius:9px;background:#fff}.testfield-carrier-label{display:flex;align-items:center;gap:9px;min-width:0}.testfield-carrier-label span{min-width:0}.testfield-carrier-label strong,.testfield-carrier-label small{display:block}.testfield-carrier-label small{color:#74869f;font-size:11px;overflow-wrap:anywhere}.testfield-carrier-actions{display:flex;gap:6px;flex-wrap:wrap}.testfield-carrier-actions button:disabled{opacity:.48;cursor:not-allowed}.context-video-banner[hidden]{display:none!important}
@media(max-width:700px){.device-config-workspace.testfield-panel{top:var(--testfield-top,120px);bottom:auto}.testfield-panel .testfield-content{padding:12px}}
