:root{font:16px/1.55 "Segoe UI","Microsoft YaHei",system-ui,sans-serif;color:#f3f2f1;background:#151619;--surface:#1e2024;--line:#32353b;--muted:#aaadb7;--accent:#ff875d;--green:#79d5af;--mono:"Cascadia Mono",Consolas,monospace}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
button,input,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:default;opacity:.46}
button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.shell{width:min(1640px,calc(100% - clamp(24px,4vw,72px)));margin-inline:auto}
.top{height:45px;border-bottom:1px solid #2a2c30;background:#191a1d}
.header,.brand{display:flex;align-items:center}
.header{height:100%;justify-content:space-between}
.header-actions{display:flex;align-items:center;gap:10px}
.theme-toggle{white-space:nowrap;flex:none}
.brand{gap:8px}
.brand h1{font-size:.99rem;letter-spacing:.04em}
.nav-link{border-left:1px solid var(--line);margin-left:4px;padding-left:12px;color:#d4d6db;font-size:.82rem;text-decoration:none}
.nav-link:hover,.nav-link[aria-current]{color:var(--accent)}
.fleet-page{padding-block:14px;--fleet-tint:color-mix(in srgb,var(--accent) 8%,var(--surface))}
.fleet-head{padding:12px 14px;gap:12px}
.fleet-overview{display:flex;align-items:center;gap:8px 16px;flex-wrap:wrap;min-width:0}
#fleet-status{display:flex;align-items:center;flex-wrap:wrap;gap:5px 7px;color:var(--muted);font-size:.8rem}
.fleet-metric{display:inline-flex;align-items:center;gap:2px;padding:3px 8px;border-radius:6px;background:var(--fleet-tint);white-space:nowrap}
.fleet-metric strong{font-variant-numeric:tabular-nums;color:inherit}
.fleet-metric.ready{color:var(--green)}
.fleet-metric.running,.fleet-metric.rented{color:var(--accent)}
.fleet-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr));gap:10px;padding:0 14px 14px}
.fleet-list:empty{display:none}
.fleet-device{min-width:0;background:#191b1f;border:1px solid var(--line);border-radius:9px}
.fleet-device h3{font-size:.93rem;overflow-wrap:anywhere;margin:0}
.fleet-body{padding:0 12px 11px;color:#d4d6db;font-size:.82rem;overflow-wrap:anywhere}
.fleet-detail{min-height:1.55em;color:var(--muted)}
.fleet-open{display:inline-flex;align-items:center;gap:7px;margin-top:8px;text-decoration:none}
.fleet-actions{display:flex;gap:6px;flex-wrap:wrap}
.fleet-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:0 14px 12px}
.fleet-toolbar :is(input,select){min-height:34px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:inherit;padding:4px 8px;font-size:.85rem;max-width:100%}
.fleet-toolbar select{min-width:106px;width:max-content;max-width:min(200px,100%)}
.fleet-toolbar input{flex:1 1 240px;max-width:340px;min-width:0}
.fleet-view{display:flex;flex-wrap:wrap;gap:5px;margin-left:auto}
.fleet-view button[aria-pressed=true]{border-color:var(--accent);color:var(--accent);background:var(--fleet-tint)}
.fleet-list.table-mode{display:block;padding:0}
.fleet-list.table-mode:empty{display:none}
.fleet-list.room-mode{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.fleet-list.room-mode:empty{display:none}
.fleet-room-group{min-width:0;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.fleet-room-heading{display:flex;align-items:center;justify-content:space-between;gap:6px 16px;flex-wrap:wrap;padding:8px 10px;background:var(--fleet-tint)}
.fleet-room-heading h3{margin:0;font-size:.95rem;overflow-wrap:anywhere}
.fleet-room-heading span{color:var(--muted);font-size:.82rem}
.fleet-room-screens{display:grid;grid-auto-flow:column;grid-auto-columns:clamp(226px,29%,310px);align-items:start;gap:10px;padding:10px;overflow-x:auto}
.fleet-room-screens.is-idle{grid-auto-flow:row;grid-template-columns:repeat(auto-fill,minmax(min(100%,226px),1fr))}
.fleet-room-device{min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--surface);overflow:hidden}
.fleet-room-device.is-owner{border-color:var(--accent)}
.fleet-room-device-head,.fleet-room-device-foot{display:flex;justify-content:space-between;align-items:center;gap:6px;flex-wrap:wrap;padding:8px}
.fleet-room-device-foot .fleet-open{margin:0}
.fleet-room-device-foot .fleet-chip{white-space:normal}
.fleet-room-screen{position:relative;display:grid;place-items:center;aspect-ratio:9/19;width:100%;max-height:450px;background:#101823;color:#bdc8d5;font-size:.82rem;overflow:hidden}
.fleet-room-screen img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.fleet-table-scroll{overflow:auto}
.fleet-table{width:100%;table-layout:fixed;border-collapse:collapse;text-align:left;font-size:.85rem}
.fleet-table :is(th,td){padding:6px 9px;border-top:1px solid var(--line);vertical-align:middle;overflow-wrap:anywhere}
.fleet-table th{position:relative;background:#191b21;color:var(--muted);font-weight:650;white-space:nowrap}
.fleet-table .fleet-select-col{width:40px}
.fleet-table .fleet-check{padding-inline:0}
.fleet-table tr:hover td{background:var(--fleet-tint)}
.fleet-page .fleet-table td.fleet-muted{color:var(--muted)}
.fleet-resize{position:absolute;inset:0 0 0 auto;min-height:0;width:9px;padding:0;border:0;border-radius:0;background:transparent;cursor:col-resize;touch-action:none}
.fleet-resize::after{content:"";position:absolute;inset:24% 3px;width:1px;background:var(--line)}
.fleet-resize:is(:hover,:focus-visible)::after{width:2px;background:var(--accent)}
.fleet-table .fleet-open{margin:0}
.fleet-identity{font-weight:650}
.fleet-identity small{display:block;font-size:.76rem;font-weight:400;color:var(--muted)}
.fleet-empty{padding:20px 14px;text-align:center;color:var(--muted);font-size:.875rem;border-top:1px solid var(--line)}
.portal-page{--surface:#fff;--line:#e0e6ef;--muted:#526178;--accent:#215bd7;color-scheme:light;color:#17253d;background:#f3f6fb;min-height:100dvh}
.portal-top{display:flex;align-items:center;gap:16px;min-height:58px;padding:8px 24px;background:#fff;border-bottom:1px solid var(--line)}
.portal-brand{display:inline-flex;gap:9px;align-items:center;color:#142449;text-decoration:none;white-space:nowrap}
.portal-brand .mark{background:var(--accent);width:27px;height:27px}
.portal-brand .mark i{background:white}
.portal-channel{border-left:1px solid var(--line);padding-left:16px;color:var(--muted);font-size:.875rem;white-space:nowrap}
.portal-top-actions{margin-left:auto;display:flex;align-items:center;gap:12px;font-size:.875rem;min-width:0}
.portal-top-actions nav{display:flex;gap:13px;flex-wrap:wrap}
.portal-top-actions a{color:var(--muted);text-decoration:none}
.portal-top-actions a[aria-current]{color:var(--accent);font-weight:700}
#portal-workspace{display:grid;grid-template-columns:200px minmax(0,1fr);min-height:calc(100dvh - 58px)}
.portal-sidebar{background:#fff;border-right:1px solid var(--line);padding:16px 10px}
.portal-sidebar nav{display:flex;flex-direction:column;gap:5px}
.portal-sidebar a{display:block;padding:9px 13px;border-radius:6px;color:#43536c;text-decoration:none;font-size:.9rem;white-space:nowrap}
.portal-sidebar a:hover,.portal-sidebar a[aria-current]{background:#eaf1ff;color:#174fbf}
.portal-sidebar a[aria-current]{font-weight:700}
#portal-main{padding:20px clamp(14px,2.3vw,34px);min-width:0}
.portal-section{max-width:1540px;margin-inline:auto}
.portal-device-frame{display:block;width:100%;height:calc(100dvh - 145px);min-height:400px;border:0;background:inherit}
.portal-page .portal-top{position:sticky;top:0;z-index:3}
.portal-sidebar a[aria-current]{box-shadow:inset 3px 0 0 var(--accent)}
.portal-section:has(.portal-toolbar){background:var(--surface);border:1px solid var(--line);border-radius:10px}
.portal-section:has(.portal-toolbar) .portal-heading{padding:14px 16px 12px;margin-bottom:0}
.portal-overview{display:flex;gap:0;border-block:1px solid var(--line);padding:8px 16px;flex-wrap:wrap}
.portal-overview div{display:flex;align-items:center;gap:7px;padding:1px 14px;border-right:1px solid var(--line);white-space:nowrap}
.portal-overview div:first-child{padding-left:0}.portal-overview div:last-child{border-right:0}
.portal-overview strong{font-size:1rem;font-variant-numeric:tabular-nums}
.portal-overview span{color:var(--muted);font-size:.82rem}
.portal-section .portal-toolbar{justify-content:flex-start;align-items:flex-end;border:0;border-radius:0;padding:10px 16px;flex-wrap:wrap}
.portal-section .portal-toolbar>button{margin-left:0}
.portal-section .portal-toolbar>button:last-child{margin-left:auto}
.portal-section .portal-search{flex:1 1 185px;max-width:272px}
.portal-section .portal-table-filter select{max-width:150px}
.portal-section .portal-table-scroll{border-inline:0}
.portal-section .portal-footer{border:0}
.portal-section .portal-table td{padding-block:7px}
.portal-row-actions,.portal-cell-action{display:flex;align-items:center;gap:5px;min-width:0}
.portal-cell-action>span{min-width:0;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.portal-cell-action>button,.portal-row-actions>button{min-height:29px;padding-inline:7px;font-size:.79rem}
.portal-check-result{padding:8px 10px;background:var(--surface);border:1px solid var(--line);border-radius:6px;font-size:.875rem}
.portal-check-history{display:grid;gap:5px;font-size:.82rem;color:var(--muted)}
.portal-check-history:empty{display:none}
#portal-dialog[data-layout=wide]{width:min(calc(100% - 24px),580px)}
#portal-dialog[data-layout=wide] #dialog-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
#portal-dialog[data-layout=wide] :is(.portal-choices,.field:has([name=note])){grid-column:1/-1}
.portal-page #dialog-form>button{justify-self:end;min-width:72px}
@media(max-width:720px){.portal-overview div{padding-inline:8px}}
@media(max-width:440px){#portal-dialog[data-layout=wide] #dialog-fields{grid-template-columns:minmax(0,1fr)}}
[data-embedded] body>.top{display:none}
[data-embedded] main.shell{width:100%;max-width:none}
[data-embedded] :is(.workspace,.fleet-page){padding-top:0}
.portal-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.portal-heading h2{font-size:1.35rem;line-height:1.35}
.portal-page :is(.subtle,.primary){min-height:34px;padding:4px 12px;border-radius:6px;white-space:nowrap}
.portal-page .subtle{color:#334664;background:#fff;border-color:#cdd8e8}
.portal-page .subtle:not(:disabled):hover{color:#194da9;background:#eff5ff;border-color:#9bb7e7}
.portal-page .primary{color:#fff;background:var(--accent);border-color:var(--accent)}
.portal-page .primary:not(:disabled):hover{background:#144cbe}
.portal-toolbar,.portal-footer{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;background:#fff;border:1px solid var(--line)}
.portal-toolbar{border-radius:8px 8px 0 0;border-bottom:0}
.portal-table-filter{display:flex;align-items:center;gap:7px}
.portal-search{width:min(100%,290px);min-width:0;min-height:34px;padding:4px 9px;border:1px solid #cdd8e8;border-radius:6px;color:inherit;background:#fff;font-size:.875rem}
.portal-table-scroll{overflow:auto;border:1px solid var(--line);background:#fff}
.portal-table{table-layout:fixed;width:100%;border-collapse:separate;border-spacing:0;text-align:left;font-size:.875rem}
.portal-table th,.portal-table td{padding:9px 12px;border-bottom:1px solid var(--line);vertical-align:middle;overflow-wrap:anywhere}
.portal-table th{background:#f7f9fd;position:relative;color:#40516d;font-weight:650;padding-right:18px}
.portal-table td:first-child{font-weight:600}
.portal-table tbody tr:last-child td{border-bottom:none}
.portal-table tbody tr:hover{background:#f9fbff}
.portal-resize{position:absolute;top:0;right:0;bottom:0;width:12px;border:0;background:none;cursor:col-resize;touch-action:none;padding:0}
.portal-resize::after{content:"";position:absolute;right:5px;top:27%;height:46%;border-right:1px solid #cbd7e8}
.portal-resize:hover::after,.portal-resize:focus-visible::after{border-color:var(--accent);border-width:2px}
.portal-table .portal-empty{text-align:center;padding:28px 12px;color:var(--muted);font-weight:400}
.portal-footer{border-top:0;border-radius:0 0 8px 8px;color:var(--muted);font-size:.875rem;flex-wrap:wrap}
.portal-pages{display:flex;align-items:center;gap:8px;margin-left:auto;flex-wrap:wrap}
.portal-pages .field{display:flex;align-items:center;gap:6px}
.portal-badge{display:inline-block;max-width:100%;background:#eef2f7;color:#53617a;border-radius:5px;padding:2px 7px;line-height:1.55;font-size:.82rem;white-space:nowrap}
.portal-badge.success{color:#126847;background:#e4f7ed}
.portal-badge.info{color:#1c52ad;background:#e8f1ff}
.portal-badge.warning{color:#874c03;background:#fff4de}
.portal-task-details summary{color:#26569c;cursor:pointer}
.portal-task-devices{margin:6px 0 0;padding:0;list-style:none;font-size:.875rem;color:var(--muted)}
.portal-alert{color:#922e1b;overflow-wrap:anywhere}
.portal>#portal-error{margin:12px 24px}
.auth-card{width:min(calc(100% - 28px),398px);margin:clamp(32px,11vh,104px) auto 32px;border-radius:10px;box-shadow:0 8px 28px #1637680d}
.auth-card .card-head,#portal-dialog .card-head{min-height:55px;padding-inline:16px;border-bottom:1px solid var(--line)}
.auth-card .card-head h2{font-size:1.12rem}
.auth-card-brand{display:flex;justify-content:center;padding:23px 16px 8px}
.auth-card-brand img{width:120px;height:80px;object-fit:contain}
.auth-card .card-head{border-bottom:0;min-height:0;padding-top:10px}
.auth-card .auth-hint{margin-top:8px}
.auth-help{margin:0 16px 17px;color:var(--muted);font-size:.83rem;line-height:1.5}
.auth-help summary{cursor:pointer}
.auth-help p{margin:6px 0 0}
#portal-login-top .portal-brand{display:none}
#portal-login-top .portal-top-actions{margin-left:auto}
.portal-form{display:grid;gap:12px;padding:14px 16px 16px}
#dialog-fields{padding:0}
.portal-page .field{font-size:.875rem;color:#3b4e67}
.portal-page select,.portal-page .field input:not([type=checkbox]){min-height:34px;color:#17253d;background:#fff;border:1px solid #cdd8e8;border-radius:6px;padding:4px 8px}
.portal-page select{appearance:none;padding-right:26px;background-image:linear-gradient(45deg,transparent 50%,#6b7d99 50%),linear-gradient(135deg,#6b7d99 50%,transparent 50%);background-position:calc(100% - 14px) 50%,calc(100% - 9px) 50%;background-size:5px 5px;background-repeat:no-repeat}
#portal-dialog{color:#17253d;background:var(--surface);border:1px solid var(--line);border-radius:10px;width:min(calc(100% - 24px),440px);max-height:90dvh;padding:0;box-shadow:0 14px 48px #14345939}
#portal-dialog:has(.portal-choices){width:min(calc(100% - 24px),550px)}
#portal-dialog::backdrop{background:#152c534f}
.portal-choices{border:1px solid var(--line);border-radius:6px;padding:4px 8px 8px;margin:0;display:flex;gap:8px 12px;flex-wrap:wrap;max-height:150px;overflow:auto}
.portal-choices label{display:flex;gap:5px;align-items:center}
.portal-choices input{accent-color:var(--accent)}
@media(max-width:720px){
  .portal-top{padding-inline:12px;gap:8px;flex-wrap:wrap}.portal-channel{padding-left:8px}
  #portal-workspace{grid-template-columns:minmax(0,1fr)}.portal-sidebar{padding:7px;border-right:0;border-bottom:1px solid var(--line)}
  .portal-sidebar nav{flex-direction:row;flex-wrap:wrap;gap:3px}.portal-sidebar a{padding:6px 8px}
  #portal-main{padding:12px}.portal-heading{margin-bottom:9px}
  .portal-device-frame{height:calc(100dvh - 165px)}
}
.mark{display:grid;width:24px;height:24px;border-radius:7px;background:var(--accent);grid-auto-flow:column;justify-content:center;align-items:center;gap:2px}
.mark i{display:block;width:2px;height:9px;background:#231915;border-radius:4px}
.mark i:nth-child(2){height:16px}
.brand-sub{color:#aeb0b9;font-size:.85rem;padding-left:10px;border-left:1px solid #393a40}
.link-state,.local-label{font-size:.84rem;color:#bfc3cc;white-space:nowrap}
.link-state{display:flex;align-items:center;gap:8px}
.link-state i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#707580}
.link-state.online i{background:var(--green)}
h1,h2,p{margin:0}
h1{font-size:clamp(1.42rem,3vw,2rem);letter-spacing:.02em;font-weight:700}
.intro p,.card-head p{color:var(--muted);font-size:.875rem;margin-top:4px}
.local-label{padding:5px 9px;border:1px solid var(--line);border-radius:7px}
.workspace{display:grid;grid-template-columns:minmax(270px,1fr) minmax(365px,1.1fr) minmax(255px,.68fr);gap:14px;padding:12px 0 10px;align-items:start}
.right{display:grid;gap:8px;min-width:0}
.card{background:var(--surface);border:1px solid var(--line);border-radius:14px;min-width:0}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:9px 12px}
.card-head h2{font-size:1rem;font-weight:650}
.state{color:#d4d7df;background:#2c2f35;font-size:.82rem;border-radius:7px;padding:5px 9px;white-space:nowrap}
.preview .card-head>div{min-width:0}
#room-caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.state.open{color:var(--green);background:#223831}
.state.warning{color:#ffd09f;background:#3a3027}
.stage{display:grid;place-items:center;background:#14161a;height:clamp(270px,calc(100dvh - 176px),690px);padding:9px}
.screen{position:relative;height:100%;max-width:100%;aspect-ratio:9/19;overflow:hidden;background:#101216;border:1px solid #30343b;border-radius:13px}
.screen img{width:100%;height:100%;object-fit:contain;display:block}
.empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:12px;color:var(--muted);text-align:center}
.empty strong{font-size:.91rem;color:#e2e2e5}
.empty span{font-size:.77rem}
.empty svg{stroke:#6b7180;stroke-width:1.4;margin-bottom:4px}
.preview-foot{display:flex;justify-content:space-between;padding:7px 12px;font-size:.83rem;color:var(--muted);border-top:1px solid var(--line)}
.preview-foot strong{margin-left:4px;font:inherit;color:#e3e4e9;font-variant-numeric:tabular-nums}
.quote{margin:0 12px;padding:7px 9px;display:flex;justify-content:space-between;align-items:center;gap:8px;background:#17191d;border:1px solid #34363d;border-radius:8px}
.quote div{display:flex;align-items:center;gap:10px}
.quote div span{color:var(--muted);font-size:.84rem}
.quote strong{font-size:1.34rem;line-height:1.25;font-family:var(--mono);letter-spacing:-.045em}
.quote #current-round{white-space:nowrap}
.live-bid-receipt{margin:0 12px;color:var(--muted);font-size:.83rem;line-height:1.4}
.qualifier{font-size:.82rem;color:var(--muted);text-align:right}
.qualifier.eligible{color:var(--green)}
form{padding:9px 12px 10px}
.field{display:grid;gap:5px;min-width:0}
.field span,.field label{font-size:.86rem;color:#d4d6db}
.field input:not([type=checkbox]){min-width:0;width:100%;border:1px solid #3a3d45;border-radius:7px;color:#f4f3f3;background:#191b1f;padding:4px 8px;min-height:34px}
.field select{appearance:none;padding-right:28px;background-image:linear-gradient(45deg,transparent 50%,#d4d6db 50%),linear-gradient(135deg,#d4d6db 50%,transparent 50%);background-position:calc(100% - 14px) 50%,calc(100% - 9px) 50%;background-size:5px 5px;background-repeat:no-repeat}
.field input::placeholder{color:#878d98;font-size:.84rem}
.room-group,.fields{background:#1a1c20;border:1px solid #30333a;border-radius:8px;padding:7px 9px}
.fields{display:grid;grid-template-columns:minmax(0,1.2fr) repeat(2,minmax(0,1fr));column-gap:clamp(8px,2vw,24px);margin-top:8px}
.room-field,.price-field{display:flex;align-items:center;gap:6px;min-width:0}
.room-field button,.minute-entry,.continuous{white-space:nowrap}
.minute-entry{display:flex;align-items:center;gap:4px;border:1px solid #3a3d45;border-radius:7px;background:#191b1f;padding-right:6px;flex:none}
.minute-entry #minutes{flex:1;min-height:32px;border:0;background:transparent;padding:4px 3px 4px 7px}
.minute-entry:has(input:disabled){opacity:.63}
.fields .continuous{align-self:end;display:flex;align-items:center;gap:7px;min-height:34px;padding:4px 8px;border:1px solid #3a3d45;border-radius:7px;background:#191b1f;font-size:.86rem;color:#d4d6db}
.continuous input{margin:0;width:15px;height:15px;accent-color:var(--accent);flex:none}
.price-field{gap:4px}
.price-field input{appearance:textfield}
.price-field input::-webkit-inner-spin-button,.price-field input::-webkit-outer-spin-button{appearance:none;margin:0}
.price-field input:focus-visible{outline-offset:-2px}
.price-step{display:flex;align-items:center;gap:4px;flex:none}
.price-step button{width:28px;height:28px;border:1px solid #444751;border-radius:4px;background:#282a30;color:#eee;font:700 14px/.9 system-ui;padding:0}
.price-step button:not(:disabled):hover{background:#3a3d44}
.fields{align-items:start}
.subtle,.primary{border:1px solid #444751;border-radius:7px;min-height:34px;padding:4px 8px;background:#282a30;color:#f3f2f1;font-weight:600;font-size:.86rem}
.subtle:not(:disabled):hover{background:#363941}
.primary{background:var(--accent);border-color:var(--accent);color:#171411}
.primary:not(:disabled):hover{background:#ffa17e}
.suggested{margin-top:7px;min-height:29px;padding:3px 8px;font-size:.79rem}
.mode-field{margin-top:10px}
.mode-note{color:var(--muted);font-size:.8rem;line-height:1.4;margin-top:7px}
.actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.status-strip{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:9px;height:37px;padding:0 11px;border:1px solid #30333a;border-radius:8px;background:#191b1f;font-size:.8rem;color:var(--muted)}
.status-strip span{color:#c9cbd2}
.status-strip p{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.status-strip p.warning{color:#ffd09f}
.monitor-notice{padding:7px 10px;border:1px solid var(--line);border-radius:7px;font-size:.83rem;font-weight:650;line-height:1.45;color:var(--muted)}
.monitor-notice[data-tone=running]{color:#82dcaf;background:#16382b;border-color:#386951}
.monitor-notice[data-tone=reconnecting]{color:#ffe0a3;background:#3b2a15;border-color:#8e6028}
.monitor-notice[data-tone=interrupted]{color:#ffd0cf;background:#442329;border-color:#a55759}
.actions button.monitor-running{border-color:#388367;color:var(--green)}
.actions button.monitor-restart:not(:disabled){border-color:#b76464;color:#ffb5b5}
[data-theme=light] .monitor-notice[data-tone=running]{color:#146443;background:#e8f7ef;border-color:#addcc2}
[data-theme=light] .monitor-notice[data-tone=reconnecting]{color:#824500;background:#fff3dc;border-color:#e9c284}
[data-theme=light] .monitor-notice[data-tone=interrupted]{color:#982822;background:#ffeae8;border-color:#eeb1ac}
[data-theme=light] .actions button.monitor-restart:not(:disabled){color:#982822;border-color:#c86965}
.history summary.card-head{cursor:pointer;font-size:.87rem}
.history summary::after{content:"+";color:var(--muted);font-size:1rem}
.history[open] summary::after{content:"−"}
.history summary span{margin-left:auto;color:var(--muted);font-size:.8rem}
.history-list{list-style:none;margin:0;padding:0 16px 10px;max-height:163px;overflow:auto}
.history-list li{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-top:1px solid #2d3036;font-size:.81rem}
.history-list time,.no-entries{color:var(--muted);white-space:nowrap}
.history-list time{font: .76rem/1.7 var(--mono)}
.round-won{color:#83d9b1}
.bid-meta{display:block;color:var(--muted);font-size:.76rem}
.limits form{display:grid;gap:8px;padding-top:2px}
.limits .mode-note{margin-top:0}
.limit-row{padding:7px 9px;background:#191b1f;border:1px solid #30333a;border-radius:8px}
.limit-input,.limit-checkbox{display:flex;gap:6px;align-items:center;font-size:.84rem;color:#d4d6db}
.limit-input input:not([type=checkbox]){width:4.2rem;font-variant-numeric:tabular-nums}
.participation-pattern{flex-wrap:wrap;gap:6px 11px}
.participation-pattern label{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.participation-pattern input:not([type=checkbox]){width:3.25rem}
.limit-checkbox{min-height:29px;gap:8px}
.limit-checkbox input{width:15px;height:15px;margin:0;accent-color:var(--accent)}
.save-limits{justify-self:start;padding-inline:12px}
.limit-summary{display:grid;gap:3px;min-height:54px;padding:7px 12px;border-top:1px solid var(--line);font-size:.79rem;color:var(--muted)}
#limit-feedback{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#e3e4e9}
#limit-feedback.warning{color:#ffd09f}
@media(max-width:960px){.workspace{grid-template-columns:minmax(270px,1fr) minmax(365px,1.1fr)}.limits{grid-column:2}}
@media(max-width:820px){.shell{width:calc(100% - 20px)}.workspace{grid-template-columns:1fr}.stage{height:min(57dvh,395px)}}
@media(max-width:820px){.limits{grid-column:auto}}
@media(max-width:420px){.fields{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) minmax(0,1fr);column-gap:8px}.price-step button{width:22px}.fields .continuous{padding-inline:4px;gap:4px}}
@media(prefers-reduced-motion:no-preference){button{transition:background .14s ease}}

:root[data-theme=dark]{color-scheme:dark}
:root[data-theme=light]{color-scheme:light;color:#17253d;background:#f3f6fb;--surface:#fff;--line:#e0e6ef;--muted:#526178;--accent:#215bd7;--green:#126847}
[data-theme=light] .top{background:#fff;border-color:var(--line)}
[data-theme=light] :is(.nav-link,.fleet-body,.link-state,.local-label,.preview-foot strong,.status-strip span,.empty strong){color:#425570}
[data-theme=light] .nav-link:is(:hover,[aria-current]){color:var(--accent)}
[data-theme=light] .mark i{background:#fff}
[data-theme=light] .state{background:#edf1f7;color:#43536c}
[data-theme=light] .state.open{background:#e4f7ed;color:var(--green)}
[data-theme=light] .state.warning{background:#fff4de;color:#874c03}
[data-theme=light] :is(.fleet-device,.quote,.room-group,.fields,.status-strip,.limit-row){background:#f7f9fd;border-color:var(--line)}
[data-theme=light] .fleet-table th{background:#f7f9fd}
[data-theme=light] .stage{background:#eef3fa}
[data-theme=light] .screen{background:#e6edf7;border-color:#d4dfef}
[data-theme=light] :is(.field span,.field label,.limit-input,.limit-checkbox){color:#3b4e67}
[data-theme=light] :is(.field input:not([type=checkbox]),.minute-entry,.fields .continuous){background:#fff;border-color:#cdd8e8;color:#17253d}
[data-theme=light] .minute-entry #minutes{background:transparent}
[data-theme=light] :is(.subtle,.price-step button){color:#334664;background:#fff;border-color:#cdd8e8}
[data-theme=light] :is(.subtle,.price-step button):not(:disabled):hover{color:#194da9;background:#eff5ff;border-color:#9bb7e7}
[data-theme=light] .primary{color:#fff}
[data-theme=light] .primary:not(:disabled):hover{background:#144cbe}
[data-theme=light] .history-list li{border-color:var(--line)}
[data-theme=light] .round-won{color:var(--green)}
[data-theme=light] #limit-feedback{color:#43536c}
[data-theme=light] :is(.status-strip p.warning,#limit-feedback.warning){color:#874c03}

[data-theme=dark] .portal-page{color-scheme:dark;color:#e6edf8;background:#101722;--surface:#182233;--line:#2a3850;--muted:#a4b3c9;--accent:#7eaaff}
[data-theme=dark] .portal-page :is(.portal-top,.portal-sidebar,.portal-toolbar,.portal-footer,.portal-table-scroll){background:var(--surface)}
[data-theme=dark] .portal-page :is(.portal-brand,#portal-dialog,.portal-search,.portal-form select,.portal-pages select,.field input:not([type=checkbox])){color:#e6edf8}
[data-theme=dark] .portal-page .mark i{background:#111b2e}
[data-theme=dark] .portal-sidebar a{color:#b6c4d9}
[data-theme=dark] .portal-sidebar a:is(:hover,[aria-current]){background:#223d66;color:#b7d0ff}
[data-theme=dark] .portal-page :is(.subtle,.portal-search,select,.field input:not([type=checkbox])){background:#141d2c;border-color:#354865}
[data-theme=dark] .portal-page :is(.subtle,.field){color:#c4d1e7}
[data-theme=dark] .portal-page .subtle:not(:disabled):hover{color:#e6edf8;background:#223651;border-color:#5878ac}
[data-theme=dark] .portal-page .primary{color:#101b31}
[data-theme=dark] .portal-page .primary:not(:disabled):hover{background:#9cbdff}
[data-theme=dark] .portal-table th{background:#202d42;color:#becde3}
[data-theme=dark] .portal-table tbody tr:hover{background:#1d2b40}
[data-theme=dark] .portal-resize::after{border-color:#405578}
[data-theme=dark] .portal-resize:is(:hover,:focus-visible)::after{border-color:var(--accent)}
[data-theme=dark] .portal-badge{color:#b7c4d8;background:#29384e}
[data-theme=dark] .portal-badge.success{color:#87dab4;background:#203c35}
[data-theme=dark] .portal-badge.info{color:#b7d0ff;background:#253c62}
[data-theme=dark] .portal-badge.warning{color:#ffd39a;background:#493722}
[data-theme=dark] .portal-task-details summary{color:#a6c6ff}
[data-theme=dark] .portal-alert{color:#ffb7a6}
[data-theme=dark] #portal-dialog::backdrop{background:#080f1bb3}

@media(max-width:500px){
  .top{height:auto;min-height:45px}
  .top .header{flex-wrap:wrap;gap:6px;padding-block:6px}
  .header-actions{gap:6px}
}

/* ── 2026-11-30 排版与导航优化 ───────────────────────────────────────────
   侧栏分组加图标、页头加说明、筛选条压成一行、表头与单元格重排。
   只覆盖上面的既有规则，不改动结构类名。 */

#portal-workspace{grid-template-columns:188px minmax(0,1fr)}
.portal-sidebar{padding:14px 12px}
.portal-sidebar nav{gap:2px}
.portal-sidebar a{display:flex;align-items:center;gap:9px;padding:8px 11px;border-radius:7px;font-size:.89rem;line-height:1.35}
.menu-icon{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;opacity:.66}
.portal-sidebar a:hover .menu-icon,.portal-sidebar a[aria-current] .menu-icon{opacity:1}
.portal-sidebar a[aria-current]{background:#eaf1ff;color:#174fbf;font-weight:650}
.portal-sidebar a[aria-current]{box-shadow:inset 3px 0 0 var(--accent)}

.portal-heading{align-items:flex-start;gap:16px;margin-bottom:16px}
.portal-title{display:grid;gap:4px;min-width:0}
.portal-heading h2{font-size:1.28rem;font-weight:700;letter-spacing:.01em;line-height:1.3}
.portal-subtitle{margin:0;color:var(--muted);font-size:.82rem;font-weight:400;line-height:1.45}
.portal-heading>.primary{align-self:center}

.portal-section .portal-toolbar{align-items:center;gap:8px;padding:12px 16px}
.portal-toolbar .portal-table-filter{display:inline-flex;align-items:center;gap:6px;padding:3px 6px 3px 10px;background:#f7f9fd;border:1px solid var(--line);border-radius:7px}
.portal-toolbar .portal-table-filter .field-label{font-size:.78rem;color:var(--muted);white-space:nowrap}
.portal-toolbar .portal-table-filter select{min-height:28px;border:0;background-color:transparent;padding:0 20px 0 2px;font-size:.84rem;color:#22334e}
.portal-toolbar .portal-table-filter select:focus-visible{outline-offset:1px}
.portal-section .portal-search{flex:1 1 220px;max-width:330px}
.portal-section .portal-toolbar>button:last-child{margin-left:auto}

.portal-table th{position:sticky;top:0;z-index:1;padding-block:10px;font-size:.79rem;letter-spacing:.02em;color:#4b5c76;background:#f7f9fd}
.portal-table td{padding-block:10px}
.portal-table td:first-child{font-weight:650;color:#16233a}
.portal-table tbody tr:hover td{background:#f9fbff}
.portal-table .portal-empty{padding:48px 16px;line-height:1.6}
.portal-footer{padding:11px 16px}

.portal-top{min-height:60px;padding:8px 22px;box-shadow:0 1px 0 #e7edf6}
[data-theme=dark] .portal-page .portal-top{box-shadow:none}
.portal-top-actions{gap:9px}
.portal-top-actions nav a{font-size:.85rem}
.theme-toggle{width:34px;height:34px;padding:0;display:inline-flex;align-items:center;justify-content:center;font-size:15px;line-height:1}
.theme-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8}

#portal-main{padding:22px clamp(14px,2.3vw,36px)}
.portal-section:has(.portal-toolbar){border-radius:12px;box-shadow:0 1px 2px #1637680a}

@media(max-width:720px){
  .portal-sidebar .menu-icon{display:none}
  .portal-heading{gap:10px;margin-bottom:10px}
  .portal-subtitle{display:none}
  .portal-section .portal-toolbar{padding:10px 12px}
}

.fleet-table .fleet-actions{gap:4px 6px}
.fleet-table .fleet-open{justify-content:center;min-height:28px;min-width:62px;padding:3px 7px;font-size:.78rem;white-space:nowrap}
.fleet-table .fleet-workbench-link:not(:hover){color:var(--accent)}

/* 空表：给一点形象，而不是一行孤零零的字 */
.portal-table .portal-empty::before{content:"";display:block;width:26px;height:26px;margin:0 auto 10px;border:1.5px dashed #c6d2e3;border-radius:8px}
.portal-table .portal-empty{color:#6b7c96}
/* 表格密度：紧凑模式一屏多两行 */
body[data-density=compact] .portal-table th{padding-block:6px}
body[data-density=compact] .portal-table td{padding-block:5px;font-size:.84rem}
body[data-density=compact] .portal-table td:first-child{font-weight:600}
body[data-density=compact] .portal-badge{font-size:.76rem;padding:1px 6px}
body[data-density=compact] .portal-cell-action>button,
body[data-density=compact] .portal-row-actions>button{min-height:26px;font-size:.76rem}
body[data-density=compact] .fleet-table :is(th,td){padding-block:6px}
/* 出价工作台：三列重新配比，画面吃掉竖向空间，运行明细归到右列 */
.workspace{grid-template-columns:minmax(300px,1.12fr) minmax(390px,1.02fr) minmax(288px,.82fr);align-items:start}
.stage{height:clamp(320px,calc(100dvh - 186px),760px)}
.right{gap:9px}
.limits{display:flex;flex-direction:column;gap:9px}
.limits form{padding-bottom:10px}
.limits .history{margin-top:auto}
.limits .history .history-list{max-height:220px}
/* 运行明细并入参与限制卡片，去掉嵌套卡片的双边框 */
.limits .history{border:0;border-top:1px solid #30333a;border-radius:0;background:transparent}
.limits .history .card-head{padding-inline:0;margin-inline:12px;width:auto}

/* 深色模式补全：沿用文件里已有的海军蓝调色板（#101722 / #182233 / #2a3850），
   只补原先没覆盖到的部件，避免两套色板打架。 */
[data-theme=dark] .portal-page{--surface:#182233;--line:#2a3850;--muted:#a4b3c9;--accent:#7eaaff;color-scheme:dark;color:#e6edf8;background:#101722}
[data-theme=dark] .portal-brand{color:#e6edf8}
[data-theme=dark] .portal-section:has(.portal-toolbar){box-shadow:none}
[data-theme=dark] .portal-table td{border-bottom-color:#22304a;color:#d6e2f3}
[data-theme=dark] .portal-table td:first-child{color:#eef4ff}
[data-theme=dark] .portal-table tbody tr:hover td{background:#1d2b40}
[data-theme=dark] .portal-table .portal-empty{color:#8fa3bf}
[data-theme=dark] .portal-table .portal-empty::before{border-color:#3a4c69}
[data-theme=dark] .portal-search{color:#e6edf8}
[data-theme=dark] .portal-search::placeholder{color:#7f8fa6}
[data-theme=dark] .portal-toolbar .portal-table-filter{background:#141d2c;border-color:#2a3850}
[data-theme=dark] .portal-toolbar .portal-table-filter .field-label{color:#93a6c2}
[data-theme=dark] .portal-toolbar .portal-table-filter select{color:#dfe9f8;background:transparent}
[data-theme=dark] .portal-page .field{color:#c4d1e7}
[data-theme=dark] .portal-page .field-label{color:#a4b3c9}
[data-theme=dark] #portal-dialog{background:#182233;border-color:#2f3f5b;box-shadow:0 18px 50px #0009}
[data-theme=dark] .portal-page .card{background:#182233;border-color:#2a3850}
[data-theme=dark] .portal-page .primary{color:#0d1626}
[data-theme=dark] .portal-footer{border-color:#22304a}
[data-theme=dark] .portal-page select{background-color:#141d2c;color:#dfe9f8;background-image:linear-gradient(45deg,transparent 50%,#93a6c2 50%),linear-gradient(135deg,#93a6c2 50%,transparent 50%);background-position:calc(100% - 14px) 50%,calc(100% - 9px) 50%;background-size:5px 5px;background-repeat:no-repeat}

/* 设备名称：主名 + 机型副行 */
.portal-device-name{display:grid;gap:1px;min-width:0}
.portal-device-name strong{font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.portal-device-name small{color:var(--muted);font-size:.78rem;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* 对话框：4 个字段起两列，长文本与选项跨列 */
#portal-dialog[data-layout=wide]{width:min(calc(100% - 24px),620px)}
#portal-dialog[data-layout=wide] #dialog-fields{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:14px;row-gap:12px}
#portal-dialog[data-layout=wide] .field:has(textarea),
#portal-dialog[data-layout=wide] .portal-choices,
#portal-dialog[data-layout=wide] .field:has(.portal-choices){grid-column:1/-1}
#portal-dialog[data-layout=wide] .field:has(textarea) textarea{min-height:84px;resize:vertical}
#portal-dialog[data-layout=wide] #dialog-form>button{grid-column:1/-1;justify-self:end;margin-top:2px}

/* 登录页首屏说明 */
.auth-hint{margin:12px 16px 0;color:var(--muted);font-size:.85rem;line-height:1.55}
.auth-card .card-head{padding-bottom:2px}
/* 多机总控卡片视图：信息分层 + 状态胶囊 */
.fleet-list{grid-template-columns:repeat(auto-fill,minmax(min(100%,262px),1fr));gap:12px}
.fleet-device{display:flex;flex-direction:column;transition:border-color .15s ease}
.fleet-device:hover{border-color:#3f4a5e}
.fleet-device .card-head{padding:11px 13px 7px;align-items:flex-start}
.fleet-device h3{font-size:.95rem;line-height:1.35}
.fleet-device h3 small{display:block;color:var(--muted);font-size:.78rem;font-weight:400;margin-top:2px}
.fleet-body{display:grid;gap:8px;padding:0 13px 12px}
.fleet-room{margin:0;font-size:.85rem;color:#d4d6db;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fleet-detail{display:flex;gap:6px;flex-wrap:wrap;margin:0}
.fleet-chip{display:inline-block;padding:1px 8px;border-radius:999px;background:#262a31;color:#b7bcc7;font-size:.77rem;line-height:1.65;white-space:nowrap}
.fleet-chip.warn{background:#3a3027;color:#ffd09f}
.fleet-chip.ok{background:#223831;color:#79d5af}
.fleet-rental{display:grid;gap:4px;justify-items:start;min-width:124px}
.fleet-table .fleet-rental{min-width:0;gap:2px}
.fleet-table .state{display:inline-block;padding:3px 7px}
.fleet-rental small{color:var(--muted);font-size:.78rem;line-height:1.4;overflow-wrap:anywhere}
.fleet-rental-state{display:inline-block;border-radius:5px;padding:2px 7px;font-size:.8rem;color:var(--muted);background:#eaf0f7;white-space:nowrap}
.fleet-rental-state.active{color:#1c52ad;background:#e8f1ff}
.fleet-rental-state.return{color:#874c03;background:#fff4de}
[data-theme=dark] .fleet-rental-state{background:#29384e;color:#b7c4d8}
[data-theme=dark] .fleet-rental-state.active{background:#253c62;color:#b7d0ff}
[data-theme=dark] .fleet-rental-state.return{background:#493722;color:#ffd39a}
.fleet-rental-dialog{width:min(415px,calc(100% - 24px));max-height:90dvh;padding:18px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text)}
.fleet-rental-dialog::backdrop{background:#080f1b80}
.fleet-rental-dialog h2{margin:0 0 8px;font-size:1.08rem}
.fleet-rental-dialog p{margin:0 0 12px;line-height:1.5}
.fleet-rental-dialog form{display:grid;gap:10px}
.fleet-rental-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.fleet-rental-note{color:var(--muted)}
.fleet-rental-error{color:var(--danger,#b64732)}
.fleet-rental-dialog .fleet-actions{justify-content:flex-end;flex-wrap:wrap}
.fleet-device .fleet-actions{margin-top:2px}
.fleet-device .fleet-open{flex:1 1 auto;justify-content:center;text-align:center}

/* 嵌入运营后台：只调色，不改内层卡片结构；深浅两套各自跟随 data-theme */
.portal-section.portal-embedded{padding:0;background:none;border:0;box-shadow:none}
.portal-section.portal-embedded>.portal-heading{padding:0 0 10px}
[data-embedded] .fleet-page{padding:0}
[data-embedded][data-theme=dark] body{background:#101722;color:#e6edf8}
[data-embedded][data-theme=dark] .card{background:#182233;border-color:#2a3850}
[data-embedded][data-theme=dark] .fleet-head h2{color:#eef4ff}
[data-embedded][data-theme=dark] .fleet-toolbar :is(input,select){background:#141d2c;border-color:#2a3850;color:#e6edf8}
[data-embedded][data-theme=dark] .subtle{background:#141d2c;border-color:#354865;color:#c4d1e7}
[data-embedded][data-theme=dark] .subtle:not(:disabled):hover{background:#223651;color:#e6edf8}
[data-embedded][data-theme=dark] .fleet-table th{background:#202d42;color:#becde3}
[data-embedded][data-theme=dark] .fleet-table :is(th,td){border-color:#22304a}
[data-embedded][data-theme=dark] .fleet-table td{color:#d6e2f3}
[data-embedded][data-theme=dark] .state{background:#22304a;color:#cfd9e8}
[data-embedded][data-theme=dark] .state.open{background:#203c35;color:#87dab4}
[data-embedded][data-theme=dark] .fleet-device{background:#182233;border-color:#2a3850}
[data-embedded][data-theme=dark] .fleet-chip{background:#22304a;color:#c2d0e4}
[data-embedded][data-theme=dark] .fleet-chip.warn{background:#493722;color:#ffd39a}
[data-embedded][data-theme=dark] .fleet-chip.ok{background:#203c35;color:#87dab4}
[data-embedded][data-theme=dark] .fleet-empty{color:#8fa3bf;border-color:#22304a}
/* 批量选择 */
.portal-table .portal-check{width:42px;text-align:center;padding-inline:0}
.portal-table .portal-check input{width:15px;height:15px;accent-color:var(--accent);vertical-align:middle}
.portal-batchbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:9px 16px;background:#eef4ff;border-block:1px solid var(--line);font-size:.85rem}
.portal-batch-count{font-weight:650;color:#1c3566}
.portal-batch-field{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:.82rem}
.portal-batch-field select{min-height:30px;padding:2px 8px;border:1px solid #cdd8e8;border-radius:6px;background:#fff;color:inherit}
.portal-batch-value{display:inline-flex;align-items:center}
.portal-batch-input{min-height:30px;min-width:160px;padding:2px 8px;border:1px solid #cdd8e8;border-radius:6px;background:#fff;color:inherit;font-size:.84rem}
.portal-batchbar .subtle{min-height:30px;font-size:.82rem}
[data-theme=dark] .portal-batchbar{background:#16233a;border-color:#2a3850}
[data-theme=dark] .portal-batch-count{color:#cfe0ff}
[data-theme=dark] .portal-batch-field{color:#9fb0c9}
[data-theme=dark] .portal-batch-field select,[data-theme=dark] .portal-batch-input{background:#141d2c;border-color:#354865;color:#e6edf8}
/* 多机总控批量选择 */
.fleet-check{width:42px;text-align:center;padding-inline:0}
.fleet-check input{width:15px;height:15px;accent-color:var(--accent);vertical-align:middle}
.fleet-batch{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:9px 14px;background:#1d2129;border-block:1px solid #2c313a;font-size:.85rem}
.fleet-batch-count{font-weight:650;color:#dfe5ee}
.fleet-batch .subtle{min-height:30px;font-size:.82rem}
[data-theme=light] .fleet-batch{background:#eef4ff;border-color:#dbe4f3}
[data-theme=light] .fleet-batch-count{color:#1c3566}
[data-embedded][data-theme=dark] .fleet-batch{background:#16233a;border-color:#2a3850}
[data-embedded][data-theme=dark] .fleet-batch-count{color:#cfe0ff}
/* 侧栏与内容之间：收紧留白，给侧栏一条看得见的边 */
#portal-main{padding:20px clamp(12px,1.7vw,26px)}
.portal-sidebar{border-right:1px solid #dbe4f2;box-shadow:1px 0 0 #eef3fa}
[data-theme=dark] .portal-sidebar{border-right-color:#2a3850;box-shadow:1px 0 0 #16233a}
.portal-sidebar a{max-width:100%}
#portal-main{padding:18px clamp(12px,1.6vw,22px)}
/* 参考 SLS 面板：指标块 + 右侧摘要列，减少大片留白 */
.portal-layout{display:grid;grid-template-columns:minmax(0,1fr) 268px;gap:16px;align-items:start;max-width:1540px;margin-inline:auto}
.portal-side{display:grid;gap:12px;position:sticky;top:78px}
.portal-sidecard{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px 16px}
.portal-sidecard h3{margin:0 0 10px;font-size:.94rem;font-weight:650}
.portal-sidecard-list{display:grid;grid-template-columns:1fr auto;gap:7px 12px;margin:0;font-size:.85rem}
.portal-sidecard-list dt{color:var(--muted);min-width:0}
.portal-sidecard-list dd{margin:0;font-weight:650;font-variant-numeric:tabular-nums;text-align:right}
.portal-sidecard-note{margin:10px 0 0;color:var(--muted);font-size:.78rem;line-height:1.5}
.portal-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));border-top:1px solid var(--line);background:#fbfcff}
.portal-stat{display:grid;gap:1px;padding:11px 16px;border-right:1px solid var(--line)}
.portal-stat:last-child{border-right:0}
.portal-stat strong{font-size:1.34rem;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.25}
.portal-stat span{color:var(--muted);font-size:.8rem}
[data-theme=dark] .portal-stats{background:#16233a}
[data-theme=dark] .portal-sidecard{background:#182233;border-color:#2a3850}
@media(max-width:1180px){
  .portal-layout{grid-template-columns:minmax(0,1fr)}
  .portal-side{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));position:static}
}
@media(max-width:720px){
  .portal-side{grid-template-columns:minmax(0,1fr)}
  .portal-stat{padding:10px 12px}
  .portal-stat strong{font-size:1.15rem}
}
/* 数据面板（运营后台首页） */
.portal-dashboard{display:grid;gap:16px;max-width:1540px;margin-inline:auto}
.portal-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(168px,1fr));gap:12px}
.portal-metric{display:grid;gap:3px;padding:14px 16px;background:var(--surface);border:1px solid var(--line);border-radius:12px}
.portal-metric-label{color:var(--muted);font-size:.82rem}
.portal-metric-value{font-size:1.72rem;font-weight:700;line-height:1.15;font-variant-numeric:tabular-nums}
.portal-metric-hint{color:var(--muted);font-size:.76rem}
.member-workspace-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface)}
.member-workspace-identity{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;min-width:0;overflow-wrap:anywhere}
.member-workspace-identity>span:not(.portal-badge){color:var(--muted);font-size:.83rem}
.portal-panels{display:grid;grid-template-columns:repeat(auto-fit,minmax(288px,1fr));gap:16px;align-items:start}
.portal-panel{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:16px;min-width:0}
.portal-panel h3{margin:0 0 12px;font-size:.96rem;font-weight:650}
.portal-admin-dashboard{gap:14px}
.portal-admin-dashboard .portal-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.portal-admin-dashboard .portal-panels{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.portal-panel-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.portal-panel-head h3{margin:0}
.portal-panel-link{color:var(--accent);font-size:.82rem;font-weight:600;text-decoration:none}
.portal-panel-link:hover{text-decoration:underline}
.portal-counts{display:grid;grid-template-columns:repeat(auto-fit,minmax(92px,1fr));gap:6px;margin:0}
.portal-counts>div{display:flex;align-items:baseline;justify-content:space-between;gap:6px;padding:6px 8px;border-radius:6px;background:#f4f7fb;min-width:0}
.portal-counts dt{font-size:.78rem;color:var(--muted)}
.portal-counts dd{margin:0;font-size:.95rem;font-weight:650;font-variant-numeric:tabular-nums}
.portal-counts .count-success dd{color:#137457}
.portal-counts .count-warning dd{color:#9a571c}
.portal-resource-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.portal-resource-groups .portal-panel-sub{margin-top:0}
.portal-checkmeta{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:5px 9px}
.portal-admin-dashboard .portal-checklist{gap:0}
.portal-admin-dashboard .portal-checklist li{padding:6px 0;border-top:1px solid var(--line)}
.portal-admin-dashboard .portal-checkline :is(strong,small){overflow-wrap:anywhere}
.portal-admin-dashboard .portal-checklist .portal-panel-note{margin:0}
[data-theme=dark] .portal-counts>div{background:#1f2c43}
[data-theme=dark] .portal-counts .count-success dd{color:#87dcc0}
[data-theme=dark] .portal-counts .count-warning dd{color:#ffbc81}
@media(max-width:900px){
  .portal-admin-dashboard .portal-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .portal-admin-dashboard .portal-panels{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:480px){
  .portal-resource-groups{grid-template-columns:minmax(0,1fr)}
  .portal-admin-dashboard .portal-metric{padding:10px}
}
.portal-checklist{list-style:none;margin:0;padding:0;display:grid;gap:10px;font-size:.84rem}
.portal-checklist li{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.portal-checkline{display:grid;gap:2px;min-width:0}
.portal-checkline small{color:var(--muted);font-size:.78rem}
.portal-checktime{color:var(--muted);font-size:.76rem;white-space:nowrap;font-variant-numeric:tabular-nums}
.portal-panel-note{margin:10px 0 0;color:var(--muted);font-size:.78rem}
[data-theme=dark] .portal-metric,[data-theme=dark] .portal-panel{background:#182233;border-color:#2a3850}
@media(max-width:720px){.portal-metrics{grid-template-columns:repeat(auto-fit,minmax(138px,1fr))}}
/* 空列表：给一句说明和一个直接动手的按钮 */
.portal-empty-state{display:grid;justify-items:center;gap:10px;max-width:360px;margin-inline:auto}
.portal-empty-state strong{font-size:.95rem;color:#40516d;font-weight:650}
[data-theme=dark] .portal-empty-state strong{color:#c4d1e7}
.portal-empty-state .primary{min-height:32px;font-size:.84rem}
/* 数据面板：纯数值行 */
.portal-panel-sub{margin:14px 0 8px;color:var(--muted);font-size:.78rem;font-weight:650;letter-spacing:.02em}
/* 客户工作台卡片 */
.portal-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(288px,1fr));gap:14px}
.portal-card{display:grid;gap:9px;padding:15px 16px;background:var(--surface);border:1px solid var(--line);border-radius:12px;min-width:0}
.portal-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.portal-card-head h3{margin:0;font-size:1rem;font-weight:650;line-height:1.35;overflow-wrap:anywhere}
.portal-card-meta{margin:0;color:var(--muted);font-size:.82rem;line-height:1.5}
.portal-card-chips{display:grid;gap:5px;margin:0;padding:0;list-style:none;font-size:.82rem;color:#4b5c76}
.portal-card-chips li{padding:5px 8px;background:#f6f9fe;border-radius:6px;overflow-wrap:anywhere}
.portal-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:2px}
.portal-card-actions .subtle{min-height:30px;font-size:.82rem}
.rental-lines{display:grid}
.rental-line{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 14px;padding:10px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}
.rental-lines>.rental-line:first-child{border-top:0;padding-top:0}
.rental-lines>.rental-line:last-child{padding-bottom:0}
.rental-line .portal-row-actions{flex-wrap:wrap}
.rental-cards{grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr))}
.member-workbench-link{justify-self:start;text-decoration:none;text-align:center}
.member-room-toolbar{flex-wrap:wrap;align-items:end;gap:9px 14px}
.member-room-toolbar .field{min-width:min(240px,100%)}
.member-device-frame{width:100%;min-height:640px;border:0}
.portal-sidebar .rental-nav-count{margin-left:auto;font-size:.72rem;line-height:1.45;letter-spacing:0}
.rental-notice{position:fixed;z-index:20;right:16px;bottom:16px;width:min(340px,calc(100vw - 32px));padding:13px 16px;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:0 6px 24px #12233c30}
.rental-notice p{margin:0 0 10px;font-weight:650}
[data-theme=dark] .portal-card{background:#182233;border-color:#2a3850}
[data-theme=dark] .portal-card-chips{color:#b6c4d9}
[data-theme=dark] .portal-card-chips li{background:#1f2c44}
/* 批量复选框：跟随主题自绘，不再出现白方块 */
.portal-check input,.fleet-check input{appearance:none;-webkit-appearance:none;width:15px;height:15px;border:1px solid #c3d0e2;border-radius:4px;background:#fff;position:relative;cursor:pointer;vertical-align:middle;margin:0}
.portal-check input:checked,.fleet-check input:checked{background:var(--accent);border-color:var(--accent)}
.portal-check input:checked::after,.fleet-check input:checked::after{content:"";position:absolute;left:4px;top:1px;width:4px;height:8px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg)}
.portal-check input:focus-visible,.fleet-check input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
[data-theme=dark] .portal-check input,[data-theme=dark] .fleet-check input{background:#141d2c;border-color:#44557a}
[data-theme=dark] .portal-check input:checked,[data-theme=dark] .fleet-check input:checked{background:#5b8cff;border-color:#5b8cff}
@media(max-width:900px){.portal-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
#portal-workspace{grid-template-columns:144px minmax(0,1fr);column-gap:8px;min-height:100dvh}
.portal-sidebar{padding:14px 9px;font-family:system-ui,"PingFang SC","Microsoft YaHei",sans-serif}
.portal-sidebar nav{gap:4px}
.portal-sidebar a{padding:8px 10px;gap:9px;font-size:.875rem;font-weight:400;line-height:1.375rem;letter-spacing:.025em}
.portal-sidebar a:not(:hover):not([aria-current]){color:#374151}
[data-theme=dark] .portal-sidebar a:not(:hover):not([aria-current]){color:#cbd5e1}
.portal-sidebar a[aria-current]{font-weight:650}
.portal-sidebar .member-menu-button{display:flex;align-items:center;gap:9px;padding:8px 10px;border:0;border-radius:7px;background:none;color:inherit;font:inherit;font-size:.875rem;line-height:1.375rem;text-align:left;cursor:pointer}
.portal-sidebar .member-menu-button:is(:hover,[aria-current]){background:#eaf1ff;color:#174fbf}
.portal-sidebar .member-menu-button[aria-current]{box-shadow:inset 3px 0 0 var(--accent);font-weight:650}
[data-theme=dark] .portal-sidebar .member-menu-button:is(:hover,[aria-current]){background:#223d66;color:#b7d0ff}
.portal-sidebar-inner{position:sticky;top:14px;display:flex;flex-direction:column;height:calc(100dvh - 28px);min-height:150px}
.portal-sidebar .portal-brand{flex:none;align-self:center;width:fit-content;margin-bottom:14px;padding:4px 0 6px}
.portal-sidebar .portal-brand:hover{background:none}
.portal-content{display:flex;flex-direction:column;gap:12px;min-width:0;padding:10px clamp(12px,1.25vw,20px) 0 0}
.portal-content #portal-main{padding:0 0 14px}
.portal-content #portal-main :is(.portal-section,.portal-dashboard,.portal-layout){max-width:none}
.portal-content #portal-error{margin:0}
.portal-sidebar-inner nav{min-height:0;overflow-y:auto;scrollbar-width:thin}
.portal-site-settings{display:grid;gap:12px;min-width:0}
.portal-settings-nav{display:flex;flex-wrap:wrap;gap:6px}
.portal-settings-nav a{display:inline-flex;align-items:center;padding:0 12px;text-decoration:none;font-size:.85rem}
.portal-settings-nav a[aria-current]{color:var(--accent);border-color:var(--accent);font-weight:650}
.portal-sidebar-footer{display:grid;gap:5px;margin-top:auto;padding:9px 7px;background:var(--surface);border:1px solid var(--line);border-radius:9px}
#portal-user{margin:0 0 1px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.82rem;font-weight:600;line-height:1.4}
#portal-account-detail{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:.72rem}
.portal-account-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.portal-account-actions .subtle,.portal-sidebar-footer .theme-toggle{min-height:32px;padding:0 2px;font-size:.7rem;white-space:nowrap}
.portal-sidebar-footer .theme-toggle{width:100%;height:32px;gap:3px}
.portal-sidebar-footer .theme-toggle svg{width:12px;height:12px;flex:none}
.membership-pricing{grid-column:1/-1;min-width:0}
.membership-pricing .portal-heading{margin-bottom:8px}
.membership-pricing h3{margin:0;font-size:.95rem}
.membership-pricing table{width:100%;border-collapse:collapse;text-align:left;font-size:.87rem}
.membership-pricing :is(th,td){padding:7px 9px;border-bottom:1px solid var(--line)}
.membership-pricing :is(th,td):last-child{text-align:right;font-variant-numeric:tabular-nums}
.portal-top #portal-theme span{display:none}
@media(max-width:720px){
  #portal-workspace{grid-template-columns:minmax(0,1fr);gap:10px}
  .portal-content{padding:0 12px}
  .portal-sidebar .portal-brand{margin-bottom:4px}
  .portal-top{padding-inline:12px}
  .portal-top-actions{flex-wrap:wrap;gap:6px}
  .portal-sidebar{padding:7px}
  .portal-sidebar a{padding:6px 8px;gap:5px}
  .portal-sidebar .member-menu-button{padding:6px 8px;gap:5px}
  .portal-sidebar a>span{display:inline}
  .portal-sidebar-inner{position:static;height:auto;min-height:0}
  .portal-sidebar-inner nav{overflow:visible}
  .portal-sidebar-footer{display:flex;align-items:center;flex-wrap:wrap;margin-top:7px;padding-top:7px}
  .portal-sidebar-footer .theme-toggle{width:auto;padding:0 8px}
  .portal-account-actions .subtle{padding:0 8px}
  .portal-panels,.portal-cards{grid-template-columns:repeat(auto-fit,minmax(min(100%,288px),1fr))}
}

.workbench-shell{width:calc(100% - clamp(20px,3vw,56px));max-width:none}
.portal-section.portal-workbench{max-width:none}
.portal-workbench>.portal-heading{margin-bottom:8px}
.workspace{grid-template-columns:minmax(0,1.12fr) minmax(350px,1.1fr) minmax(260px,.86fr);gap:clamp(12px,1.15vw,22px);align-items:stretch}
.workspace .preview{display:flex;flex-direction:column}
.preview .card-head{padding:8px 12px;flex-wrap:wrap}
.preview .card-head>div{display:flex;align-items:baseline;gap:8px}
.preview .card-head h2{flex:none}
.preview #room-caption{margin:0;font-size:.8rem}
.preview .state{padding:3px 8px}
#popout-preview{margin-left:auto;min-height:28px;padding:2px 8px;font-size:.8rem;white-space:nowrap}
.workspace .preview-foot{padding-block:5px;font-size:.78rem}
.workspace .preview{align-self:start;height:clamp(240px,var(--preview-height,calc(100dvh - 84px)),860px)}
.workspace .stage{container-type:size;flex:1;min-height:0;height:auto;padding:6px}
.workspace .screen{width:min(70cqw,calc(100cqh * 9 / 19));height:auto}
.workspace .screen img{position:absolute;inset:0}
.workspace .screen.is-popped-out{visibility:hidden}
.phone-popout{position:fixed;z-index:4;inset:16px 20px auto auto;margin:0;width:min(var(--phone-popout-width,calc(min(78dvh,620px) * 9 / 19 + 12px)),calc(100vw - 16px),calc((100dvh - 64px) * 9 / 19 + 12px));max-height:calc(100dvh - 16px);padding:0;color:inherit;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 18px 50px #0008}
.phone-popout .card-head{padding:6px 8px;gap:6px;cursor:grab;touch-action:none;user-select:none}
.phone-popout .card-head:active{cursor:grabbing}
.phone-popout .card-head h2{font-size:.83rem;white-space:nowrap}
.phone-popout .card-head .subtle{min-height:28px;padding:2px 7px;font-size:.8rem}
.phone-popout-stage{position:relative;display:grid;place-items:center;margin:0 5px 5px;aspect-ratio:9/19;background:#101216;border-radius:8px;color:#e6edf8;font-size:.85rem}
.phone-popout-stage canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.phone-popout-resize{position:absolute;right:0;bottom:0;width:24px;height:24px;min-height:0;padding:0;color:#eef4ff;background:#182233e6;border:0;border-radius:7px 0 11px 0;cursor:nwse-resize;touch-action:none}
.phone-popout-resize::after{content:"";position:absolute;right:5px;bottom:5px;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor}

.portal-page .portal-top{position:relative;min-height:56px;gap:16px;align-items:center}
.portal-brand{flex:0 0 108px;min-width:0}
.bidup-logo,.portal-sidebar .bidup-logo{display:inline-flex;align-items:center}
.bidup-logo img{display:block;height:auto}
.portal-sidebar .bidup-logo img{width:112px}
[data-theme=dark] :is(.bidup-logo,.auth-card-brand) img{
  background:#e8f0ff;
  border-radius:7px;
  box-shadow:0 0 0 4px #e8f0ff;
}
.portal-context{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-width:0;min-height:44px;padding:6px 9px;color:var(--muted);background:var(--surface);border:1px solid var(--line);border-radius:10px;font-size:.86rem}
.portal-context:empty{display:none}
.portal-context a{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:6px;color:inherit;text-decoration:none;white-space:nowrap}
.portal-context a:hover,.portal-context a[aria-current]{background:var(--line);color:var(--accent)}
.portal-context a[aria-current]{font-weight:650}
.portal-context-count{font-size:.75rem;padding:0 5px;border:1px solid var(--line);border-radius:5px;font-variant-numeric:tabular-nums}
.resource-import-preview,.resource-private{grid-column:1/-1;min-width:0}
.resource-import-preview ol{max-height:220px;overflow:auto;margin:6px 0;padding-left:22px}
.resource-private>summary{cursor:pointer;color:var(--accent)}
.resource-private-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:9px;margin-top:8px}
.resource-private-fields label:has(textarea){grid-column:1/-1}
.resource-template{align-self:center;justify-self:start;display:inline-flex;align-items:center;text-decoration:none}
.resource-import-authorize{display:flex;align-items:center;gap:6px}
.resource-qr{grid-column:1/-1;text-align:center;overflow-wrap:anywhere}
.resource-status{width:100%;min-width:0;padding:3px 5px;border:1px solid var(--line);border-radius:6px;color:inherit;background:var(--surface)}
.portal-column-picker{position:relative}
.portal-column-picker>summary{cursor:pointer;list-style:none;display:flex;align-items:center}
.portal-column-options{position:absolute;top:100%;left:0;z-index:2;display:grid;gap:3px;min-width:max-content;padding:9px;background:var(--surface);border:1px solid var(--line);border-radius:6px}
.portal-column-options label{display:flex;align-items:center;gap:6px}
@media(max-width:720px){
  .portal-page .portal-top{gap:8px}
  .portal-brand{flex-basis:auto}
}
.workspace .right{display:flex;flex-direction:column;gap:10px}
.workspace .bid-history[open]{flex:1}
.bid-history .history-list{max-height:none;padding:0 12px 8px}
.bid-history .history-list.show-older{max-height:min(48dvh,360px)}
.bid-history .history-list li>span:last-child{text-align:right}
.bid-history-actions:has(button:not([hidden])){display:flex;justify-content:flex-end;padding:0 12px 9px}
.bid-history-actions button{min-height:29px;font-size:.8rem}
.workspace .limits .history{border-top-color:var(--line)}
@media(max-width:1040px){
  .workspace{grid-template-columns:minmax(245px,.92fr) minmax(0,1.08fr);align-items:start}
  .workspace .limits{grid-column:1/-1}
  .workspace .screen{width:min(84cqw,calc(100cqh * 9 / 19))}
}
@media(max-width:690px){
  .workspace{grid-template-columns:minmax(0,1fr)}
}
