:root{--surface: #ffffff;--surface-soft: #f6f8fb;--surface-raised: #fbfcfe;--line: #dce3ec;--line-strong: #c8d2df;--muted: #667085;--muted-strong: #475467;--ink: #101828;--ink-soft: #344054;--open: #16845b;--open-soft: #e8f7f0;--close: #d03b3b;--close-soft: #fff0f0;--stop: #b56a06;--stop-soft: #fff5df;--focus: #2563eb;--focus-soft: rgba(37, 99, 235, .18);font-family:Inter,Microsoft YaHei,PingFang SC,Noto Sans CJK SC,Arial,sans-serif;color:var(--ink);background:#eef2f6;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}html{min-width:320px;background:#eef2f6}body{margin:0;min-width:320px;min-height:100vh;background:radial-gradient(circle at 12% -10%,rgba(37,99,235,.07),transparent 28rem),#eef2f6}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.54}button:focus-visible,input:focus-visible,a:focus-visible,[role=dialog]:focus-visible{outline:3px solid var(--focus-soft);outline-offset:2px}.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(145deg,rgba(37,99,235,.13),transparent 42%),#e9eef5}.login-panel{width:min(430px,100%);display:grid;gap:14px;padding:34px;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:0 22px 60px #1018281a}.brand-mark{width:58px;height:58px;display:grid;place-items:center;border-radius:14px;color:var(--focus);background:#eaf1ff}.login-panel h1,.topbar h1,.section-title h2,.history-header h2,.confirm-dialog h2{margin:0;color:var(--ink)}.login-panel h1{font-size:30px;letter-spacing:-.035em}.login-panel p,.topbar p,.section-title span,.history-header p{margin:0;color:var(--muted)}label{display:grid;gap:6px;color:var(--ink-soft);font-size:14px;font-weight:750}input{width:100%;height:44px;border:1px solid var(--line-strong);border-radius:9px;padding:0 12px;color:var(--ink);background:var(--surface);outline:none;transition:border-color .15s ease,box-shadow .15s ease}input:focus{border-color:var(--focus);box-shadow:0 0 0 3px var(--focus-soft)}.primary-button,.ghost-button,.refresh-button{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:9px;font-weight:750}.primary-button{border:0;padding:0 18px;color:#fff;background:var(--focus)}.ghost-button,.refresh-button{border:1px solid var(--line-strong);padding:0 13px;color:var(--ink-soft);background:var(--surface);transition:border-color .15s ease,color .15s ease,background .15s ease}.ghost-button:hover:not(:disabled),.refresh-button:hover:not(:disabled){border-color:#9fb0c5;color:var(--ink);background:var(--surface-soft)}.console-page{width:100%;min-height:100vh;display:grid;align-content:start;gap:14px;padding:20px}.topbar{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:17px 18px 17px 20px;border:1px solid var(--line);border-radius:14px;background:#fffffff0;box-shadow:0 8px 28px #1018280e;animation:console-enter .32s ease-out both}.topbar-title{min-width:0}.topbar h1{font-size:clamp(24px,2vw,30px);line-height:1.1;letter-spacing:-.04em}.topbar p{margin-top:5px;font-size:14px}.topbar-actions{min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:10px}.connection-badge{min-height:32px;display:inline-flex;align-items:center;gap:7px;border-radius:999px;padding:0 11px;font-size:13px;font-weight:800;white-space:nowrap}.connection-badge:before{width:7px;height:7px;border-radius:50%;background:currentColor;content:""}.connection-badge.online{color:var(--open);background:var(--open-soft)}.connection-badge.checking{color:#52657a;background:#edf1f5}.connection-badge.offline{color:var(--close);background:var(--close-soft)}.signed-in-user{min-width:0;display:grid;padding:0 4px 0 10px;border-left:1px solid var(--line);line-height:1.2}.signed-in-user span{color:var(--muted);font-size:11px}.signed-in-user strong{max-width:180px;overflow:hidden;color:var(--ink-soft);font-size:14px;text-overflow:ellipsis;white-space:nowrap}.operator-workspace{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:14px;align-items:stretch;animation:console-enter .38s 50ms ease-out both}.video-section,.control-rail,.history-section{min-width:0;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:0 8px 28px #1018280b}.video-section,.history-section{overflow:hidden}.section-title{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px 14px 18px;border-bottom:1px solid var(--line)}.section-title>div{min-width:0;display:grid;gap:3px}.section-title h2{font-size:19px;letter-spacing:-.02em}.section-title span{overflow-wrap:anywhere;font-size:13px}.video-frame-wrap{position:relative;width:100%;min-height:440px;aspect-ratio:16 / 9;overflow:hidden;background:#070b12}.video-frame-wrap:after{position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid rgba(255,255,255,.05);pointer-events:none;content:""}.video-frame-wrap iframe{width:100%;height:100%;display:block;border:0}.video-placeholder{width:100%;height:100%;min-height:440px;display:grid;place-items:center;align-content:center;gap:13px;padding:24px;color:#c7d2e0;background:radial-gradient(circle at center,rgba(60,76,98,.34),transparent 42%),#090e17;font-weight:750;text-align:center}.video-footer{min-height:62px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 14px 10px 18px}.video-state-meta{min-width:0;display:grid;gap:2px}.video-state-meta span{color:var(--muted);font-size:11px}.video-state-meta strong{overflow-wrap:anywhere;color:var(--ink-soft);font-size:13px}.video-footer-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.video-backup-link{display:inline-flex;min-height:38px;align-items:center;border-radius:8px;padding:0 10px;color:var(--focus);font-size:13px;font-weight:750;text-decoration:none}.video-backup-link:hover{background:#edf3ff}.control-rail{display:grid;grid-template-rows:auto auto 1fr auto;align-content:start;gap:14px;padding:16px}.operator-block{display:grid;gap:4px;padding-bottom:13px;border-bottom:1px solid var(--line)}.operator-block span,.gate-state-block span{color:var(--muted);font-size:12px;font-weight:650}.operator-block strong{overflow-wrap:anywhere;color:var(--ink);font-size:17px}.gate-state-block{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.gate-state-block>div:first-child{min-width:0;display:grid;gap:5px}.gate-state-block strong{display:block;overflow-wrap:anywhere;color:var(--ink);font-size:19px;line-height:1.25}.channel-state{flex:none;border-radius:999px;padding:5px 8px;font-size:11px;font-weight:800;white-space:nowrap}.channel-state.online{color:var(--open);background:var(--open-soft)}.channel-state.checking{color:#52657a;background:#edf1f5}.channel-state.offline{color:var(--close);background:var(--close-soft)}.command-stack{display:grid;align-content:center;gap:10px}.command-button{min-width:0;min-height:118px;display:grid;grid-template-columns:32px 1fr;align-items:center;gap:12px;border:1px solid currentColor;border-radius:12px;padding:16px 18px;text-align:left;transition:transform .14s ease,box-shadow .14s ease,filter .14s ease}.command-button svg{width:28px;height:28px}.command-button span{font-size:22px;font-weight:850;letter-spacing:-.02em}.command-button.open{color:var(--open);background:var(--open-soft)}.command-button.stop{min-height:82px;color:var(--stop);background:var(--stop-soft)}.command-button.close{color:var(--close);background:var(--close-soft)}.command-button:hover:not(:disabled){transform:translateY(-2px);filter:saturate(1.08);box-shadow:0 10px 22px #1018281a}.command-button:active:not(:disabled){transform:translateY(0)}.rail-hint{margin:0;padding:10px 11px;border-radius:9px;color:var(--muted-strong);background:var(--surface-soft);font-size:12px;line-height:1.55}.success-message,.error,.session-notice{overflow-wrap:anywhere;border-radius:10px;padding:12px 14px;font-size:14px;font-weight:750}.success-message,.session-notice{border:1px solid #b6e3ce;color:#116845;background:var(--open-soft)}.error{border:1px solid #f2c2c2;color:#a12626;background:var(--close-soft)}.history-section{animation:console-enter .42s 90ms ease-out both}.history-header{min-height:68px;display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--line)}.history-header h2{font-size:19px;letter-spacing:-.02em}.history-header p{margin-top:4px;font-size:13px}.history-table-wrap{max-width:100%;overflow-x:auto}.history-table-wrap table{width:100%;min-width:980px;border-collapse:collapse;table-layout:fixed}.history-table-wrap th,.history-table-wrap td{padding:13px 15px;border-bottom:1px solid #e9edf3;overflow-wrap:anywhere;color:var(--ink-soft);text-align:left;vertical-align:top;font-size:13px;line-height:1.45}.history-table-wrap th{color:var(--muted);background:var(--surface-raised);font-size:12px;font-weight:800}.history-table-wrap th:nth-child(1){width:15%}.history-table-wrap th:nth-child(2){width:12%}.history-table-wrap th:nth-child(3){width:13%}.history-table-wrap th:nth-child(4){width:9%}.history-table-wrap th:nth-child(5){width:20%}.history-table-wrap th:nth-child(6){width:15%}.history-table-wrap th:nth-child(7){width:16%}.history-table-wrap tr:last-child td{border-bottom:0}.operator-cell{color:var(--ink)!important;font-weight:750}.record-state{display:inline-flex;max-width:100%;min-height:25px;align-items:center;border-radius:999px;padding:3px 9px;overflow-wrap:anywhere;font-size:11px;font-weight:800}.record-state.pending,.record-state.sent{color:#8b5307;background:var(--stop-soft)}.record-state.acked{color:var(--open);background:var(--open-soft)}.record-state.failed{color:var(--close);background:var(--close-soft)}.empty-history{padding:30px 15px!important;color:var(--muted)!important;text-align:center!important}.confirm-backdrop{position:fixed;z-index:1000;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;padding:20px;background:#090e179e;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);animation:backdrop-enter .16s ease-out both}.confirm-dialog{width:min(430px,100%);display:grid;gap:14px;border:1px solid var(--line);border-radius:16px;padding:24px;background:var(--surface);box-shadow:0 28px 80px #00000047;animation:dialog-enter .19s ease-out both}.confirm-dialog-icon{width:42px;height:42px;border-radius:12px;padding:9px}.confirm-dialog.open .confirm-dialog-icon{color:var(--open);background:var(--open-soft)}.confirm-dialog.close .confirm-dialog-icon{color:var(--close);background:var(--close-soft)}.confirm-dialog h2{font-size:25px;letter-spacing:-.035em}.confirm-dialog>p{margin:-6px 0 2px;color:var(--muted-strong);font-size:14px}.confirm-details{display:grid;gap:0;margin:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.confirm-details>div{min-width:0;display:grid;grid-template-columns:82px minmax(0,1fr);gap:12px;padding:10px 0}.confirm-details>div+div{border-top:1px solid #edf0f4}.confirm-details dt{color:var(--muted);font-size:13px}.confirm-details dd{margin:0;overflow-wrap:anywhere;color:var(--ink);font-size:13px;font-weight:750}.confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.confirm-actions button{min-height:44px;border:1px solid var(--line-strong);border-radius:9px;color:var(--ink-soft);background:var(--surface);font-weight:800}.confirm-actions button:last-child{border-color:transparent;color:#fff;background:var(--focus)}.confirm-dialog.open .confirm-actions button:last-child{background:var(--open)}.confirm-dialog.close .confirm-actions button:last-child{background:var(--close)}@keyframes console-enter{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes backdrop-enter{0%{opacity:0}to{opacity:1}}@keyframes dialog-enter{0%{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}@media(max-width:900px){.console-page{padding:14px}.topbar{align-items:flex-start}.topbar-actions{flex-wrap:wrap}.operator-workspace,.control-rail{grid-template-columns:minmax(0,1fr)}.command-stack{grid-template-columns:1fr .8fr 1fr;align-items:stretch}.command-button,.command-button.stop{min-height:96px;grid-template-columns:1fr;justify-items:center;gap:8px;padding:14px 10px;text-align:center}.command-button span{font-size:18px}}@media(max-width:620px){.console-page{gap:10px;padding:10px}.topbar{display:grid;gap:14px;padding:16px}.topbar-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;width:100%;justify-content:stretch}.connection-badge{justify-self:start}.signed-in-user{grid-column:1 / -1;grid-row:2;padding:9px 0 0;border-top:1px solid var(--line);border-left:0}.signed-in-user strong{max-width:100%}.section-title,.video-footer{align-items:flex-start}.section-title{min-height:0;padding:14px}.video-title{display:grid}.video-title .refresh-button{justify-self:start}.video-frame-wrap,.video-placeholder{min-height:220px}.video-footer{display:grid;padding:12px 14px}.video-footer-actions{width:100%;justify-content:space-between}.control-rail{padding:14px}.gate-state-block{display:grid}.channel-state{justify-self:start}.command-stack{grid-template-columns:1fr}.command-button,.command-button.stop{min-height:78px;grid-template-columns:30px 1fr;justify-items:start;text-align:left}.history-header{padding:14px}.confirm-backdrop{padding:12px}.confirm-dialog{padding:20px}}@media(max-width:360px){.login-page{padding:12px}.login-panel{padding:24px 20px}.video-footer-actions{display:grid;justify-content:stretch}.video-backup-link,.video-footer-actions .refresh-button{justify-content:center}.confirm-actions{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
