/* Nexus Console — 设计语言对齐 grok2api (shadcn/ui + Tailwind v4)
   token 一手来源：chenyme/grok2api frontend/src/index.css
   结构约定：上半部分为顶层规则（每个选择器只出现一次），
   下半部分为全部 .log-toolbar{display:flex; align-items:center; gap:8px; flex-wrap:wrap; flex-shrink:0; margin-bottom:12px}
.log-toolbar>select{width:auto; min-width:104px; flex:0 0 auto; background:transparent; color:var(--muted-foreground); font-size:12px}
.log-toolbar>select:hover{background:var(--field); color:var(--foreground)}
.log-toolbar>#log-count{margin-left:auto}
@media/@keyframes。改样式请直接改对应规则，
   不要在文件尾部追加同名选择器 —— 那会让它越过 @media 反压响应式。 */

:root{--radius:0.5rem; --radius-sm:calc(var(--radius) - 2px); --radius-md:var(--radius); --radius-lg:calc(var(--radius) + 2px); --background:oklch(0.995 0 0); --foreground:oklch(0.145 0 0); --card:oklch(0.975 0.002 90); --popover:oklch(1 0 0); --primary:oklch(0.12 0 0); --primary-foreground:oklch(0.985 0 0); --secondary:oklch(0.965 0.002 90); --secondary-foreground:oklch(0.2 0 0); --muted:oklch(0.965 0.002 90); --muted-foreground:oklch(0.505 0 0); --accent:oklch(0.95 0.003 90); --destructive:oklch(0.58 0.22 27); --border:oklch(0.91 0 0); --input:oklch(0.9 0 0); --ring:var(--border); --sidebar:oklch(0.995 0 0); --sidebar-border:oklch(0.93 0 0); --field:oklch(0.945 0.002 90); --field-hover:oklch(0.928 0.002 90); --info:oklch(0.68 0.14 235); --info-ink:oklch(0.52 0.14 245); --success:oklch(0.64 0.15 155); --success-ink:oklch(0.5 0.13 158); --warning:oklch(0.75 0.15 80); --warning-ink:oklch(0.52 0.12 75); --danger-ink:oklch(0.52 0.2 27); --shell-w:232px}
.dark{--background:oklch(0.13 0 0); --foreground:oklch(0.95 0 0); --card:oklch(0.18 0 0); --popover:oklch(0.17 0 0); --primary:oklch(0.96 0 0); --primary-foreground:oklch(0.12 0 0); --secondary:oklch(0.21 0 0); --secondary-foreground:oklch(0.94 0 0); --muted:oklch(0.21 0 0); --muted-foreground:oklch(0.64 0 0); --accent:oklch(0.24 0 0); --destructive:oklch(0.65 0.2 28); --border:oklch(0.27 0 0); --input:oklch(0.3 0 0); --sidebar:oklch(0.145 0 0); --sidebar-border:oklch(0.25 0 0); --field:oklch(0.235 0 0); --field-hover:oklch(0.265 0 0); --info:oklch(0.74 0.12 235); --info-ink:oklch(0.78 0.1 235); --success:oklch(0.72 0.13 155); --success-ink:oklch(0.76 0.11 155); --warning:oklch(0.8 0.13 80); --warning-ink:oklch(0.84 0.11 80); --danger-ink:oklch(0.72 0.16 28)}
*{box-sizing:border-box; border-color:var(--border); scrollbar-width:thin; scrollbar-color:var(--border) transparent}
[hidden]{display:none!important}
*::-webkit-scrollbar{width:5px; height:5px}
*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{border-radius:5px; background:var(--border)}
html.dark{color-scheme:dark}
html{color-scheme:light; background:var(--background); min-height:100%}
body{min-height:100%; margin:0; background:var(--background); color:var(--foreground); font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif; font-size:14px; letter-spacing:0; text-rendering:optimizeLegibility}
button{font-family:inherit}
::selection{background:color-mix(in oklab,var(--primary) 24%,transparent)}
:focus-visible{outline-color:var(--ring)}
h1,h2,h3,h4{margin:0; font-weight:500; letter-spacing:0}
a{color:inherit}
.app{min-height:100vh; background:var(--background)}
.sidebar{position:fixed; inset:0 auto 0 0; z-index:40; display:flex; flex-direction:column; width:var(--shell-w); height:100vh; padding:24px 16px 16px; background:var(--sidebar); overflow:hidden}
.sidebar-head{display:flex; align-items:center; justify-content:space-between; gap:8px; height:28px; flex-shrink:0; padding:0 8px}
.brand-mark{display:inline-flex; align-items:center; gap:8px; font-size:15px; font-weight:600; color:var(--foreground); text-decoration:none; letter-spacing:0}
.brand-mark svg{width:16px; height:16px; color:var(--muted-foreground)}
.brand-badge{font-size:11px; font-weight:400; color:var(--muted-foreground); letter-spacing:.02em}
.nav{margin-top:24px; min-height:0; flex:0 0 auto; overflow-y:auto; overscroll-behavior:contain; padding:0 0 8px}
.nav-heading{padding:0 10px 8px; color:var(--foreground); font-size:12px; font-weight:400}
.nav-group{display:grid; gap:2px}
.panel-tab{display:flex; align-items:center; gap:8px; width:100%; height:32px; padding:0 10px; border:0; border-radius:var(--radius-md); background:transparent; color:var(--muted-foreground); font-size:12px; font-weight:400; text-align:left; cursor:pointer; transition:background-color .12s ease,color .12s ease}
.panel-tab>svg{width:16px; height:16px; flex-shrink:0; stroke-width:1.8; fill:none; fill-opacity:0}
.panel-tab:hover{background:color-mix(in oklab,var(--secondary) 55%,transparent); color:var(--foreground)}
.panel-tab.active{background:color-mix(in oklab,var(--secondary) 60%,transparent); color:var(--foreground)}
.panel-tab.active>svg{fill:currentColor; fill-opacity:.14}
.panel-tab .tab-badge{margin-left:auto; color:var(--muted-foreground); font-size:11px; font-variant-numeric:tabular-nums}
.sidebar-status{display:grid; gap:6px; padding:0 2px}
.sidebar-updated{padding:0 2px; color:var(--muted-foreground); font-size:11px}
.sidebar-account{display:flex; align-items:center; gap:2px; height:32px; padding:0 4px 0 8px}
.sidebar-account>.who{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted-foreground); font-size:12px}
.main-wrap{display:flex; min-height:100vh; flex-direction:column; padding-left:var(--shell-w)}
.mobile-bar{display:none}
.sidebar-scrim{display:none}
.content{width:100%; max-width:1320px; margin:0 auto; flex:1; padding:24px 32px 36px; min-width:0}
.metric{min-width:0; padding:13px 14px; border-radius:var(--radius-lg); background:var(--card)}
.metric span{display:block; color:var(--muted-foreground); font-size:12px}
.metric b{display:block; margin-top:5px; font-size:18px; font-weight:500; line-height:1.1; letter-spacing:0; font-variant-numeric:tabular-nums; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.operation-banner{margin-bottom:16px; padding:16px; border-radius:var(--radius-lg); background:var(--card)}
.operation-banner>div:first-child{display:flex; align-items:baseline; justify-content:space-between; gap:12px; font-size:12px}
.operation-banner b{font-weight:500}
.operation-banner span{color:var(--muted-foreground)}
.operation-progress{height:4px; margin-top:10px; border-radius:999px; background:var(--secondary); overflow:hidden}
.operation-progress span{display:block; width:0; height:100%; background:var(--primary); transition:width .25s ease}
.panel-view{display:none; min-width:0; padding:18px; border-radius:var(--radius-lg); background:var(--card)}
.panel-view.active{display:block; animation:view-in .16s ease-out}
.section-head{display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:12px}
.section-head h2{font-size:15px; font-weight:500}
.subsection-head h3,.compact-head h3{font-size:13px; font-weight:500}
.section-head p,.subsection-head p{margin:4px 0 0; color:var(--muted-foreground); font-size:12px; line-height:1.55}
.subsection-head{display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:10px; margin-top:20px}
.actions{display:flex; align-items:center; gap:6px; flex-wrap:wrap}
.form-actions{margin-top:16px}
.registration-target-panel{border-radius:var(--radius-md); background:var(--background); padding:16px; margin-bottom:16px}
.form-band{border-radius:var(--radius-md); background:var(--background); padding:16px; margin-bottom:16px}
.compact-head{margin-bottom:12px}
.details-block{margin-top:0}
.notice{margin-bottom:16px; padding:10px 12px; border-radius:var(--radius-md); background:color-mix(in oklab,var(--warning) 12%,var(--background)); color:var(--warning-ink); font-size:12px; line-height:1.6}
.btn{display:inline-flex; align-items:center; justify-content:center; gap:6px; height:32px; padding:0 12px; border:0; border-radius:999px; background:var(--secondary); color:var(--secondary-foreground); font-size:12px; font-weight:500; white-space:nowrap; cursor:pointer; transition:background-color .12s ease,color .12s ease,opacity .12s ease}
.btn>svg{width:14px; height:14px; flex-shrink:0; stroke-width:1.9; fill:none}
.btn:disabled{opacity:.5; cursor:not-allowed; pointer-events:none}
.btn:focus-visible{outline:none; box-shadow:0 0 0 1px var(--ring)}
.btn-primary{background:var(--primary); color:var(--primary-foreground)}
.btn-primary:hover{background:color-mix(in oklab,var(--primary) 84%,transparent)}
.btn-secondary{background:var(--secondary); color:var(--secondary-foreground)}
.btn-secondary:hover{background:color-mix(in oklab,var(--secondary) 80%,var(--foreground) 6%)}
.btn-danger{background:color-mix(in oklab,var(--destructive) 12%,transparent); color:var(--danger-ink)}
.btn-danger:hover{background:color-mix(in oklab,var(--destructive) 20%,transparent)}
.icon-btn{display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; flex-shrink:0; border:0; border-radius:var(--radius-md); background:transparent; color:var(--muted-foreground); cursor:pointer; transition:background-color .12s ease,color .12s ease}
.icon-btn>svg{width:15px; height:15px; stroke-width:1.8; fill:none}
.icon-btn:hover{background:color-mix(in oklab,var(--secondary) 55%,transparent); color:var(--foreground)}
.dark .theme-icon-light,html:not(.dark) .theme-icon-dark{display:none}
input{font-family:inherit; width:100%; min-width:0; border:0; border-radius:var(--radius-md); background:var(--field); color:var(--foreground); font-size:12px; transition:background-color .12s ease,box-shadow .12s ease; height:32px; padding:0 12px}
select{font-family:inherit; width:100%; min-width:0; border:0; border-radius:var(--radius-md); background:var(--field); color:var(--foreground); font-size:12px; transition:background-color .12s ease,box-shadow .12s ease; height:32px; padding:0 12px; appearance:none; padding-right:32px; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat:no-repeat; background-position:right 9px center; background-size:13px; cursor:pointer}
textarea{font-family:inherit; width:100%; min-width:0; border:0; border-radius:var(--radius-md); background:var(--field); color:var(--foreground); font-size:12px; transition:background-color .12s ease,box-shadow .12s ease; padding:8px 12px; line-height:1.6; resize:vertical}
input:hover,select:hover,textarea:hover{background:var(--field-hover)}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:none; box-shadow:0 0 0 1px var(--ring)}
input[readonly]{color:var(--muted-foreground); cursor:default}
input::placeholder,textarea::placeholder{color:var(--muted-foreground)}
input[type=search]{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>"); background-repeat:no-repeat; background-position:10px center; background-size:13px; padding-left:32px}
input[type=checkbox]{width:15px; height:15px; min-width:15px; padding:0; accent-color:var(--primary); cursor:pointer}
label>span{display:block; margin-bottom:6px; color:var(--muted-foreground); font-size:12px; font-weight:400}
.field-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px}
.field-grid.three-col{grid-template-columns:repeat(3,minmax(0,1fr))}
.field-grid .wide,.proxy-fields .wide{grid-column:span 2}
.field-row{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; align-items:end}
.compact-row{grid-template-columns:minmax(120px,170px) auto auto}
.mail-add-row{grid-template-columns:minmax(190px,1fr) minmax(190px,1fr) auto}
.button-field{display:flex; align-items:flex-end}
.textarea-field{display:block}
.security-fields{max-width:720px; grid-template-columns:repeat(3,minmax(0,1fr))}
.field-grid.three-col.proxy-fields{grid-template-columns:repeat(12,minmax(0,1fr))}
.proxy-fields{max-width:1040px}
.proxy-fields>label{grid-column:span 3}
.proxy-fields>label:has(#proxy-host){grid-column:span 4}
.proxy-fields>label:has(#proxy-port){grid-column:span 2}
.proxy-fields>label:has(#proxy-scheme){grid-column:span 2}
.proxy-fields>label:has(#proxy-change-url){grid-column:span 6}
.proxy-fields>label:has(#proxy-ip-override){grid-column:span 4}
.toggle-field{display:flex; align-items:center; gap:8px; min-height:32px; padding-top:24px}
.toggle-field span{margin:0; color:var(--foreground); font-size:12px}
.check-control{display:inline-flex; align-items:center; gap:6px; cursor:pointer}
.check-control span{margin:0; color:var(--muted-foreground); font-size:12px}
.inline-result{color:var(--muted-foreground); font-size:12px; overflow-wrap:anywhere}
.segmented{display:inline-flex; width:max-content; max-width:100%; height:32px; align-items:center; gap:2px; padding:2px; border:0; border-radius:999px; background:var(--muted); overflow-x:auto; scrollbar-width:none}
.segmented::-webkit-scrollbar{display:none}
.segmented button{display:inline-flex; align-items:center; justify-content:center; gap:4px; flex:0 0 auto; height:28px; padding:0 12px; border:0; border-radius:999px; background:transparent; color:var(--muted-foreground); font-size:12px; font-weight:500; white-space:nowrap; cursor:pointer; transition:background-color .15s ease,color .15s ease}
.segmented button:hover{color:var(--foreground)}
.segmented button.active{background:var(--background); color:var(--foreground); box-shadow:0 1px 2px rgba(0,0,0,.06)}
.register-platform{margin-top:10px}
.mail-compose-view,.gateway-view{display:none}
.register-mode.active,.mail-compose-view.active,.gateway-view.active{display:block}
.register-mode{display:none; margin-top:16px}
.mail-composer>.segmented{margin-bottom:12px}
.status-pill,.stat{display:inline-flex; align-items:center; justify-content:center; gap:4px; height:20px; padding:0 8px; border:1px solid transparent; border-radius:999px; background:color-mix(in oklab,var(--secondary) 70%,transparent); color:var(--muted-foreground); font-size:12px; font-weight:400; line-height:1; white-space:nowrap}
.status-pill.success{background:color-mix(in oklab,var(--success) 13%,transparent); color:var(--success-ink)}
.status-pill.warning{background:color-mix(in oklab,var(--warning) 16%,transparent); color:var(--warning-ink)}
.status-pill.danger,.status-pill.failed{background:color-mix(in oklab,var(--destructive) 11%,transparent); color:var(--danger-ink)}
.status-pill.running{background:color-mix(in oklab,var(--info) 13%,transparent); color:var(--info-ink)}
.status-pill.complete{background:color-mix(in oklab,var(--success) 13%,transparent); color:var(--success-ink)}
.updated-at{color:var(--muted-foreground); font-size:11px; white-space:nowrap}
.filter-count{display:inline-flex; align-items:center; justify-content:center; gap:4px; height:16px; padding:0 4px; border:1px solid transparent; border-radius:999px; background:var(--primary); color:var(--primary-foreground); font-size:11px; font-weight:400; line-height:1; white-space:nowrap}
.tab-count{display:inline-flex; align-items:center; justify-content:center; gap:4px; height:16px; padding:0 4px; border:1px solid transparent; border-radius:999px; background:var(--background); color:var(--muted-foreground); font-size:11px; font-weight:400; line-height:1; white-space:nowrap}
.segmented button.active .tab-count{background:var(--muted)}
.table-wrap{border-radius:var(--radius-md); background:var(--background); width:100%; min-width:0; overflow:auto}
table{width:100%; border-collapse:collapse; font-size:13px}
.data-table-actions{table-layout:fixed}
th{position:sticky; top:0; z-index:3; height:36px; padding:0 10px; border-bottom:1px solid var(--border); background:var(--background); color:var(--muted-foreground); text-align:left; font-size:12px; font-weight:400; white-space:nowrap}
tbody tr:last-child td{border-bottom:0}
tbody tr{transition:background-color .1s ease}
tbody tr:hover{background:color-mix(in oklab,var(--secondary) 45%,var(--background))}
.empty{padding:32px!important; border-bottom:0!important; color:var(--muted-foreground); text-align:center; font-size:12px}
.empty-block{grid-column:1/-1; padding:32px; color:var(--muted-foreground); text-align:center; font-size:12px}
.account-name-value{white-space:nowrap}
.group-cell small{color:var(--muted-foreground); font-size:11px}
.select-cell{width:1%; padding-left:10px!important; padding-right:2px!important; text-align:center; vertical-align:middle}
.action-head{text-align:center}
.pagination{display:flex; align-items:center; justify-content:flex-end; gap:12px; margin-top:12px; color:var(--muted-foreground); font-size:12px; flex-wrap:wrap}
.pagination label{display:flex; align-items:center; gap:6px}
.pagination-actions{display:flex; gap:6px}
.task-log.following{scroll-behavior:smooth}
.task-layout{display:grid; grid-template-columns:minmax(340px,420px) minmax(0,1fr); gap:20px; min-width:0}
.log-pane{min-width:0; margin-top:20px}
.task-counts{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:16px}
.task-counts div{border-radius:var(--radius-md); background:var(--background); padding:12px; text-align:center}
.task-counts b{display:block; font-size:18px; font-weight:500; line-height:1.15; font-variant-numeric:tabular-nums}
.task-counts span{display:block; margin-top:2px; color:var(--muted-foreground); font-size:11px}
.account-layout{display:grid; grid-template-columns:minmax(300px,360px) minmax(0,1fr); gap:20px; align-items:start}
.account-side{min-width:0; display:grid; gap:12px; position:sticky; top:24px; align-self:start}
.account-main{min-width:0; display:grid; gap:12px}
.account-metric{border-radius:var(--radius-md); background:var(--background); padding:12px 12px}
.account-metric span{display:block; color:var(--muted-foreground); font-size:11px}
.account-metric b{display:block; margin-top:4px; font-size:18px; font-weight:500; line-height:1.1; font-variant-numeric:tabular-nums}
.account-metric small{display:block; margin-top:4px; color:var(--muted-foreground); font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.account-metric.warning b{color:var(--warning-ink)}
.account-viewbar{border-radius:var(--radius-md); background:var(--background); display:grid; gap:8px; padding:12px}
.account-view-tabs{width:100%; max-width:100%}
.account-view-tabs button{gap:4px}
.account-filter-popover label>span{margin-bottom:4px; font-size:11px}
.account-selection-bar>span{margin-right:auto}
.account-selection-bar b{font-weight:500}
.account-action-menu{position:relative; display:inline-block}
.account-action-menu summary::-webkit-details-marker{display:none}
.account-action-menu[open] summary{background:var(--secondary); color:var(--foreground)}
.account-action-menu-popover{position:absolute; top:calc(100% + 5px); right:0; z-index:30; display:grid; gap:2px; min-width:154px; padding:4px; border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--popover); box-shadow:0 10px 30px rgba(0,0,0,.1)}
.account-action-menu-popover button:hover{background:var(--accent)}
.account-action-menu-popover .danger-action{color:var(--danger-ink)}
.account-action-menu-popover .danger-action:hover{background:color-mix(in oklab,var(--destructive) 10%,transparent)}
.toolbar{display:flex; align-items:center; gap:8px; min-width:0; margin-bottom:12px; flex-wrap:wrap}
.toolbar>input{flex:1 1 240px}
.toolbar>select{flex:0 1 170px; width:auto}
.toolbar>.actions{margin-left:auto}
.gateway-access{display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:16px}
.copy-field{display:flex; align-items:stretch; gap:6px; min-width:0}
.copy-field .btn{flex:0 0 auto}
.gateway-metrics{display:grid; grid-template-columns:repeat(auto-fit,minmax(128px,1fr)); gap:8px; margin:16px 0}
.gateway-metrics>div{border-radius:var(--radius-md); background:var(--background); padding:12px 12px}
.gateway-metrics span{display:block; color:var(--muted-foreground); font-size:11px}
.gateway-metrics b{display:block; margin-top:4px; font-size:18px; font-weight:500; line-height:1.1; font-variant-numeric:tabular-nums}
.gateway-accounts{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px}
.gateway-account{border-radius:var(--radius-md); background:var(--background); display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; padding:12px; position:relative; overflow:hidden}
.gateway-account::before{content:""; position:absolute; inset:0 auto 0 0; width:2px; background:var(--success)}
.gateway-account.cooling::before{background:var(--warning)}
.gateway-account>span:first-child{display:grid; min-width:0}
.gateway-account b{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:500}
.gateway-account small{margin-top:2px; color:var(--muted-foreground); font-size:11px}
.gateway-account>span:last-child{flex:0 0 auto; color:var(--muted-foreground); font-size:11px; white-space:nowrap}
.modal-dialog{width:min(540px,calc(100vw - 24px)); max-height:calc(100vh - 40px); padding:0; border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--popover); color:var(--foreground); box-shadow:0 20px 50px rgba(0,0,0,.16); overflow:auto}
.modal-dialog::backdrop{background:rgba(0,0,0,.5); backdrop-filter:blur(2px)}
.modal-head{display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:16px 20px 0}
.modal-head h3{font-size:15px; font-weight:500}
.modal-head p{margin:4px 0 0; color:var(--muted-foreground); font-size:12px; overflow-wrap:anywhere}
.modal-close{display:flex; align-items:center; justify-content:center; width:26px; height:26px; flex-shrink:0; padding:0; border:0; border-radius:var(--radius-md); background:transparent; color:var(--muted-foreground); font-size:20px; line-height:1; cursor:pointer}
.modal-close:hover{background:var(--accent); color:var(--foreground)}
.modal-body{display:grid; gap:16px; padding:16px 20px}
.group-current{border-radius:var(--radius-md); background:var(--background); display:flex; flex-direction:column; gap:2px; padding:10px 12px}
.group-current span{color:var(--muted-foreground); font-size:11px}
.group-current b{font-size:13px; font-weight:500; overflow-wrap:anywhere}
.group-warning{margin:0}
.group-warning.gateway-safe{background:color-mix(in oklab,var(--success) 12%,var(--background)); color:var(--success-ink)}
.modal-actions{display:flex; justify-content:flex-end; gap:8px; padding:0 20px 16px}
.toast-region{position:fixed; right:20px; bottom:20px; z-index:1000; display:grid; gap:8px; width:min(348px,calc(100vw - 32px)); pointer-events:none}
.toast{display:flex; align-items:flex-start; gap:8px; padding:12px 12px; border:1px solid var(--border); border-radius:var(--radius-lg); background:var(--popover); color:var(--foreground); font-size:12px; line-height:1.55; box-shadow:0 8px 26px rgba(0,0,0,.1); opacity:0; transform:translateY(8px); transition:opacity .18s ease,transform .18s ease; overflow-wrap:anywhere}
.toast::before{content:""; width:6px; height:6px; margin-top:4px; flex-shrink:0; border-radius:999px; background:var(--muted-foreground)}
.toast.show{opacity:1; transform:none}
.toast.success::before{background:var(--success)}
.toast.warning::before{background:var(--warning)}
.toast.error::before{background:var(--destructive)}
.account-metrics{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0 0 12px}
.account-toolbar{display:flex; grid-template-columns:minmax(0,1fr) max-content max-content; gap:8px; align-items:center; padding:12px; flex-wrap:wrap; margin-bottom:12px}
.account-toolbar>.account-view-tabs{flex:0 0 auto; width:auto}
.account-toolbar>input[type=search]{flex:1 1 240px; min-width:180px}
.account-toolbar>.btn{flex:0 0 auto}
.account-toolbar>#account-stat{margin-left:auto; flex:0 0 auto}
.account-filter-popover{border-radius:var(--radius-md); background:var(--background); display:grid; gap:8px; padding:12px; grid-template-columns:repeat(3,minmax(170px,1fr)); margin-bottom:12px; box-shadow:none}
.account-selection-bar{display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:var(--radius-md); background:color-mix(in oklab,var(--primary) 8%,var(--background)); color:var(--foreground); font-size:12px; margin-bottom:12px}
.statusbar{display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:10px}
.statusbar-gap{flex:1; min-width:0}
.statusbar>.updated-at{flex:0 0 auto}
.statusbar>.btn{flex:0 0 auto}
.sidebar-foot{flex-shrink:0; margin-top:16px; padding-top:12px; border-top:1px solid var(--sidebar-border); display:block; gap:8px}
.btn-small{height:32px; padding:0 10px; font-size:12px}
.segmented.compact{height:32px}
.segmented.compact button{height:28px; padding:0 10px; font-size:12px}
.account-filter-popover select{height:32px}
.account-action-menu-popover button{display:flex; align-items:center; width:100%; height:32px; padding:0 8px; border:0; border-radius:var(--radius-sm); background:transparent; color:var(--foreground); font-size:12px; text-align:left; cursor:pointer}
.pagination select{width:auto; height:32px; padding:0 24px 0 8px}
.copy-field code{display:flex; align-items:center; flex:1; min-width:0; min-height:32px; padding:8px 12px; border-radius:var(--radius-md); background:var(--field); color:var(--foreground); font:11.5px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace; overflow-wrap:anywhere; word-break:break-word; font-size:12px}
.task-log{width:100%; min-width:0; margin:0; padding:12px 16px; border-radius:var(--radius-md); background:var(--background); color:var(--foreground); font:11.5px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace; white-space:pre-wrap; overflow:auto; overflow-wrap:anywhere; height:392px; font-size:12px}
.result-box{width:100%; min-width:0; margin:0; padding:12px 16px; border-radius:var(--radius-md); background:var(--background); color:var(--muted-foreground); font:11.5px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace; white-space:pre-wrap; overflow:auto; overflow-wrap:anywhere; min-height:96px; max-height:230px; margin-top:12px; font-size:12px}
.registration-target-fields{margin-top:12px; grid-template-columns:repeat(2,minmax(0,1fr))}
.registration-target-fields>label{grid-column:auto}
.registration-target-fields>label:has(#registration-target-url),.registration-target-fields>label:has(#registration-target-signup),.registration-target-fields>label:has(#registration-target-turnstile),.registration-target-fields>label:has(#registration-target-notes){grid-column:span 2}
.field-grid.three-col.registration-target-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.task-controls-pane{min-width:0; display:flex; flex-direction:column; align-items:stretch}
.task-controls-pane>.segmented{order:1; flex:0 0 auto}
.task-controls-pane>.register-platform{order:2; flex:0 0 auto}
.task-controls-pane>.register-mode{order:3; flex:0 0 auto}
.task-controls-pane>.registration-target-panel{order:4; flex:0 0 auto; margin:16px 0 0}
.inline-select{display:flex; align-items:center; gap:8px; flex:0 0 auto}
.inline-select>span{margin:0; color:var(--muted-foreground); font-size:12px; font-weight:400; white-space:nowrap}
.inline-select>select{width:auto; min-width:120px}
.bare-select{width:auto; min-width:104px; flex:0 0 auto; background:transparent; color:var(--muted-foreground); font-size:12px}
.bare-select:hover{background:var(--field); color:var(--foreground)}
.overview{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:12px}
.health-strip{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; margin:-4px 0 12px}
.health-item{position:relative; display:grid; min-width:0; gap:2px; padding:8px 10px 8px 13px; border:0; border-radius:var(--radius-md); background:var(--card); color:var(--foreground); text-align:left; cursor:pointer}
.health-item::before{content:""; position:absolute; inset:10px auto 10px 0; width:3px; border-radius:0 3px 3px 0; background:var(--muted-foreground)}
.health-item.success::before{background:var(--success)}
.health-item.warning::before{background:var(--warning)}
.health-item.danger::before{background:var(--destructive)}
.health-item span,.health-item small{overflow:hidden; color:var(--muted-foreground); font-size:11px; text-overflow:ellipsis; white-space:nowrap}
.health-item b{overflow:hidden; font-size:13px; font-weight:500; text-overflow:ellipsis; white-space:nowrap}
.health-item:hover{background:var(--secondary)}
.row-actions{display:flex; align-items:center; justify-content:flex-end; gap:2px}
.row-btn{display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; flex-shrink:0; border:0; border-radius:var(--radius-sm); background:transparent; color:var(--muted-foreground); cursor:pointer; opacity:0; transition:opacity .12s ease,background-color .12s ease,color .12s ease}
.row-btn>svg{width:14px; height:14px; fill:none; stroke-width:1.9}
.row-btn:hover{background:var(--field); color:var(--foreground)}
tbody tr:hover .row-btn,.row-btn:focus-visible,.account-action-menu[open] ~ .row-btn,.row-actions:focus-within .row-btn{opacity:1}
.account-action-menu summary{display:flex; align-items:center; justify-content:center; width:26px; height:26px; margin:0 auto; border-radius:var(--radius-sm); background:transparent; color:var(--muted-foreground); font-size:16px; line-height:1; cursor:pointer; list-style:none; border:0}
.account-action-menu summary:hover{background:var(--field); color:var(--foreground)}
.tiny-note{color:var(--muted-foreground); font-size:11px}
.account-data-table{min-width:1040px; table-layout:fixed}
.account-col-select{width:34px}
.account-col-actions{width:92px}
.account-col-email{width:19%}
.account-col-password{width:13%}
.account-col-key{width:23%}
.account-col-group{width:12%}
.account-col-quota{width:8%}
.account-col-status{width:11%}
.account-col-created{width:14%}
.action-cell{text-align:right; padding-right:8px!important}
.account-col-created+td,td[data-label="创建时间"]{white-space:nowrap; font-variant-numeric:tabular-nums}
.credential,.key-value{display:block; max-width:100%; font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace; color:var(--muted-foreground); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.wrap-value{display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.group-cell{display:block; min-width:0; flex-direction:column; gap:2px}
.group-cell b{font-size:12px; font-weight:500}
td{max-width:360px; padding:8px 10px; border-bottom:1px solid var(--border); vertical-align:middle; height:40px}

.proxy-pool-metrics{grid-template-columns:repeat(4,minmax(0,1fr)); margin:0 0 16px}
.proxy-pool-toolbar{align-items:center}
.proxy-pool-toolbar>input{flex:1 1 220px; min-width:200px}
.proxy-pool-toolbar>.segmented{flex:0 0 174px; min-width:174px}
.proxy-pool-toolbar>select{flex:0 1 122px; width:auto; min-width:110px; padding-left:10px; padding-right:28px}
.proxy-pool-toolbar>.check-control{height:32px; flex:0 0 auto; padding:0 10px; border-radius:var(--radius-md); background:var(--field)}
.proxy-pool-toolbar>.actions{flex:0 0 auto; margin-left:auto}
.proxy-pool-toolbar>.actions .btn{padding-left:10px; padding-right:10px}
.proxy-pool-resultbar{display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:28px; margin-bottom:8px; color:var(--muted-foreground); font-size:12px}
.proxy-pool-resultbar b{color:var(--foreground); font-size:14px; font-weight:500; font-variant-numeric:tabular-nums}
.proxy-pool-table{min-width:1040px; table-layout:fixed}
.proxy-pool-table th:nth-child(1){width:22%}
.proxy-pool-table th:nth-child(2){width:9%}
.proxy-pool-table th:nth-child(3){width:18%}
.proxy-pool-table th:nth-child(4){width:11%}
.proxy-pool-table th:nth-child(5){width:13%}
.proxy-pool-table th:nth-child(6){width:9%}
.proxy-pool-table th:nth-child(7){width:13%}
.proxy-pool-table th:nth-child(8){width:5%}
.proxy-pool-endpoint,.proxy-pool-exit{display:block; max-width:100%; overflow:hidden; color:var(--foreground); font:11.5px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace; text-overflow:ellipsis; white-space:nowrap}
.proxy-pool-location{display:grid; min-width:0}
.proxy-pool-location b{overflow:hidden; font-size:12px; font-weight:500; text-overflow:ellipsis; white-space:nowrap}
.proxy-pool-location small{overflow:hidden; margin-top:2px; color:var(--muted-foreground); font-size:11px; text-overflow:ellipsis; white-space:nowrap}
.proxy-pool-latency{display:inline-flex; align-items:center; gap:6px; font-variant-numeric:tabular-nums; white-space:nowrap}
.proxy-pool-latency::before{content:""; width:6px; height:6px; flex:0 0 auto; border-radius:999px; background:var(--success)}
.proxy-pool-purity{display:grid; grid-template-columns:32px minmax(36px,1fr); align-items:center; gap:6px; font-variant-numeric:tabular-nums}
.proxy-pool-purity>i{display:block; height:4px; border-radius:999px; background:var(--muted); overflow:hidden}
.proxy-pool-purity>i>i{display:block; height:100%; border-radius:999px; background:var(--success)}
.proxy-pool-clean{color:var(--success-ink)}
.proxy-pool-risk{color:var(--danger-ink)}
.proxy-pool-copy{opacity:1}

@keyframes view-in{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
@media(min-width:1101px){
  .task-controls-pane{
    position:sticky;
    top:22px;
    align-self:start;
    max-height:calc(100vh - 60px);
    overflow-y:auto;
    padding-right:10px;
  }
}
@media(max-width:1400px){
  .proxy-pool-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:1240px){
  .task-layout,.account-layout{grid-template-columns:1fr}
  .task-controls-pane{position:static;max-height:none;padding-right:0;padding-bottom:16px}
  .account-side{position:static}
  .gateway-accounts,.gateway-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .field-grid.three-col,.proxy-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
  .field-grid.three-col.proxy-fields>label{grid-column:span 1}
  .field-grid.three-col.proxy-fields>label:has(#proxy-host),
  .field-grid.three-col.proxy-fields>label:has(#proxy-port),
  .field-grid.three-col.proxy-fields>label:has(#proxy-scheme),
  .field-grid.three-col.proxy-fields>label:has(#proxy-ip-override){grid-column:span 1}
  .field-grid.three-col.proxy-fields>label:has(#proxy-change-url){grid-column:span 2}
}
@media(max-width:1024px){
  .main-wrap{padding-left:0}
  .content{padding:12px 16px 40px}
  .sidebar{
    width:280px;
    transform:translateX(-100%);
    transition:transform .22s cubic-bezier(.22,1,.36,1);
    box-shadow:none;
  }
  body.nav-open .sidebar{transform:none;box-shadow:0 0 40px rgba(0,0,0,.18)}
  body.nav-open .sidebar-scrim{display:block;position:fixed;inset:0;z-index:35;background:rgba(0,0,0,.4)}
  .mobile-bar{
    position:sticky;
    top:0;
    z-index:30;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    height:48px;
    padding:0 10px;
    border-bottom:1px solid var(--border);
    background:var(--background);
  }
  .mobile-title{font-size:13px;font-weight:600}
  .overview{grid-template-columns:repeat(2,minmax(0,1fr))}
  .section-head,.subsection-head{flex-direction:column;align-items:stretch}
  .panel-view{padding:12px}
}
@media(max-width:640px){
  .content{padding:10px 12px 40px}
  .overview,.gateway-metrics,.gateway-accounts,.account-metrics,.task-counts{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .health-strip{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-top:-5px; overflow:visible}
  .health-item{min-height:44px; padding:6px 8px 6px 12px; border-radius:var(--radius-md)}
  .health-item::before{inset:8px auto 8px 0; width:2px}
  .health-item span{font-size:10px}
  .health-item b{font-size:11.5px}
  .health-item small{display:none}
  .field-grid,.field-grid.three-col,.field-grid.two-col,.proxy-fields,
  .gateway-access,.security-fields,.field-row,.compact-row,.mail-add-row{grid-template-columns:1fr}
  .field-grid.three-col.proxy-fields{grid-template-columns:1fr}
  .field-grid.three-col.proxy-fields>label,
  .field-grid.three-col.proxy-fields>label:has(#proxy-host),
  .field-grid.three-col.proxy-fields>label:has(#proxy-port),
  .field-grid.three-col.proxy-fields>label:has(#proxy-scheme),
  .field-grid.three-col.proxy-fields>label:has(#proxy-change-url),
  .field-grid.three-col.proxy-fields>label:has(#proxy-ip-override){grid-column:auto}
  .field-grid .wide,.proxy-fields .wide{grid-column:auto}
  .account-toolbar{grid-template-columns:1fr}
  .segmented{width:100%}
  .segmented button{flex:1}
  .toolbar>.actions{width:100%;margin-left:0}
  .toolbar>.actions .btn{flex:1}
  .proxy-pool-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .proxy-pool-toolbar>.segmented{flex:1 1 100%}
  .proxy-pool-toolbar>select{flex:1 1 calc(50% - 8px)}
  .proxy-pool-toolbar>.check-control{flex:1 1 100%}
  .proxy-pool-resultbar{align-items:flex-start; flex-direction:column; gap:2px}
  .proxy-pool-table-wrap{background:transparent; overflow:visible}
  .proxy-pool-table,.proxy-pool-table tbody{display:block; min-width:0}
  .proxy-pool-table thead{display:none}
  .proxy-pool-table tbody{display:grid; gap:8px}
  .proxy-pool-table tbody tr{position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px 10px; padding:12px; border-radius:var(--radius-md); background:var(--background)}
  .proxy-pool-table tbody tr:hover{background:var(--background)}
  .proxy-pool-table td{display:block; width:auto; max-width:none; height:auto; padding:0; border:0}
  .proxy-pool-table td:nth-child(1){grid-column:1;grid-row:1}
  .proxy-pool-table td:nth-child(2){grid-column:2;grid-row:1;text-align:right}
  .proxy-pool-table td:nth-child(3){grid-column:1 / 3;grid-row:2}
  .proxy-pool-table td:nth-child(4){grid-column:1;grid-row:3}
  .proxy-pool-table td:nth-child(5){grid-column:1 / 3;grid-row:4;padding-right:38px}
  .proxy-pool-table td:nth-child(6){grid-column:2;grid-row:3;text-align:right}
  .proxy-pool-table td:nth-child(7){grid-column:1 / 3;grid-row:5;padding-right:38px}
  .proxy-pool-table td:nth-child(8){position:absolute;right:8px;bottom:8px}
  .proxy-pool-table .empty{grid-column:1 / 3!important;min-height:160px;display:grid;place-items:center}
  .proxy-pool-endpoint,.proxy-pool-exit{white-space:normal;overflow-wrap:anywhere}
  .proxy-pool-table td:nth-child(6),.proxy-pool-table td:nth-child(7){color:var(--muted-foreground);font-size:11px}
  .proxy-pool-table td:nth-child(6)::before,.proxy-pool-table td:nth-child(7)::before{color:var(--muted-foreground);font-size:9px}
  .proxy-pool-table .proxy-pool-exit{color:var(--muted-foreground);font-size:10.5px}
  .proxy-pool-location{display:flex;align-items:baseline;gap:6px}
  .proxy-pool-location small{margin:0}
  .proxy-pool-purity{max-width:100%}
  .account-data-table-wrap,.egress-table-wrap{background:transparent;overflow:visible}
  .account-data-table,.account-data-table tbody,.egress-table,.egress-table tbody{display:block;min-width:0;width:100%}
  .account-data-table thead,.egress-table thead{display:none}
  .account-data-table tbody,.egress-table tbody{display:grid;gap:8px}
  .account-data-table tbody tr,.egress-table tbody tr{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;padding:42px 12px 12px;border-radius:var(--radius-md);background:var(--background)}
  .account-data-table tbody tr:hover,.egress-table tbody tr:hover{background:var(--background)}
  .account-data-table td,.egress-table td{display:grid;gap:3px;width:auto;max-width:none;height:auto;padding:0;border:0;min-width:0}
  .account-data-table td::before,.egress-table td::before{content:attr(data-label);color:var(--muted-foreground);font-size:10px;line-height:1.2}
  .account-data-table td:nth-child(1){position:absolute;left:12px;top:13px;display:block}
  .account-data-table td:nth-child(1)::before,.account-data-table td:nth-child(9)::before,.egress-table td:nth-child(9)::before{display:none}
  .account-data-table td:nth-child(2),.account-data-table td:nth-child(4),.egress-table td:nth-child(1),.egress-table td:nth-child(2){grid-column:1 / 3}
  .account-data-table td:nth-child(9),.egress-table td:nth-child(9){position:absolute;right:10px;top:9px;display:block}
  .account-data-table .credential,.account-data-table .wrap-value,.egress-table .credential{white-space:normal;overflow-wrap:anywhere}
  .account-data-table .row-btn,.egress-table .row-btn{opacity:1}
  .account-data-table .empty,.egress-table .empty{grid-column:1 / 3!important;min-height:140px;display:grid;place-items:center;padding:16px!important}
  .egress-toolbar>input{flex:1 1 100%}
  .egress-toolbar>select{flex:1 1 100%;width:100%}
  .section-head{gap:8px; margin-bottom:12px}
  .subsection-head{gap:8px; margin-top:16px; margin-bottom:8px}
  .task-log{height:220px; max-height:220px}
  .toast-region{right:12px;bottom:12px;width:calc(100vw - 24px)}
  .modal-dialog{width:calc(100vw - 16px)}
  .modal-head,.modal-body{padding-left:16px;padding-right:16px}
  .modal-actions{padding-left:16px;padding-right:16px}
}
@media(max-width:420px){
  .overview{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:10px}
  .metric{padding:8px 10px}
  .metric span{font-size:11px}
  .metric b{margin-top:4px;font-size:16px}
  .gateway-accounts{grid-template-columns:1fr}
  .health-strip{gap:5px}
  .health-item{min-height:46px; padding:6px 6px 6px 10px}
  .health-item span{font-size:9px}
  .health-item b{font-size:11px}
  .proxy-pool-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:1025px) and (min-height:640px){
  html,body{height:100%;overflow:hidden}
  .app{height:100vh;overflow:hidden}
  .main-wrap{height:100vh;min-height:0;overflow:hidden}
  .content{
    flex:1;
    min-height:0;
    display:flex;
    flex-direction:column;
    padding:24px 32px;
    overflow:hidden;
  }
  .overview,.health-strip,.operation-banner{flex-shrink:0}
  .panel-view.active{
    flex:1;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  .panel-view.active[data-panel="proxy"],
  .panel-view.active[data-panel="gateway"],
  .panel-view.active[data-panel="security"]{
    flex:0 0 auto;
    max-height:100%;
    overflow-y:auto;
  }
  .panel-view.active[data-panel="platform"]{
    flex:0 1 auto;
    max-height:100%;
    overflow-y:auto;
  }
  .panel-view>.section-head{flex-shrink:0}

  
  .task-layout{flex:0 1 48%;min-height:300px}
  .task-controls-pane{
    position:static;
    min-height:0;
    max-height:none;
    overflow-y:auto;
    padding-right:10px;
    padding-bottom:0;
  }
  .log-pane{flex:1 1 52%;min-height:180px;display:flex;flex-direction:column}
  .task-log{flex:1;min-height:140px;height:auto}
  .details-block{
    min-height:0;
    display:flex;
    flex-direction:column;
    margin-top:0;
    max-height:none;
    align-self:stretch;
  }
  .details-block>.subsection-head{margin-top:0;flex-shrink:0}
  .details-block>.table-wrap{flex:1;min-height:0;overflow:auto}

  
  [data-panel="accounts"]>.account-metrics,
  [data-panel="accounts"]>.account-toolbar,
  [data-panel="accounts"]>.account-filter-popover,
  [data-panel="accounts"]>.account-selection-bar,
  [data-panel="accounts"]>.pagination,
  [data-panel="mails"]>.form-band,
  [data-panel="mails"]>.toolbar,
  [data-panel="mails"]>.pagination,
  [data-panel="proxy-pool"]>.proxy-pool-metrics,
  [data-panel="proxy-pool"]>.proxy-pool-toolbar,
  [data-panel="proxy-pool"]>.proxy-pool-resultbar,
  [data-panel="proxy-pool"]>.pagination,
  [data-panel="egress"]>.notice,
  [data-panel="egress"]>.egress-toolbar,
  [data-panel="egress"]>.pagination{flex-shrink:0}
  [data-panel="accounts"]>.table-wrap,
  [data-panel="mails"]>.table-wrap,
  [data-panel="proxy-pool"]>.table-wrap,
  [data-panel="egress"]>.table-wrap{flex:1;min-height:0;overflow:auto}

  
  [data-panel="proxy"].active,
  [data-panel="gateway"].active,
  [data-panel="platform"].active,
  [data-panel="security"].active{display:block;overflow-y:auto}
}
@media(min-width:1025px) and (min-height:640px){
  .statusbar{flex-shrink:0;flex-wrap:nowrap}
}
@media(max-width:640px){
  .statusbar>.statusbar-gap{display:none}
  .statusbar>.updated-at{width:100%}
}
@media(min-width:1025px) and (min-height:640px){
  .task-layout{grid-template-rows:minmax(0,1fr)}
  .task-controls-pane{min-height:0;overflow-y:auto}
  .log-pane{min-height:0}
}
@media(min-width:1025px) and (min-height:640px){
  .task-controls-pane{align-self:stretch}
  .log-pane{align-self:auto}
}
@media (hover:none){
  .row-btn{opacity:1}
}

/* Simplified operator workspace */
[hidden]{display:none!important}
.settings-tabs{margin:0 0 10px;flex-shrink:0}
.advanced-disclosure{margin-top:12px;border-radius:var(--radius-md);background:var(--background);overflow:hidden}
.advanced-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:40px;padding:0 12px;color:var(--foreground);font-size:12px;font-weight:500;cursor:pointer;list-style:none}
.advanced-disclosure>summary::-webkit-details-marker{display:none}
.advanced-disclosure>summary::after{content:"+";color:var(--muted-foreground);font-size:16px;font-weight:400}
.advanced-disclosure[open]>summary::after{content:"−"}
.advanced-disclosure[open]>summary{border-bottom:1px solid var(--border)}
.disclosure-body{padding:12px}
.disclosure-body.gateway-metrics{display:grid;margin:0}
.task-controls-pane>.register-mode{margin-top:0}
.task-controls-pane>.manual-registration{order:4}
.task-layout{align-items:start}
.log-disclosure{margin-top:12px}
.log-disclosure>summary .stat{margin-left:auto;margin-right:8px}
.log-pane.disclosure-body{margin-top:0}
.mail-composer{margin:0 0 12px}
.mail-composer .segmented{margin-bottom:12px}
.proxy-advanced .disclosure-body{margin:0}
.account-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.account-data-table{min-width:720px}
.account-col-email{width:34%}
.account-col-platform{width:26%}
.account-col-quota{width:12%}
.account-col-status{width:14%}
.gateway-details{margin-top:-8px;margin-bottom:12px}

@media(min-width:1025px) and (min-height:640px){
  .settings-tabs{flex-shrink:0}
  .panel-view.active[data-panel="task"]{display:block;overflow-y:auto}
  .task-layout{min-height:0;display:grid;grid-template-columns:minmax(340px,420px) minmax(0,1fr)}
  .task-controls-pane{overflow:visible;padding-right:0}
  .details-block{display:block;min-height:0;max-height:none;align-self:start}
  .details-block>.disclosure-body{display:block}
  .log-pane{display:block;min-height:0}
  .task-log{height:260px;min-height:160px}
  [data-panel="mails"]>.mail-composer{flex-shrink:0}
}

@media(max-width:640px){
  .settings-tabs{width:100%}
  .settings-tabs button{flex:1}
  .account-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
  .account-metric{padding:9px}
  .account-metric small{display:none}
  .account-data-table{min-width:0}
  .account-data-table td:nth-child(1)::before,.account-data-table td:nth-child(6)::before{display:none}
  .account-data-table td:nth-child(2){grid-column:1 / 3}
  .account-data-table td:nth-child(4){grid-column:auto}
  .account-data-table td:nth-child(6){position:absolute;right:10px;top:9px;display:block}
  .statusbar>.updated-at{width:auto}
}
