:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;font-size:14px;line-height:1.5;color:var(--text);background:var(--bg);color-scheme:light;--bg:#faf9fc;--surface:#fff;--surface-2:#f1eff6;--border:#e2dfee;--text:#201b34;--muted:#625d78;--accent:#7150d9;--brand:#7150d9;--brand-hover:#5f3ec5;--on-brand:#fff;--accent-hover:#5f3ec5;--accent-soft:#eee8ff;--blue:#3676d8;--green:#2e8c5c;--red:#b93b4e;--orange:#976207;--error-bg:#fff0f1;--error-border:#edbcc4;--success-bg:#e0f6e7;--success-border:#afd9bc;--warning-bg:#fff1d7;--shadow:0 2px 8px #30205b04}:root[data-theme=dark]{color-scheme:dark;--bg:#101012;--surface:#1a1a1f;--surface-2:#25252d;--border:#3e3c48;--text:#f2eff9;--muted:#c0bacd;--accent:#b497ef;--accent-hover:#c7b0f8;--accent-soft:#352947;--blue:#9db9ff;--green:#88d3a3;--red:#ff9fae;--orange:#edc786;--error-bg:#342029;--error-border:#71404d;--success-bg:#243a2c;--success-border:#3a5e45;--warning-bg:#3a3022;--shadow:none}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button{min-height:40px;padding:8px 12px;border:1px solid var(--border);border-radius:6px;background:var(--surface-2);color:var(--text);cursor:pointer;font-weight:500;transition:background-color .16s cubic-bezier(.22,1,.36,1)}button:hover:not(:disabled){border-color:var(--accent);background:var(--surface-2)}button:disabled{opacity:.5;cursor:not-allowed}.primary{background:var(--accent);border-color:var(--accent);color:#fff}.primary:hover:not(:disabled){background:var(--accent-hover)}.danger{color:var(--red)}a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--blue);outline-offset:3px}h1,h2,h3,p{margin-top:0}h1{font-size:20px;line-height:28px;font-weight:600;letter-spacing:-.025em;margin-bottom:8px;text-wrap:balance}h2{font-size:14px;line-height:24px;font-weight:600;margin:0}h3{font-size:14px;line-height:20px;font-weight:600}p{margin-bottom:16px;text-wrap:pretty}small{font-size:12px;line-height:16px;color:var(--muted)}label{display:flex;flex-direction:column;gap:8px;font-weight:500}input,select,textarea{display:block;width:100%;min-width:0;min-height:40px;border:1px solid var(--border);border-radius:6px;padding:8px 12px;background:var(--bg);color:var(--text)}input::placeholder,textarea::placeholder{color:var(--muted)}textarea{resize:vertical;line-height:24px}input[type=checkbox]{width:18px;height:18px;min-height:18px;accent-color:var(--accent);flex:0 0 auto}input[type=file]{padding:0;min-height:0}button svg{width:16px;height:16px}.checkbox{display:flex;flex-direction:row;align-items:center;gap:8px;min-height:40px;font-weight:400}.code,pre{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:20px}pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:480px;overflow:auto;padding:16px;background:var(--bg);border-radius:6px}.muted,.updated{color:var(--muted)}.updated{font-size:12px;line-height:16px;margin:12px 0 0}.danger-text{color:var(--red)}.break{overflow-wrap:anywhere}.grow{flex:1;min-width:160px}.actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.actions button{flex:0 0 auto}.truncate{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.text-button{display:block;padding:0;background:transparent;border:0;min-height:24px;color:var(--blue);text-align:left}.text-button:hover:not(:disabled){background:transparent;text-decoration:underline}.skip-link{position:fixed;top:8px;left:8px;transform:translateY(-150%);z-index:100;padding:12px;background:var(--surface);border:1px solid var(--blue)}.skip-link:focus{transform:none}.notice{display:flex;flex-direction:column;gap:8px;padding:16px;margin:16px 0;background:var(--surface-2);border:1px solid var(--border);border-radius:6px;overflow-wrap:anywhere}.notice strong{font-weight:600}.notice button{align-self:flex-start}.notice.error{border-color:var(--error-border);color:var(--red);background:var(--error-bg)}.notice.success{border-color:var(--success-border);color:var(--green);background:var(--success-bg)}.notice a{margin:0 4px}.empty{padding:24px 16px;text-align:center;color:var(--muted)}.empty h3{color:var(--text)}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 16px}.field{min-width:0;display:flex;flex-direction:column;gap:8px}.field.wide{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:16px}.multi{display:flex;gap:12px;flex-wrap:wrap;padding:12px;border:1px solid var(--border);border-radius:6px;max-height:240px;overflow:auto}.multi .checkbox{min-height:32px}.filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:16px}.config-list{display:flex;flex-direction:column;gap:12px}.config-row{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:16px;border:1px solid var(--border);border-radius:6px;min-width:0}.config-identity{min-width:0;display:flex;flex-direction:column;gap:4px}.config-identity strong{font-size:14px;line-height:24px;overflow-wrap:anywhere}.config-identity>span{color:var(--muted);overflow-wrap:anywhere}.file-button{cursor:pointer;font-weight:500;border:1px solid var(--border);border-radius:6px;padding:8px 12px;min-height:40px;display:flex;justify-content:center;background:var(--surface-2)}.file-button input{position:absolute;opacity:0;width:1px;height:1px}.file-button:focus-within{outline:2px solid var(--blue);outline-offset:3px}.definition-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0}.definition-list>div{min-width:0}.definition-list dt{color:var(--muted);font-size:12px;line-height:16px;margin-bottom:4px}.definition-list dd{margin:0;overflow-wrap:anywhere}.advanced,.json-result{margin-top:16px}.advanced summary,.json-result summary{cursor:pointer;color:var(--blue);padding:8px 0}.advanced>p{font-size:12px;line-height:20px;color:var(--muted)}.advanced .actions{margin-top:16px}.status{font-size:12px;line-height:16px;padding:4px 8px;display:inline-block;border-radius:4px;background:var(--surface-2);color:var(--muted);white-space:nowrap}.status.good{background:var(--success-bg);color:var(--green)}.status.attention{background:var(--warning-bg);color:var(--orange)}.table-scroll{max-height:560px;height:440px;overflow:auto;border:1px solid var(--border);border-radius:6px;overscroll-behavior:contain}.virtual-table{min-width:960px;width:100%;font-size:12px;line-height:20px}.table-head,.table-row{display:grid;gap:12px;align-items:center;padding:12px 16px}.table-head{position:sticky;top:0;z-index:2;background:var(--surface-2);font-weight:600;color:var(--muted);min-height:48px}.table-row{border-bottom:1px solid var(--border);background:var(--surface)}.table-row>[role=cell]{min-width:0;overflow:hidden}.pagination{display:flex;gap:12px;justify-content:flex-end;align-items:center;flex-wrap:wrap;margin-top:16px}.pagination label{flex-direction:row;align-items:center;white-space:nowrap}.pagination select{width:80px}.pagination span{color:var(--muted);font-size:12px;line-height:16px}dialog{width:860px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 48px);padding:0;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);overflow:auto;box-shadow:0 24px 64px #0008}dialog::backdrop{background:#000b}.dialog-header{position:sticky;top:0;background:var(--surface);z-index:2;display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--border);gap:16px}.dialog-body{padding:16px}.auth-page{min-height:100dvh;display:grid;place-items:center;padding:16px}.auth-card{width:100%;max-width:440px;padding:24px;background:var(--surface);border:1px solid var(--border);border-radius:12px}.brand-caption{color:var(--muted);font-size:12px;line-height:16px;margin-bottom:16px}.auth-card>p{color:var(--muted)}.auth-card form{display:grid;gap:16px}.auth-card form>.primary{width:100%;margin-bottom:16px}.auth-card>.muted{font-size:12px;line-height:20px;margin-bottom:0}.app-shell{min-height:100dvh}.app-header{background:var(--bg);border-bottom:1px solid var(--border)}.topbar{display:flex;align-items:center;gap:16px;min-height:64px;padding:8px max(16px,calc((100vw - 1440px)/2));border-bottom:1px solid var(--border)}.brand{display:flex;align-items:center;gap:16px;color:var(--text);flex-shrink:0}.brand:hover{text-decoration:none}.brand strong{font-size:20px;line-height:28px;font-weight:600;letter-spacing:-.5px}.brand-mark{display:grid;place-items:center;background:var(--brand);color:#fff;border-radius:10px;width:40px;height:40px;font-size:20px;line-height:28px;font-weight:600;box-shadow:inset 0 1px 5px #ffffff35}.group-navigation{display:flex;gap:12px;border-left:1px solid var(--border);padding-left:24px}.group-navigation a{display:flex;align-items:center;gap:8px;padding:8px 16px;border-radius:10px;color:var(--text);font-size:14px;font-weight:500}.group-navigation a.active{background:var(--accent-soft);color:var(--accent)}.group-navigation a:hover,.section-navigation a:hover{color:var(--accent);text-decoration:none}.connection{display:flex;align-items:center;gap:8px;font-size:12px;line-height:16px;color:var(--muted)}.desktop-stream{margin-left:auto;max-width:200px}.online-dot,.offline-dot{width:8px;height:8px;display:inline-block;border-radius:50%;background:var(--green);flex-shrink:0}.offline-dot{background:var(--orange)}.theme-switch{display:flex;border:1px solid var(--border);border-radius:10px;padding:2px;gap:2px;flex-shrink:0}.theme-switch button{display:flex;align-items:center;gap:8px;min-height:34px;background:transparent;border-color:transparent;padding:4px 10px}.theme-switch button[aria-pressed=true]{border-color:var(--accent);color:var(--accent);background:var(--surface)}.section-navigation{display:flex;gap:16px;padding:0 max(16px,calc((100vw - 1440px)/2));overflow-x:auto;scrollbar-width:none}.section-navigation a{display:flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;padding:16px 12px;color:var(--muted);border-bottom:3px solid transparent;font-size:14px;font-weight:500}.section-navigation a.active{color:var(--accent);border-color:var(--accent)}.icon-button{display:inline-flex;align-items:center;justify-content:center;padding:8px}.menu-button{display:none}.content{max-width:1488px;margin:0 auto;padding:24px 32px;outline:none}.page-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px;min-height:40px}.page-header h1{font-size:24px;line-height:32px;margin:0}.panel{background:var(--surface);border:1px solid var(--border);border-radius:12px;margin-bottom:16px;min-width:0;box-shadow:var(--shadow)}.panel>header{padding:16px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.panel h2{font-size:18px;line-height:24px}.panel-body{padding:0 16px 16px;min-width:0}.summary-grid,.two-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.metric{font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.5px}.toolbar{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:16px}.toolbar .grow{max-width:420px}.tabs{display:flex;gap:16px;flex-wrap:wrap;margin-bottom:16px}.tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;padding:8px 16px;background:transparent;color:var(--muted)}.tabs button[aria-selected=true]{color:var(--accent);border-color:var(--accent);font-weight:600}.tabs button:hover:not(:disabled){background:var(--accent-soft)}.object-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.object-card{padding:16px;min-width:0;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:var(--shadow);display:flex;flex-direction:column;gap:16px}.object-heading{display:flex;align-items:center;gap:16px;min-width:0}.object-heading>.status{margin-left:auto;align-self:flex-start}.object-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;height:36px;border-radius:12px;background:var(--accent-soft);color:var(--accent)}.object-heading .config-identity{flex:1}.object-heading .config-identity strong{font-size:18px;line-height:24px}.object-heading .config-identity>span{font-size:14px;line-height:20px}.object-card>.actions{border-top:1px solid var(--border);padding-top:12px;gap:8px;margin-top:auto}.object-card>.actions button{font-size:12px;line-height:16px;min-height:32px;padding:4px 12px;background:transparent}.object-card>.actions button:not(.danger):hover{color:var(--accent);background:var(--accent-soft)}.object-card>.actions button:first-child{margin-left:auto}.site-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.site-grid .object-card{padding:16px}.site-grid .object-heading{flex-wrap:wrap;gap:12px}.site-grid .object-icon{width:40px;height:40px;flex-basis:40px}.site-grid .config-identity strong{font-size:16px;line-height:24px}.site-grid .config-identity>span{font-size:12px;line-height:16px}.card-tags{display:flex;gap:8px 16px;flex-wrap:wrap;color:var(--muted)}.rule-direction{display:flex;align-items:center;gap:16px;flex-wrap:wrap;overflow-wrap:anywhere;margin:0}.rule-direction strong{font-weight:500;color:var(--text)}.status{border-radius:12px;white-space:normal;vertical-align:middle;max-width:100%;background:var(--surface-2);color:var(--muted)}.instance-speeds{display:grid;grid-template-columns:1fr 1fr;gap:16px}.instance-speeds>div+div{border-left:1px solid var(--border);padding-left:24px}.instance-speeds span{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;line-height:16px;margin-bottom:4px}.instance-speeds strong{font-size:20px;line-height:28px;font-weight:600;letter-spacing:-.5px;white-space:nowrap}.download-rate{color:var(--blue)}.upload-rate{color:var(--green)}:root[data-theme=dark] .upload-rate{color:var(--text)}.instance-counts{display:flex;flex-wrap:wrap;gap:8px 16px;color:var(--muted)}.instance-counts b{color:var(--text);font-weight:500;margin-left:4px}.routing-strip{display:flex;align-items:center;gap:16px;padding:0 12px 16px;margin:0 0 16px;border-bottom:1px solid var(--border);flex-wrap:wrap;color:var(--muted)}.routing-strip strong{color:var(--text);font-size:14px}.routing-strip .text-button{margin-left:auto}.task-toolbar{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:16px}.task-toolbar .tabs{margin:0}.task-search{width:320px}.progress-cell{display:flex;align-items:center;gap:12px}.progress-cell progress{width:100%;min-width:40px;height:8px;border:0;accent-color:var(--accent)}progress::-webkit-progress-bar{background:var(--surface-2);border-radius:12px}progress::-webkit-progress-value{background:var(--accent);border-radius:12px}.table-scroll{height:360px;border:0;border-radius:10px}.table-head{border-radius:8px;min-height:40px;padding:8px 16px}.table-row{padding:8px 16px}.virtual-table{font-size:14px;line-height:20px}.table-row:hover{background:var(--surface-2)}.config-tools{position:relative;margin-left:auto}.config-tools summary{cursor:pointer;padding:8px 12px;border:1px solid var(--border);border-radius:8px;background:var(--surface-2)}.config-tools[open]>.actions{position:absolute;right:0;top:calc(100% + 8px);z-index:5;width:240px;padding:16px;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:0 8px 24px #0002}.pipeline{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;margin-bottom:16px}.pipeline a{border:1px solid var(--border);border-radius:12px;padding:16px;background:var(--surface);color:var(--text);min-width:0}.pipeline a:hover{border-color:var(--accent);text-decoration:none}.pipeline-icon{display:flex;justify-content:space-between;align-items:center;color:var(--accent);margin-bottom:16px}.pipeline strong{font-weight:600;font-size:14px}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(136px,180px));gap:12px;margin:16px 0}.metric-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:16px;display:grid;grid-template-columns:1fr auto;gap:12px;color:var(--muted);min-width:0}.metric-card .object-icon{grid-column:2;grid-row:1/3}.metric-card .metric{color:var(--text);grid-column:1;overflow-wrap:anywhere}.overview-status,.overview-counts{display:flex;gap:12px 16px;flex-wrap:wrap;color:var(--muted);margin-bottom:16px}.overview-columns{display:grid;grid-template-columns:1fr 1.4fr;gap:16px;align-items:start}.overview-columns .config-row{border:0;border-bottom:1px solid var(--border);border-radius:0;padding:12px 0}.overview-columns .config-list{gap:0}.overview-columns .config-identity strong{font-size:14px}.overview-columns .config-row .status{flex-shrink:0}.auth-theme{position:absolute;right:24px;top:24px}.auth-card .brand-mark{margin-bottom:16px}.auth-card{border-radius:16px;box-shadow:var(--shadow)}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.mobile-navigation{display:none}button{border-radius:8px;transition:background-color .2s cubic-bezier(.22,1,.36,1),color .2s cubic-bezier(.22,1,.36,1)}button:active:not(:disabled){transform:translateY(1px)}.primary{background:var(--brand);border-color:var(--brand);color:#fff}.primary:hover:not(:disabled){background:var(--brand-hover)}input,select,textarea{background:var(--bg);border-radius:8px}h1,h2,h3{color:var(--text)}dialog{border-radius:12px}dialog::backdrop{background:#10101680;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.notice{font-size:14px;line-height:20px}.panel-body>.notice:first-child{margin-top:0}.collapsible-section{margin:0 0 16px}.collapsible-section>summary{padding:12px 0;color:var(--accent);cursor:pointer;font-weight:500}.collapsible-section>.panel{margin-top:12px}.filters{align-items:end}.stats-scope{margin-bottom:16px;color:var(--muted)}@media(min-width:1200px){.content>.panel:has(.instance-speeds){background:transparent;border:0;box-shadow:none}.content>.panel:has(.instance-speeds)>header{padding:0 0 16px}.content>.panel:has(.instance-speeds)>.panel-body{padding:0}}@media(max-width:1280px){.content{padding:16px 24px}.topbar{gap:16px}.group-navigation{padding-left:16px}.group-navigation a{padding:8px 12px}.desktop-stream{max-width:130px}.site-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-card{padding:16px}.instance-speeds strong{font-size:20px}.overview-columns{grid-template-columns:1fr 1fr}}@media(max-width:1000px){.desktop-stream{display:none}.topbar .theme-switch{margin-left:auto}.group-navigation{gap:4px}.metric-grid{gap:12px}.metric-card{grid-template-columns:1fr}.metric-card .object-icon{grid-row:1;grid-column:1}.metric-card .metric{grid-row:2}.object-card{padding:16px}.object-heading{gap:12px}.object-heading .config-identity strong{font-size:16px}.filters{grid-template-columns:repeat(2,minmax(0,1fr))}.two-columns,.overview-columns{grid-template-columns:1fr}.pipeline{gap:8px}.pipeline a,.content{padding:16px}.instance-speeds>div+div{padding-left:16px}.instance-speeds{gap:16px}}@media(max-width:760px){.topbar{padding:12px 16px;gap:12px;min-height:64px}.brand{gap:8px}.brand strong{font-size:16px;line-height:24px}.brand-mark{width:32px;height:32px;font-size:18px;border-radius:8px}.group-navigation,.logout-button{display:none}.theme-switch{gap:0}.theme-switch button{padding:6px;min-height:36px}.theme-switch button>span{display:none}.theme-switch svg{width:18px;height:18px}.menu-button{display:flex;min-height:40px}.section-navigation{padding:0 8px;gap:0}.section-navigation a{font-size:14px;line-height:20px;padding:12px;min-height:48px}.section-navigation svg{width:18px;height:18px}.content{padding:16px}.page-header{gap:16px;flex-wrap:wrap}.page-header h1{font-size:20px;line-height:28px}.panel{border-radius:12px;margin-bottom:16px}.panel>header{padding:16px;gap:12px}.panel h2{font-size:16px;line-height:24px}.panel-body{padding:0 16px 16px}.object-grid,.site-grid{grid-template-columns:1fr;gap:16px}.object-card{padding:16px;border-radius:14px}.object-heading .config-identity strong{font-size:16px;line-height:24px}.object-heading .config-identity>span{font-size:12px;line-height:16px}.object-heading>.status{font-size:12px;line-height:16px}.object-icon{width:40px;height:40px;flex-basis:40px}.instance-speeds strong{font-size:20px;line-height:28px}.instance-speeds>div+div{padding-left:16px}.instance-counts{font-size:12px;line-height:16px;gap:8px 12px}.object-card>.actions{flex-wrap:wrap}.object-card>.actions button{min-height:40px;flex:1}.object-card>.actions button:first-child{margin-left:0}.routing-strip{padding:4px 0 16px;gap:12px}.routing-strip>span:not(.status){flex-basis:100%;order:2}.routing-strip .text-button{min-height:40px}.routing-strip .status{font-size:12px}.task-toolbar{display:block}.task-toolbar .tabs{margin-bottom:12px;gap:8px}.task-search{width:100%}.tabs{gap:8px;margin-bottom:16px}.tabs button{padding:8px;min-height:44px;font-size:14px;line-height:20px}.toolbar{gap:12px}.toolbar .grow{flex-basis:100%}.toolbar>span{font-size:12px}.config-tools{margin-left:0}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.metric-card{padding:16px;grid-template-columns:1fr auto;gap:8px}.metric-card .object-icon{grid-column:2;grid-row:1/3;width:32px;height:32px;flex-basis:32px}.metric-card .metric{grid-row:2;font-size:20px;line-height:28px}.metric-card>span:not(.object-icon){font-size:12px;line-height:16px}.pipeline{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.pipeline a:last-child{grid-column:1/-1}.pipeline a{padding:16px}.pipeline-icon{margin-bottom:8px}.pipeline strong{font-size:14px}.overview-counts{font-size:12px;gap:8px 16px}.overview-columns,.two-columns,.summary-grid,.form-grid{grid-template-columns:1fr;gap:16px}.definition-list{gap:16px}.filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.filters label{font-size:12px}.filters input,.filters select{font-size:14px}.filters>.actions{grid-column:1/-1}.filters>.actions button{flex:1}.table-scroll{height:360px}.pagination{justify-content:flex-start;gap:8px}.pagination button{flex:1}.pagination label{margin-right:auto}button,input,select,.checkbox{min-height:44px}.mobile-navigation{display:block;position:fixed;inset:0;z-index:50;background:var(--bg);padding:16px;overflow:auto}.mobile-navigation section{padding:16px 0;border-bottom:1px solid var(--border)}.mobile-navigation h2{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:14px;margin-bottom:12px}.mobile-navigation a{display:flex;align-items:center;gap:12px;color:var(--text);padding:12px;border-radius:8px;min-height:44px}.mobile-navigation a[aria-current=page]{background:var(--accent-soft);color:var(--accent)}.mobile-close{display:block;margin-left:auto}.mobile-navigation>button:last-child{margin-top:16px;width:100%}.auth-page{padding:80px 16px 16px}.auth-card{padding:16px}.auth-theme{top:16px;right:16px}.auth-theme .theme-switch button>span{display:inline}.dialog-header{padding:12px 16px}.dialog-body{padding:16px}dialog{max-width:calc(100vw - 16px);max-height:calc(100dvh - 24px)}.form-actions button{flex:1}.notice{padding:12px}.config-row{flex-wrap:wrap;padding:12px}.config-identity strong{font-size:14px}.object-grid .definition-list{grid-template-columns:1fr 1fr}.rule-direction{gap:8px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}.instance-card{position:relative;gap:16px;padding:16px}.instance-card .instance-counts{border-top:1px solid var(--border);padding-top:16px;padding-right:100px;min-height:48px;font-size:12px;gap:8px 12px}.instance-card>.instance-actions{position:absolute;right:24px;bottom:16px;margin:0;padding:0;border:0}.instance-card>.instance-actions>button{padding:4px 10px;min-height:32px}.instance-more{position:relative}.instance-more summary{cursor:pointer;display:flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:8px;min-height:32px;width:40px;list-style:none}.instance-more summary::-webkit-details-marker{display:none}.instance-more[open]>.actions{position:absolute;right:0;top:40px;z-index:10;display:grid;min-width:160px;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:0 8px 24px #0002}.instance-more[open]>.actions button{margin-left:0}.panel:has(.instance-speeds)>header h2{font-size:24px;line-height:32px}.panel:has(.instance-speeds)>.panel-body>.toolbar{justify-content:flex-end;margin-bottom:16px}.panel:has(.instance-speeds)>.panel-body>.toolbar>.muted{display:none}.panel:has(.instance-speeds) .config-tools{margin-left:0}@media(max-width:760px){.instance-card{padding:16px;gap:16px}.instance-card .instance-counts{padding-right:88px;gap:8px 12px}.instance-card>.instance-actions{right:16px;bottom:16px}.instance-card>.instance-actions button,.instance-more summary{min-height:40px}.panel:has(.instance-speeds)>header h2{font-size:20px;line-height:28px}}.panel>header .config-tools{margin-left:0}.panel>header .config-tools[open]>.actions{top:calc(100% + 8px)}.download-tasks{background:transparent;border:0;box-shadow:none}.download-tasks>header{padding:0 0 16px;flex-wrap:nowrap}.download-tasks>header>.actions{flex:1}.download-tasks>header .tabs{margin:0 auto 0 16px}.download-tasks>.panel-body{padding:0}.download-tasks .task-search{width:280px}.download-tasks .table-scroll,.download-tasks .table-row{background:var(--bg)}.routing-strip>.actions{margin-left:auto;gap:16px}.instance-panel>.panel-body>.updated{margin-top:8px}.instance-panel>header>.actions>.muted{font-size:14px}.instance-panel>header .primary{min-width:96px}.instance-panel>header>.actions{margin-left:auto}@media(max-width:760px){.download-tasks>header{flex-wrap:wrap}.download-tasks>header>.actions{flex-basis:100%;gap:12px}.download-tasks>header .tabs{margin:0 auto 0 0}.download-tasks .task-search{width:100%;order:3}.download-tasks>header>.actions>button{font-size:12px;min-height:40px}.instance-panel{border:0;background:transparent;box-shadow:none}.instance-panel>header{padding:0 0 16px}.instance-panel>.panel-body{padding:0}.instance-panel>header>.actions{gap:8px}.instance-panel>header .config-tools summary{font-size:12px;padding:8px}.instance-panel>header>.actions>.muted{width:100%;text-align:right;font-size:12px}.instance-panel>header>.actions .primary{min-width:64px}.instance-panel>header{align-items:flex-start;flex-wrap:nowrap}.instance-panel>header>.actions{max-width:210px}.routing-strip>.actions{gap:16px}}.status.info{background:var(--info-bg);color:var(--blue)}:root{--info-bg:#e5efff}:root[data-theme=dark]{--info-bg:#28334c}.instance-panel h1{font-size:24px;line-height:32px;margin:0}.instance-card .instance-counts{font-size:14px}.topbar{padding-left:max(32px,calc((100vw - 1392px)/2));padding-right:max(32px,calc((100vw - 1392px)/2))}.section-navigation{padding-left:max(40px,calc((100vw - 1408px)/2));padding-right:max(40px,calc((100vw - 1408px)/2))}@media(max-width:1000px){.topbar,.section-navigation{padding-left:16px;padding-right:16px}}@media(max-width:760px){.topbar{padding-left:16px;padding-right:16px}.section-navigation{padding-left:8px;padding-right:8px}.instance-panel h1{font-size:20px;line-height:28px}.instance-card .instance-counts{font-size:12px}}@media(max-width:760px){.instance-panel>header{display:block;position:relative}.instance-panel h1{margin-bottom:16px}.instance-panel>header>.actions{max-width:none;justify-content:flex-end}.instance-panel>header>.actions>.muted{position:absolute;right:0;top:4px;width:auto}.instance-panel>header .primary{min-width:96px}}.instance-card>.danger-text{margin:0;padding-right:100px;font-size:12px;line-height:20px}.confirmation-message{white-space:pre-line}dialog.confirmation-dialog{width:480px}@media(min-width:761px){.instance-card{gap:12px}.instance-speeds strong{font-size:24px;line-height:32px}.instance-card .object-heading>.status{font-size:14px;line-height:20px;padding:2px 12px}}.primary:has(svg){display:inline-flex;align-items:center;justify-content:center;gap:8px}.task-count{margin:12px 0 0;font-size:12px;line-height:16px}.overview-metrics{grid-template-columns:repeat(4,minmax(0,232px))}.metric-card{gap:4px;padding:12px 16px;align-content:start}.metric-card>small{grid-column:1/-1;overflow-wrap:anywhere}.metric-card .metric{font-variant-numeric:tabular-nums}.pipeline a{padding:12px 16px}.pipeline-icon{margin-bottom:8px}.pipeline-count{display:flex;align-items:baseline;gap:8px;margin-top:8px;color:var(--muted);font-size:12px;line-height:16px;flex-wrap:wrap}.pipeline-count b{font-size:24px;line-height:32px;font-weight:600;color:var(--accent);font-variant-numeric:tabular-nums}.overview-status{margin-bottom:12px;font-size:12px;line-height:16px}.overview-scope{margin-bottom:16px}.overview-scope>summary{padding:4px 0;font-size:12px}.overview-scope p{margin:8px 0 0}.object-icon svg{width:20px;height:20px}.group-navigation svg,.section-navigation svg{width:18px;height:18px}.stats-success-layout{grid-template-columns:minmax(240px,.65fr) minmax(0,1.35fr);max-width:1040px;align-items:start}.settings-content{max-width:960px}.access-settings{max-width:760px}.config-rss .object-grid{grid-template-columns:repeat(auto-fit,minmax(280px,420px));align-items:start}.config-transfer-rules .object-grid,.config-delete-rules .object-grid{align-items:start}@media(min-width:761px){button,input,select{min-height:36px;padding-top:6px;padding-bottom:6px}.tabs button{min-height:36px}.topbar{min-height:64px;gap:16px}.brand-mark{width:32px;height:32px}.group-navigation{gap:8px;padding-left:16px}.section-navigation{gap:8px}.section-navigation a{padding:12px}.content{padding-top:20px}.page-header{min-height:32px;margin-bottom:16px}.object-card{padding:16px;gap:12px}.instance-card{padding:16px 20px 12px}.instance-card .instance-counts{padding-top:12px;min-height:40px;font-size:12px}.instance-card>.instance-actions{right:20px;bottom:12px}.instance-card .object-heading>.status{font-size:12px;line-height:16px}.instance-more summary{min-height:32px}.instance-speeds strong{font-size:24px;line-height:32px}.config-row{padding:12px}.definition-list{grid-template-columns:repeat(auto-fit,minmax(144px,220px));gap:12px 16px}.summary-grid{grid-template-columns:repeat(auto-fit,minmax(240px,360px));align-items:start}.filters{grid-template-columns:repeat(4,minmax(0,220px));gap:12px}}@media(max-width:1000px){.stats-success-layout,.metric-card{grid-template-columns:1fr}}@media(max-width:760px){.content{padding:16px}.page-header h1,.instance-panel h1{font-size:20px;line-height:28px}.panel h2{font-size:16px;line-height:24px}.pipeline{gap:8px;margin-bottom:12px}.pipeline a{padding:12px}.pipeline a:last-child{grid-column:auto}.pipeline-count{gap:4px;margin-top:4px}.pipeline-count b{font-size:20px;line-height:28px}.metric-grid,.overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.metric-card{padding:12px;gap:4px;grid-template-columns:1fr}.metric-card .metric{font-size:20px;line-height:28px}.object-heading .config-identity strong{font-size:16px;line-height:24px}.instance-speeds strong{font-size:20px;line-height:28px}.instance-card{gap:12px}.config-rss .object-grid{grid-template-columns:1fr}}:root{--border-strong:#cfcae0;--faint:#8e89a3;--row-hover:#f7f5fb;--row-active:#f1ecff;--warning-border:#f0d49c;--shadow-pop:0 12px 40px #20103a26;--table-max-height:max(360px, calc(100dvh - 330px) )}:root[data-theme=dark]{--border-strong:#55525f;--faint:#8f8a9c;--row-hover:#202027;--row-active:#2a2338;--warning-border:#6a5530;--shadow-pop:0 16px 48px #000a}button{background:var(--surface)}button:hover:not(:disabled){border-color:var(--border-strong);background:var(--surface-2)}.primary:hover:not(:disabled){border-color:var(--brand-hover)}.icon-button{width:36px;min-width:36px;padding:0;color:var(--muted)}.icon-button:hover:not(:disabled){color:var(--text)}.ghost-button{display:inline-flex;align-items:center;gap:6px;background:transparent;border-color:transparent;color:var(--muted)}.ghost-button:hover:not(:disabled){background:var(--surface-2);color:var(--text);border-color:transparent}.copy-button{min-height:24px;width:24px;min-width:24px;padding:0;margin-left:6px;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;border-color:transparent;background:transparent;color:var(--faint)}.copy-button:hover:not(:disabled){background:var(--accent-soft);color:var(--accent);border-color:transparent}.dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:0 0 auto;background:var(--green)}.dot.info{background:var(--blue)}.dot.warn,.dot.offline{background:var(--orange)}.dot.bad{background:var(--red)}.dot.disabled{background:var(--faint)}.warning-text{color:var(--orange)}.time{white-space:nowrap;font-variant-numeric:tabular-nums}.text-button.inline{display:inline;margin-left:4px}.page-title{display:flex;align-items:center;gap:12px;min-width:0;flex-wrap:wrap}.page-header>.actions{margin-left:auto}.header-note{font-size:12px;line-height:16px;color:var(--muted)}.segmented{display:inline-flex;gap:2px;padding:2px;border-radius:10px;background:var(--surface-2);flex:0 0 auto}.segmented button{min-height:30px;padding:4px 12px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:13px;white-space:nowrap}.segmented button:hover:not(:disabled){background:transparent;color:var(--text)}.segmented button[aria-pressed=true],.segmented button[aria-selected=true]{background:var(--surface);color:var(--text);box-shadow:0 1px 2px #0000001f}:root[data-theme=dark] .segmented button[aria-pressed=true],:root[data-theme=dark] .segmented button[aria-selected=true]{background:var(--border)}.panel-link{display:inline-flex;align-items:center;gap:4px;font-size:13px}.attention-list{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}.attention-item{display:flex;align-items:flex-start;gap:10px;padding:10px 14px;border:1px solid var(--warning-border);border-radius:10px;background:var(--warning-bg);color:var(--text);min-width:0;max-width:100%}a.attention-item:hover{text-decoration:none;border-color:var(--orange)}.attention-item>svg{color:var(--orange);flex:0 0 auto;margin-top:1px}.attention-item.bad{border-color:var(--error-border);background:var(--error-bg)}.attention-item.bad>svg{color:var(--red)}.attention-item b{font-variant-numeric:tabular-nums;font-weight:600}.attention-detail{display:block;font-size:12px;line-height:18px;color:var(--muted);overflow-wrap:anywhere}.attention-go{display:inline-flex;align-items:center;gap:2px;margin-left:4px;font-size:12px;line-height:20px;color:var(--muted);white-space:nowrap}.attention-item.bad .attention-go{color:var(--blue)}.flow-band{gap:0;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);overflow:hidden}.flow-band a{position:relative;border:0;border-radius:0;padding:14px 18px;background:transparent}.flow-band a+a{border-left:1px solid var(--border)}.flow-band a+a:before{content:"";position:absolute;left:-9px;top:50%;z-index:1;width:16px;height:16px;margin-top:-8px;border:1px solid var(--border);border-radius:50%;background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e89a3' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 7l5 5-5 5'/%3E%3C/svg%3E") center/12px no-repeat}.flow-band a:hover{background:var(--row-hover);border-color:var(--border)}.flow-band .pipeline-icon{justify-content:flex-start;gap:8px;margin-bottom:6px;color:var(--accent)}.flow-band .pipeline-icon strong{color:var(--muted);font-weight:500}.flow-band .pipeline-count{flex-direction:column;align-items:flex-start;gap:0;margin-top:0}.flow-band .pipeline-count b{font-size:28px;line-height:36px;color:var(--text)}.flow-band a.unknown .pipeline-count b{color:var(--faint)}.today-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:12px 0;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow)}.today-strip>div{display:flex;flex-direction:column;padding:10px 16px;min-width:0}.today-strip>div+div{border-left:1px solid var(--border)}.today-strip span{font-size:12px;line-height:16px;color:var(--muted)}.today-strip .metric{font-size:20px;line-height:28px;font-variant-numeric:tabular-nums}.today-strip small{color:var(--faint);overflow-wrap:anywhere}.overview-scope{margin:0 0 16px}.overview-columns{grid-template-columns:minmax(0,1.55fr) minmax(300px,1fr)}.recent-list{list-style:none;margin:0;padding:0}.recent-list li{display:grid;grid-template-columns:8px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 0;border-top:1px solid var(--border)}.recent-list li:first-child{border-top:0;padding-top:0}.recent-list .dot{background:var(--border-strong)}.recent-list .dot.info{background:var(--blue)}.recent-list .dot.warn{background:var(--orange)}.recent-list .dot.bad{background:var(--red)}.recent-main{min-width:0}.recent-main strong{font-weight:500}.recent-meta{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:12px;line-height:18px;color:var(--muted)}.recent-side{display:flex;flex-direction:column;align-items:flex-end;gap:2px;font-size:12px;line-height:16px;color:var(--faint);white-space:nowrap}.site-groups{display:grid;gap:12px}.site-groups h3{margin:0 0 6px;font-size:12px;line-height:16px;font-weight:500;color:var(--muted)}.site-chips{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0;padding:0}.site-chip{display:inline-flex;align-items:center;gap:6px;padding:2px 9px;border:1px solid var(--border);border-radius:7px;font-size:12px;line-height:20px;background:var(--surface)}.site-chip.offline{border-color:var(--warning-border);background:var(--warning-bg)}.site-chip.disabled{color:var(--faint);border-style:dashed}.site-legend{display:flex;flex-wrap:wrap;gap:12px;margin:14px 0 0;font-size:12px;line-height:16px;color:var(--muted)}.site-legend span{display:inline-flex;align-items:center;gap:6px}.history-panel>.panel-body{padding:0}.freshness{display:inline-flex;align-items:baseline;gap:6px;margin:0 4px 0 0;color:var(--muted);font-size:13px;line-height:20px;font-weight:400;font-variant-numeric:tabular-nums;white-space:nowrap}.freshness time{color:var(--text);font-weight:600}.filter-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:0 16px 12px}.history-panel .filter-bar{border-bottom:1px solid var(--border)}.search-field{position:relative;display:block;flex:1 1 240px;max-width:360px;font-weight:400}.search-field>svg{position:absolute;left:10px;top:50%;margin-top:-8px;color:var(--faint);pointer-events:none}.search-field input{padding-left:32px}.filter-bar .compact-field{width:auto;min-width:120px;max-width:180px;flex:0 0 auto}.filter-bar input.compact-field{width:140px}.more-filters{position:relative}.more-filters summary{display:flex;align-items:center;gap:6px;min-height:36px;padding:6px 12px;border-radius:8px;color:var(--muted);cursor:pointer;list-style:none;font-weight:500}.more-filters summary::-webkit-details-marker{display:none}.more-filters summary:hover,.more-filters[open] summary{background:var(--surface-2);color:var(--text)}.more-filters .popover{position:absolute;right:0;top:calc(100% + 6px);z-index:20;width:300px;display:grid;gap:12px;padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:var(--shadow-pop)}.count-badge{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--accent-soft);color:var(--accent);font-size:11px;line-height:18px}.filter-tokens{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:10px 16px 0}.filter-token{display:inline-flex;align-items:center;gap:2px;padding:1px 3px 1px 10px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-size:12px;line-height:20px}.filter-token button{min-height:20px;width:20px;padding:0;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:50%;background:transparent;color:inherit}.filter-token button:hover:not(:disabled){background:#0000000f}.filter-tokens .text-button{min-height:20px;font-size:12px}.list-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:4px 16px;font-size:12px;line-height:16px;color:var(--muted)}.list-meta b{color:var(--text);font-variant-numeric:tabular-nums}.list-meta .ghost-button{min-height:30px;font-size:12px}.list-note{padding:0 16px;font-size:12px}.history-panel .table-scroll,.history-panel>.panel-body>.empty{margin:0 8px}.history-panel .pagination{margin:0;padding:12px 16px;border-top:1px solid var(--border)}.history-panel>.panel-body>.notice{margin:12px 16px}.table-row.clickable{cursor:pointer}.table-row.checked{background:color-mix(in srgb,var(--accent-soft) 55%,var(--surface))}.table-row.active,.table-row.active:hover{background:var(--row-active);box-shadow:inset 3px 0 0 var(--accent)}.table-row:hover{background:var(--row-hover)}.hash-cell{display:flex;align-items:center;min-width:0}.bulk-bar{position:fixed;left:50%;bottom:20px;z-index:60;transform:translate(-50%);display:flex;align-items:center;gap:10px;padding:8px 8px 8px 16px;border-radius:12px;background:var(--text);color:var(--bg);box-shadow:var(--shadow-pop);animation:rise-in .2s cubic-bezier(.22,1,.36,1)}.bulk-bar button{min-height:32px;background:transparent;border-color:color-mix(in srgb,var(--bg) 30%,transparent);color:var(--bg)}.bulk-bar button:hover:not(:disabled){background:color-mix(in srgb,var(--bg) 14%,transparent);border-color:color-mix(in srgb,var(--bg) 40%,transparent)}@keyframes rise-in{0%{opacity:0;transform:translate(-50%,16px)}}.drawer-scrim{position:fixed;inset:0;z-index:69;background:#10101633;opacity:0;transition:opacity .24s ease}.drawer-scrim.shown{opacity:1}.drawer{position:fixed;inset:0 0 0 auto;z-index:70;margin:0;width:min(520px,100vw);height:100dvh;max-width:none;max-height:none;padding:0;border:0;border-left:1px solid var(--border);border-radius:0;display:flex;flex-direction:column;background:var(--surface);color:var(--text);box-shadow:var(--shadow-pop);overflow:hidden;outline:none;transform:translate(100%);transition:transform .24s cubic-bezier(.22,1,.36,1)}.drawer.shown{transform:none}.drawer-header{display:flex;flex-direction:column;gap:8px;padding:14px 20px;border-bottom:1px solid var(--border)}.drawer-header h2{margin:0;font-size:16px;line-height:24px;overflow-wrap:anywhere}.drawer-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;line-height:16px;color:var(--muted);min-height:32px}.drawer-nav{display:flex;align-items:center;gap:2px;margin-left:auto;color:var(--faint)}.drawer-nav>span{margin-right:6px;font-variant-numeric:tabular-nums}.drawer-nav .icon-button{min-height:30px;width:30px;min-width:30px;border-color:transparent;background:transparent}.drawer-body{flex:1;overflow:auto;padding:16px 20px 24px;display:flex;flex-direction:column;gap:18px}.drawer-body h3{margin:0 0 10px;font-size:13px}.drawer-body .notice{margin:0}.drawer-body .json-result{margin-top:0}.drawer-footer{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px;border-top:1px solid var(--border)}.reason-box{margin:0;padding:10px 12px;border-radius:10px;background:var(--surface-2);overflow-wrap:anywhere}.reason-box.warn{background:var(--warning-bg);color:var(--orange)}.reason-box.bad{background:var(--error-bg);color:var(--red)}.detail-list{display:grid;grid-template-columns:104px minmax(0,1fr);gap:8px 12px;margin:0;font-size:13px;line-height:20px}.detail-list>div{display:contents}.detail-list dt{color:var(--muted)}.detail-list dd{margin:0;min-width:0}.stat-strip{grid-template-columns:repeat(4,minmax(0,160px));margin:0;padding:12px 16px 0}.stat-strip .metric-card{padding:10px 14px}.stat-strip .metric-card.warn .metric{color:var(--orange)}.stat-strip .metric-card.bad .metric{color:var(--red)}.feed-strip{display:flex;gap:8px;margin-bottom:16px;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}.feed-card{flex:0 0 auto;display:flex;align-items:center;gap:10px;min-height:0;padding:8px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface);text-align:left;font-weight:400;max-width:320px}.feed-card>span{display:flex;flex-direction:column;min-width:0}.feed-card b{font-weight:500;font-size:13px;line-height:20px}.feed-card small{color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.feed-card.bad{border-color:var(--error-border)}.feed-card.bad small{color:var(--red)}.feed-card.warn{border-color:var(--warning-border);background:var(--warning-bg)}.feed-strip-note{margin:0 0 16px;font-size:12px}@media(min-width:1280px){.drawer-scrim{background:transparent}}@media(max-width:1000px){.overview-columns{grid-template-columns:1fr}.today-strip{grid-template-columns:1fr 1fr}.today-strip>div:nth-child(3){border-left:0}.today-strip>div:nth-child(n+3){border-top:1px solid var(--border)}}@media(max-width:900px){.flow-band{grid-template-columns:1fr}.flow-band a{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:10px 16px}.flow-band a+a{border-left:0;border-top:1px solid var(--border)}.flow-band a+a:before{left:22px;top:-8px;margin-top:0;transform:rotate(90deg)}.flow-band a:last-child{grid-column:auto}.flow-band .pipeline-icon{margin:0}.flow-band .pipeline-count{grid-row:1;grid-column:2;align-items:flex-end}.flow-band .pipeline-count b{font-size:22px;line-height:28px}}@media(max-width:760px){.page-header>.actions{margin-left:0}.attention-item{flex:1 1 100%}.filter-bar{padding:0 12px 12px}.search-field{flex-basis:100%;max-width:none}.filter-bar .segmented{order:2;flex:1 1 100%;overflow-x:auto;scrollbar-width:none}.filter-bar .compact-field,.filter-bar input.compact-field{flex:1 1 30%;min-width:0;max-width:none;width:auto}.more-filters .popover{width:min(300px,calc(100vw - 48px))}.list-meta{padding:4px 12px}.stat-strip{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px 12px 0}.drawer{inset:auto 0 0;width:100vw;height:88dvh;border-left:0;border-top:1px solid var(--border);border-radius:16px 16px 0 0;transform:translateY(100%)}.drawer.shown{transform:none}.bulk-bar{bottom:12px;width:calc(100vw - 24px);justify-content:space-between}.bulk-bar button{min-height:40px}.detail-list{grid-template-columns:88px minmax(0,1fr)}}@media(prefers-reduced-motion:reduce){.bulk-bar{animation:none}}#main-content:focus,#main-content:focus-visible,.drawer:focus,.drawer:focus-visible,dialog:focus,dialog:focus-visible{outline:none}dialog::backdrop{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}dialog:not(.drawer){box-shadow:0 20px 60px #20103a33,0 2px 8px #20103a14}:root[data-theme=dark] dialog:not(.drawer){box-shadow:0 20px 60px #000c,0 0 0 1px #ffffff0a}dialog:modal:not(.drawer),.dialog-ghost{margin:min(14vh,128px) auto auto;max-height:calc(100dvh - min(14vh,128px) - 24px)}.dialog-ghost{position:fixed;inset:0;z-index:1000;pointer-events:none}@media(max-width:760px){dialog:modal:not(.drawer),.dialog-ghost{margin-top:12px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 24px)}}.online-pill{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border-radius:999px;border:1px solid var(--success-border);background:var(--success-bg);color:var(--green);font-size:12px;line-height:20px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}.online-pill.partial{border-color:var(--warning-border);background:var(--warning-bg);color:var(--orange)}.online-pill.partial .dot{background:var(--orange)}.online-pill.unknown{border-color:var(--border);background:var(--surface-2);color:var(--muted)}.online-pill.unknown .dot{background:var(--faint)}.page-title>h1,.page-title>h2{margin:0}.attention-item{align-items:center;padding:8px 8px 8px 14px}.attention-item>svg{margin-top:0}.attention-text{min-width:0}.attention-go{margin-left:8px;padding:2px 6px;border-radius:6px}.attention-go:hover{text-decoration:none;color:var(--text);background:#0000000d}:root[data-theme=dark] .attention-go:hover{background:#ffffff12}.attention-dismiss{min-height:24px;width:24px;min-width:24px;padding:0;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:6px;background:transparent;color:var(--faint)}.attention-dismiss:hover:not(:disabled){background:#0000000d;color:var(--text)}:root[data-theme=dark] .attention-dismiss:hover:not(:disabled){background:#ffffff12}@media(max-width:760px){.attention-dismiss{min-height:36px;width:36px;min-width:36px}}:root[data-theme=dark]{--accent:#a676f9;--accent-hover:#bf9cfc;--accent-soft:#2f1d4e;--brand:#7845ed;--brand-hover:#642ce8;--blue:#70a0ff;--green:#5ad88e;--red:#ff7088;--orange:#f8ba4f;--success-bg:#19432a;--success-border:#2d764b;--error-bg:#481925;--error-border:#8f324a;--warning-bg:#473515;--warning-border:#876222;--info-bg:#1d335d;--row-active:#2c2142}.brand-mark{display:block;flex-shrink:0;background:none;box-shadow:none;border-radius:0}.select-root{display:inline-flex;position:relative;min-width:0;width:100%}.select-control{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-width:0;text-align:left;background:var(--bg);font-weight:400}.select-control>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.select-control>svg{flex-shrink:0}.select-root.compact-field{padding:0;border:0}.select-options{position:fixed;inset:auto;margin:0;padding:4px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);box-shadow:0 8px 24px #0003;z-index:1500}.select-options [role=option]{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:40px;padding:8px 12px;border-radius:4px;cursor:pointer;overflow-wrap:anywhere}.select-options [role=option]>span{min-width:0}.select-options [role=option]>svg{flex-shrink:0}.select-options [role=option].active{background:var(--accent-soft);color:var(--accent)}.select-options [role=option].disabled{opacity:.5;cursor:not-allowed}.select-options [aria-selected=true]{font-weight:600}.pagination .select-root{width:88px}.auth-initializing{min-height:100dvh;display:grid;place-items:center}.auth-initializing .brand-mark{opacity:.6}.content-refresh{display:flex;justify-content:flex-end;gap:8px;align-items:center;margin-bottom:12px}.snapshot-clock{display:block;font-size:12px;color:var(--muted)}.panel>header>.actions,.page-header>.actions{margin-left:auto;justify-content:flex-end}

/* Compact site cards layout */
.object-grid.site-grid{grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:10px}
.site-grid .object-card{padding:10px 12px;gap:8px;border-radius:10px}
.site-grid .object-heading{flex-wrap:nowrap;align-items:center;gap:8px}
.site-grid .object-icon{width:28px;height:28px;flex:0 0 28px;border-radius:8px}
.site-grid .object-icon svg{width:15px;height:15px}
.site-grid .config-identity{min-width:0}
.site-grid .config-identity strong{font-size:14px;line-height:18px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.site-grid .config-identity>span{font-size:11px;line-height:14px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.site-grid .object-heading>.status{font-size:11px;line-height:16px;padding:1px 7px;flex-shrink:0;white-space:nowrap}
.site-grid .card-tags{gap:4px 5px;margin:0}
.site-grid .card-tags>span{font-size:11px;line-height:16px;padding:1px 6px}
.site-grid .definition-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px 8px;margin:0;padding:6px 8px;background:var(--surface-2);border-radius:8px}
.site-grid .definition-list>div{min-width:0}
.site-grid .definition-list dt{font-size:11px;line-height:14px;margin-bottom:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.site-grid .definition-list dd{font-size:12px;line-height:16px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.site-grid .danger-text{margin:0;font-size:11px;line-height:15px}
.site-grid .object-card>.actions{padding-top:7px;gap:4px;flex-wrap:nowrap;justify-content:flex-end}
.site-grid .object-card>.actions button{font-size:11px;line-height:15px;min-height:24px;padding:2px 7px;border-radius:6px;white-space:nowrap;flex:0 0 auto}
.site-grid .object-card>.actions button:first-child{margin-left:0}
@media(max-width:760px){
  .object-grid.site-grid{grid-template-columns:1fr;gap:10px}
  .site-grid .object-card>.actions{flex-wrap:wrap}
  .site-grid .object-card>.actions button{min-height:30px;flex:1 1 auto}
}

/* Redesigned Transfer Statistics Dashboard (.stats-page) */
.stats-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stats-page .panel {
  margin-bottom: 0;
  border-radius: 12px;
}
.stats-page .panel > header {
  padding: 12px 16px;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.stats-page .panel > header h2 {
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  margin: 0;
}
.stats-page .panel-body {
  padding: 12px 16px 14px;
}

/* Row 1: 4 Equal-Width Full-Span KPI Cards */
.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stats-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}
.stats-kpi::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
}
.stats-kpi-total::before { background: linear-gradient(90deg, var(--accent), var(--blue)); }
.stats-kpi-transfer::before { background: var(--accent); }
.stats-kpi-cross::before { background: var(--green); }
.stats-kpi-upload::before { background: var(--blue); }

.stats-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.stats-kpi-label {
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
  font-weight: 500;
}
.stats-kpi-badge {
  font-size: 11px;
  line-height: 16px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stats-badge-accent { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.stats-badge-green { background: var(--success-bg); color: var(--green); font-weight: 600; }
.stats-badge-blue { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); font-weight: 600; }

.stats-kpi-value {
  font-size: 26px;
  line-height: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stats-kpi-sub {
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-kpi-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin-top: 6px;
}
.stats-kpi-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
}

/* Row 2: Balanced 2-Column Workspace */
.stats-main-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) minmax(0, 1.38fr);
  gap: 14px;
  align-items: stretch;
}
.stats-left-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.stats-left-col > .panel:last-child {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.stats-left-col > .panel:last-child > .panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Meta pills & controls */
.stats-meta-pill {
  font-size: 11px;
  line-height: 16px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stats-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.stats-controls .select-root {
  min-width: 116px;
}
.stats-controls button.stats-btn-sm {
  font-size: 12px;
  line-height: 16px;
  min-height: 28px;
  padding: 4px 10px;
}
.stats-seg {
  display: inline-flex;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.stats-seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.stats-seg button:hover {
  color: var(--text);
}
.stats-seg button.is-active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Rank badges & progress fills */
.stats-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--surface-2);
  color: var(--muted);
  flex-shrink: 0;
}
.stats-rank-1 { background: var(--accent); color: var(--on-brand); }
.stats-rank-2 { background: var(--accent-soft); color: var(--accent); }
.stats-rank-3 { background: var(--success-bg); color: var(--green); }

.stats-prog-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  width: 100%;
}
.stats-prog-track > span,
.stats-stack-bar > span {
  display: block;
  height: 100%;
}
.stats-fill-accent { background: var(--accent); border-radius: 999px; }
.stats-fill-green { background: var(--green); border-radius: 999px; }
.stats-fill-blue { background: var(--blue); border-radius: 999px; }

.stats-stack-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  display: flex;
  width: 100%;
}
.stats-stack-bar > span { border-radius: 0; }
.stats-stack-bar > span:first-child { border-top-left-radius: 999px; border-bottom-left-radius: 999px; }
.stats-stack-bar > span:last-child { border-top-right-radius: 999px; border-bottom-right-radius: 999px; }

/* Source list */
.stats-source-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stats-source-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.stats-source-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.stats-source-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.stats-source-name strong {
  font-size: 13px;
  color: var(--text);
}
.stats-tag-note {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-2);
  padding: 0 6px;
  border-radius: 999px;
}
.stats-source-nums {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stats-source-nums strong { font-size: 13px; color: var(--text); }
.stats-source-nums span { font-size: 11px; color: var(--muted); min-width: 38px; text-align: right; }

.stats-inline-details {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--muted);
}
.stats-inline-details summary {
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: var(--muted);
}
.stats-raw-list {
  margin-top: 8px;
  max-height: 150px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
}
.stats-raw-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  padding: 2px 0;
}
.stats-raw-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-raw-item strong {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* Daily vertical bar chart */
.stats-bar-chart {
  flex: 1;
  min-height: 185px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 4px 4px;
}
.stats-bar-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stats-bar-val {
  font-size: 10px;
  line-height: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.stats-bar-wrap {
  flex: 1;
  width: 100%;
  min-height: 125px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 2px;
}
.stats-bar-fill {
  width: 100%;
  max-width: 28px;
  border-radius: 5px 5px 2px 2px;
  background: color-mix(in srgb, var(--accent) 72%, var(--blue) 28%);
  transition: height 0.25s ease, opacity 0.15s ease;
}
.stats-bar-col:hover .stats-bar-fill { opacity: 0.85; }
.stats-bar-col.is-peak .stats-bar-fill { background: var(--accent); }
.stats-bar-col.is-peak .stats-bar-val { color: var(--accent); font-weight: 700; }
.stats-bar-date {
  font-size: 10px;
  line-height: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stats-chart-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Legend & Compact Data Tables */
.stats-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}
.stats-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.stats-legend-right {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.stats-dot-accent,
.stats-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}
.stats-dot-accent { background: var(--accent); }
.stats-dot-green { background: var(--green); }

.stats-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  scrollbar-width: thin;
}
.stats-target-scroll {
  max-height: 460px;
}
.stats-upload-scroll {
  max-height: 420px;
}
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 18px;
}
.stats-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.stats-table tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
.stats-table tbody tr:last-child td { border-bottom: 0; }
.stats-table tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 35%, transparent); }

.stats-table .col-rank { width: 34px; text-align: center; padding-left: 8px; padding-right: 4px; }
.stats-table .col-site { width: 110px; white-space: nowrap; }
.stats-table .col-bar { width: auto; min-width: 110px; }
.stats-table .col-num,
.stats-table .col-pct,
.stats-table .col-upload {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stats-table .col-num { width: 68px; }
.stats-table .col-pct { width: 58px; color: var(--muted); font-size: 11.5px; }
.stats-table .col-upload { width: 96px; font-weight: 600; color: var(--text); }
.stats-table td.is-strong { font-weight: 700; color: var(--text); }
.stats-table td.is-zero { color: var(--muted); opacity: 0.55; }

/* Row 3: Top Multi-Site Published Works */
.stats-top-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stats-top-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.stats-top-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.stats-top-title {
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-top-sites {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.stats-site-chip {
  font-size: 11px;
  line-height: 15px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}
.stats-top-count {
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Row 4: Upload Time-Series Summary Strip */
.stats-upload-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 12px;
}
.stats-upload-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.stats-upload-summary strong {
  color: var(--text);
  font-weight: 700;
  margin-left: 3px;
}
.stats-upload-meta {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Footnote */
.stats-footnote {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 2px;
}
.stats-footnote summary {
  cursor: pointer;
  user-select: none;
}
.stats-footnote p {
  margin: 6px 0 0;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 1100px) {
  .stats-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-main-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .stats-kpi-grid { grid-template-columns: 1fr; }
  .stats-table .col-bar { display: none; }
  .stats-top-title { white-space: normal; }
}


/* Download tasks: transferred & cross-seeded site badges under torrent name */
.download-tasks .table-row {
  padding: 6px 14px;
  height: 58px;
  box-sizing: border-box;
}
.download-tasks .task-name-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  width: 100%;
}
.download-tasks .task-name-title {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.download-tasks .task-site-badges {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.task-site-group {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  line-height: 15px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.task-site-group.is-pub {
  background: var(--accent);
  color: var(--on-brand);
}
.task-site-group.is-cs {
  background: var(--green);
  color: #fff;
}
.task-site-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  line-height: 15px;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}
.task-site-pill.is-pub {
  background: var(--accent-soft);
  color: var(--accent);
}
.task-site-pill.is-cs {
  background: var(--success-bg);
  color: var(--green);
}
.task-site-pill.is-more {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.download-tasks .task-count-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.download-tasks .task-badge-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

/* Dashboard Page (.dash-page) */
.dash-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dash-page .panel {
  margin-bottom: 0;
  border-radius: 12px;
}
.dash-page .panel > header {
  padding: 12px 16px;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.dash-page .panel > header h2 {
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  margin: 0;
}
.dash-page .panel-body {
  padding: 12px 16px 14px;
}
.dash-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 14px;
  align-items: start;
}
.dash-side-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* Toolbar above recent list */
.dash-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.dash-search {
  flex: 1;
  min-width: 200px;
  height: 32px;
  padding: 4px 10px;
  font-size: 12.5px;
  border-radius: 8px;
}
.dash-active-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 3px 9px;
  min-height: 26px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}
.dash-legend {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}
.dash-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Recent Completed Resource Cards */
.dash-resource-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 680px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}
.dash-resource-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: border-color 0.15s ease;
}
.dash-resource-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.dash-res-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dash-res-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}
.dash-src-tag {
  font-size: 10.5px;
  line-height: 15px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
}
.dash-res-title {
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-res-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.dash-res-time {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dash-res-total {
  font-size: 11px;
  line-height: 16px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dash-res-sites {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-site-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.dash-pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.dash-pill-btn {
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 0;
}
.dash-pill-btn:hover {
  filter: brightness(0.95);
}
.dash-pill-btn.is-selected {
  border-color: currentColor;
  font-weight: 700;
}

/* Events table mode */
.dash-events-scroll {
  max-height: 680px;
}
.dash-ev-time {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
}
.dash-ev-name {
  max-width: 420px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.dash-site-link {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 0;
  color: var(--text);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
}
.dash-site-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Hourly / Daily sparkbar chart */
.dash-spark-chart {
  height: 140px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding-top: 6px;
}
.dash-spark-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.dash-spark-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dash-spark-stack {
  width: 100%;
  max-width: 14px;
  border-radius: 3px 3px 1px 1px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.dash-spark-stack > span {
  display: block;
  width: 100%;
  border-radius: 0;
}
.dash-spark-lbl {
  font-size: 9.5px;
  line-height: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Clickable site breakdown list */
.dash-site-rank-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 460px;
  overflow: auto;
  scrollbar-width: thin;
}
.dash-site-rank-row {
  display: grid;
  grid-template-columns: 22px 76px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 8px;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.dash-site-rank-row:hover {
  background: var(--surface-2);
}
.dash-site-rank-row.is-selected {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.dash-site-rank-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-site-rank-nums {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dash-site-rank-nums strong {
  font-size: 12.5px;
  color: var(--text);
}
.dash-site-rank-nums small {
  font-size: 10.5px;
  color: var(--muted);
}

@media (max-width: 1120px) {
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .dash-res-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .dash-res-title { white-space: normal; }
  .dash-ev-name { max-width: 180px; }
}


/* 5-column Dashboard KPI grid */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1280px) {
  .dash-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dash-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .dash-kpi-grid { grid-template-columns: 1fr; }
}

/* ===== Vivid Jewel-Tone Theme Upgrade (Light + Dark) ===== */
:root {
  /* Elevated global palette: crisp cool canvas + jewel brand accents */
  --bg: #f1f4fa;
  --surface: #ffffff;
  --surface-2: #e9eef8;
  --border: #d9e1f0;
  --border-strong: #c2cee5;
  --text: #16192c;
  --muted: #55607a;
  --faint: #7f8aa3;
  --accent: #6366f1;
  --brand: #6366f1;
  --brand-hover: #4f46e5;
  --accent-hover: #4f46e5;
  --accent-soft: #e0e7ff;
  --blue: #0284c7;
  --green: #059669;
  --orange: #d97706;
  --red: #e11d48;
  --row-hover: #f3f6fd;
  --row-active: #e8eeff;
  --info-bg: #e0f2fe;

  /* 5 Jewel-Tone Semantic Scales */
  --v-blue-1: #0ea5e9;
  --v-blue-2: #2563eb;
  --v-blue-text: #0369a1;
  --v-blue-bg: #dbeafe;
  --v-blue-bd: #60a5fa;

  --v-amber-1: #f59e0b;
  --v-amber-2: #ea580c;
  --v-amber-text: #b45309;
  --v-amber-bg: #fef3c7;
  --v-amber-bd: #fbbf24;

  --v-indigo-1: #6366f1;
  --v-indigo-2: #4f46e5;
  --v-indigo-text: #3730a3;
  --v-indigo-bg: #e0e7ff;
  --v-indigo-bd: #818cf8;

  --v-violet-1: #7c3aed;
  --v-violet-2: #a855f7;
  --v-violet-text: #6d28d9;
  --v-violet-bg: #f3e8ff;
  --v-violet-bd: #c084fc;

  --v-emerald-1: #059669;
  --v-emerald-2: #10b981;
  --v-emerald-text: #047857;
  --v-emerald-bg: #d1fae5;
  --v-emerald-bd: #34d399;
}

:root[data-theme="dark"] {
  --bg: #0d101b;
  --surface: #151929;
  --surface-2: #1e2438;
  --border: #2c3550;
  --border-strong: #3d486b;
  --text: #f1f5f9;
  --muted: #9aa7c4;
  --faint: #7382a3;
  --accent: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-soft: #262b4d;
  --brand: #6366f1;
  --brand-hover: #4f46e5;
  --blue: #38bdf8;
  --green: #34d399;
  --orange: #fbbf24;
  --red: #fb7185;
  --row-hover: #1b2136;
  --row-active: #252c4a;
  --info-bg: #152b47;

  --v-blue-text: #38bdf8;
  --v-blue-bg: rgba(14, 165, 233, 0.22);
  --v-blue-bd: rgba(56, 189, 248, 0.5);

  --v-amber-text: #fbbf24;
  --v-amber-bg: rgba(245, 158, 11, 0.22);
  --v-amber-bd: rgba(251, 191, 36, 0.5);

  --v-indigo-text: #a5b4fc;
  --v-indigo-bg: rgba(99, 102, 241, 0.24);
  --v-indigo-bd: rgba(129, 140, 248, 0.52);

  --v-violet-text: #d8b4fe;
  --v-violet-bg: rgba(139, 92, 246, 0.24);
  --v-violet-bd: rgba(192, 132, 252, 0.52);

  --v-emerald-text: #6ee7b7;
  --v-emerald-bg: rgba(16, 185, 129, 0.24);
  --v-emerald-bd: rgba(52, 211, 153, 0.52);
}

/* Panels: crisp contrast against cool canvas */
.dash-page .panel,
.stats-page .panel {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--v-indigo-1) 18%, var(--border));
  box-shadow: 0 4px 16px rgba(37, 56, 120, 0.06);
}
.dash-page .panel > header,
.stats-page .panel > header {
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-indigo-1) 6%, var(--surface)), var(--surface));
}
:root[data-theme="dark"] .dash-page .panel,
:root[data-theme="dark"] .stats-page .panel {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.32);
}

/* Vivid KPI Cards (Dashboard 5-col + Stats 4-col) */
.stats-kpi {
  border-color: color-mix(in srgb, var(--border) 80%, var(--v-indigo-1));
  box-shadow: 0 4px 14px rgba(37, 56, 120, 0.07);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.stats-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.14);
}
.stats-kpi::before {
  height: 4px;
}
.stats-kpi-label {
  font-weight: 600;
}

/* 1. 当日上传总流量 -> Vivid Ocean / Royal Blue */
.dash-kpi-grid > .stats-kpi:nth-child(1),
.stats-kpi-upload {
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-blue-1) 16%, var(--surface)) 0%, var(--surface) 76%);
  border-color: color-mix(in srgb, var(--v-blue-1) 38%, var(--border));
}
.dash-kpi-grid > .stats-kpi:nth-child(1)::before,
.stats-kpi-upload::before {
  background: linear-gradient(90deg, #06b6d4, var(--v-blue-1), var(--v-blue-2));
}
.dash-kpi-grid > .stats-kpi:nth-child(1) .stats-kpi-value,
.stats-kpi-upload .stats-kpi-value {
  color: var(--v-blue-text);
}

/* 2. 今日完成资源 -> Vivid Warm Amber / Orange */
.dash-kpi-grid > .stats-kpi:nth-child(2) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-amber-1) 16%, var(--surface)) 0%, var(--surface) 76%);
  border-color: color-mix(in srgb, var(--v-amber-1) 40%, var(--border));
}
.dash-kpi-grid > .stats-kpi:nth-child(2)::before {
  background: linear-gradient(90deg, #fbbf24, var(--v-amber-1), var(--v-amber-2));
}
.dash-kpi-grid > .stats-kpi:nth-child(2) .stats-kpi-value {
  color: var(--v-amber-text);
}
.dash-kpi-grid > .stats-kpi:nth-child(2) .stats-kpi-badge {
  background: var(--v-amber-bg);
  color: var(--v-amber-text);
  border: 1px solid var(--v-amber-bd);
  font-weight: 700;
}

/* 3. 今日完成总次数 -> Vivid Electric Indigo */
.dash-kpi-grid > .stats-kpi:nth-child(3),
.stats-kpi-grid > .stats-kpi-total {
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-indigo-1) 15%, var(--surface)) 0%, var(--surface) 76%);
  border-color: color-mix(in srgb, var(--v-indigo-1) 38%, var(--border));
}
.dash-kpi-grid > .stats-kpi:nth-child(3)::before,
.stats-kpi-grid > .stats-kpi-total::before {
  background: linear-gradient(90deg, var(--v-blue-2), var(--v-indigo-1), var(--v-violet-1));
}
.dash-kpi-grid > .stats-kpi:nth-child(3) .stats-kpi-value,
.stats-kpi-grid > .stats-kpi-total .stats-kpi-value {
  color: var(--v-indigo-text);
}
.dash-kpi-grid > .stats-kpi:nth-child(3) .stats-kpi-badge,
.stats-kpi-grid > .stats-kpi-total .stats-kpi-badge {
  background: var(--v-indigo-bg);
  color: var(--v-indigo-text);
  border: 1px solid var(--v-indigo-bd);
  font-weight: 700;
}

/* 4. 今日转种成功 -> Vivid Royal Violet */
.dash-kpi-grid > .stats-kpi:nth-child(4),
.stats-kpi-transfer {
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-violet-1) 15%, var(--surface)) 0%, var(--surface) 76%);
  border-color: color-mix(in srgb, var(--v-violet-1) 38%, var(--border));
}
.dash-kpi-grid > .stats-kpi:nth-child(4)::before,
.stats-kpi-transfer::before {
  background: linear-gradient(90deg, var(--v-indigo-1), var(--v-violet-1), var(--v-violet-2));
}
.dash-kpi-grid > .stats-kpi:nth-child(4) .stats-kpi-value,
.stats-kpi-transfer .stats-kpi-value {
  color: var(--v-violet-text);
}

/* 5. 今日辅种成功 -> Vivid Emerald Teal */
.dash-kpi-grid > .stats-kpi:nth-child(5),
.stats-kpi-cross {
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-emerald-2) 16%, var(--surface)) 0%, var(--surface) 76%);
  border-color: color-mix(in srgb, var(--v-emerald-2) 40%, var(--border));
}
.dash-kpi-grid > .stats-kpi:nth-child(5)::before,
.stats-kpi-cross::before {
  background: linear-gradient(90deg, var(--v-emerald-1), var(--v-emerald-2), #14b8a6);
}
.dash-kpi-grid > .stats-kpi:nth-child(5) .stats-kpi-value,
.stats-kpi-cross .stats-kpi-value {
  color: var(--v-emerald-text);
}

/* Vivid KPI Badges */
.stats-badge-blue {
  background: var(--v-blue-bg);
  color: var(--v-blue-text);
  border: 1px solid var(--v-blue-bd);
  font-weight: 700;
}
.stats-badge-accent {
  background: var(--v-violet-bg);
  color: var(--v-violet-text);
  border: 1px solid var(--v-violet-bd);
  font-weight: 700;
}
.stats-badge-green {
  background: var(--v-emerald-bg);
  color: var(--v-emerald-text);
  border: 1px solid var(--v-emerald-bd);
  font-weight: 700;
}

/* Vivid Segmented Controls */
.stats-seg {
  background: color-mix(in srgb, var(--v-indigo-1) 9%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--v-indigo-1) 18%, var(--border));
}
.stats-seg button.is-active {
  background: linear-gradient(135deg, var(--v-indigo-1), var(--v-violet-1));
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 7px rgba(99, 102, 241, 0.38);
}

/* Vivid Gradient Progress Bars & Legend Dots */
.stats-fill-accent {
  background: linear-gradient(90deg, var(--v-indigo-1), var(--v-violet-2));
}
.stats-fill-green {
  background: linear-gradient(90deg, var(--v-emerald-1), #14b8a6);
}
.stats-fill-blue {
  background: linear-gradient(90deg, var(--v-blue-1), var(--v-blue-2));
}
.stats-dot-accent {
  background: var(--v-violet-1);
  box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--v-violet-1) 25%, transparent);
}
.stats-dot-green {
  background: var(--v-emerald-2);
  box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--v-emerald-2) 26%, transparent);
}
.stats-kpi-bar {
  height: 7px;
  border-radius: 999px;
}

/* Vivid Top-3 Rank Medals */
.stats-rank-1 {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.35);
}
.stats-rank-2 {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}
.stats-rank-3 {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

/* Vivid Transfer / Crossseed Group Badges & Site Pills (Dashboard + Download Tasks) */
.task-site-group.is-pub {
  background: linear-gradient(135deg, var(--v-indigo-1), var(--v-violet-1));
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(124, 58, 237, 0.3);
}
.task-site-group.is-cs {
  background: linear-gradient(135deg, var(--v-emerald-1), var(--v-emerald-2));
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
}
.task-site-pill.is-pub {
  background: var(--v-violet-bg);
  color: var(--v-violet-text);
  border: 1px solid var(--v-violet-bd);
  font-weight: 600;
}
.task-site-pill.is-cs {
  background: var(--v-emerald-bg);
  color: var(--v-emerald-text);
  border: 1px solid var(--v-emerald-bd);
  font-weight: 600;
}
.task-site-pill.is-pub.dash-pill-btn:hover {
  background: color-mix(in srgb, var(--v-violet-1) 18%, var(--surface));
  filter: none;
}
.task-site-pill.is-cs.dash-pill-btn:hover {
  background: color-mix(in srgb, var(--v-emerald-2) 20%, var(--surface));
  filter: none;
}
.task-site-pill.is-pub.dash-pill-btn.is-selected {
  background: linear-gradient(135deg, var(--v-indigo-1), var(--v-violet-1));
  color: #ffffff;
  border-color: var(--v-violet-1);
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.32);
}
.task-site-pill.is-cs.dash-pill-btn.is-selected {
  background: linear-gradient(135deg, var(--v-emerald-1), var(--v-emerald-2));
  color: #ffffff;
  border-color: var(--v-emerald-1);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.32);
}

/* Vivid Resource Cards in Dashboard */
.dash-resource-card {
  background: linear-gradient(90deg, color-mix(in srgb, var(--v-indigo-1) 5%, var(--surface)) 0%, var(--surface) 32%);
  border-color: color-mix(in srgb, var(--v-indigo-1) 18%, var(--border));
  border-left: 3.5px solid var(--v-indigo-1);
  box-shadow: 0 2px 6px rgba(37, 56, 120, 0.045);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.dash-resource-card:hover {
  border-color: color-mix(in srgb, var(--v-violet-1) 48%, var(--border));
  border-left-color: var(--v-violet-1);
  box-shadow: 0 5px 14px rgba(99, 102, 241, 0.12);
}
.dash-src-tag {
  background: var(--v-indigo-bg);
  color: var(--v-indigo-text);
  border: 1px solid var(--v-indigo-bd);
  font-weight: 700;
}
.dash-res-total {
  background: var(--v-blue-bg);
  color: var(--v-blue-text);
  border: 1px solid var(--v-blue-bd);
  font-weight: 700;
}

/* Vivid Sparkbars & Daily Bar Chart */
.dash-spark-stack {
  max-width: 16px;
  border-radius: 4px 4px 2px 2px;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.14);
}
.dash-spark-stack > .stats-fill-green {
  background: linear-gradient(180deg, #34d399, #059669);
}
.dash-spark-stack > .stats-fill-accent {
  background: linear-gradient(180deg, #8b5cf6, #4f46e5);
}
.dash-spark-col:hover .dash-spark-stack {
  filter: brightness(1.08);
  transform: scaleX(1.08);
}
.stats-bar-fill {
  background: linear-gradient(180deg, var(--v-blue-1), var(--v-indigo-1));
}
.stats-bar-col.is-peak .stats-bar-fill {
  background: linear-gradient(180deg, var(--v-violet-2), var(--v-indigo-2));
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.38);
}
.stats-bar-col.is-peak .stats-bar-val {
  color: var(--v-violet-text);
  font-weight: 700;
}

/* Vivid Top Navigation & Sub Navigation */
.group-navigation a.active {
  background: linear-gradient(135deg, var(--v-indigo-1), var(--v-violet-1));
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.36);
}
.group-navigation a.active:hover {
  color: #ffffff;
}
.group-navigation a.active svg {
  color: #ffffff;
}
.section-navigation a.active {
  color: var(--v-indigo-text);
  border-bottom-color: var(--v-indigo-1);
  font-weight: 600;
}

/* Vivid Site Breakdown Hover & Active Filter */
.dash-site-rank-row:hover {
  background: color-mix(in srgb, var(--v-indigo-1) 8%, var(--surface-2));
}
.dash-site-rank-row.is-selected {
  background: var(--v-violet-bg);
  border-color: var(--v-violet-1);
}
.dash-active-filter {
  background: linear-gradient(135deg, var(--v-indigo-1), var(--v-violet-1));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}
.stats-top-count {
  background: linear-gradient(135deg, var(--v-indigo-1), var(--v-violet-1));
  color: #ffffff;
}

/* ===== Global Polish: Panels, Primary Buttons & Status Pills ===== */
.panel {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--v-indigo-1) 16%, var(--border));
  box-shadow: 0 4px 16px rgba(37, 56, 120, 0.055);
}
:root[data-theme="dark"] .panel {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.32);
}
button.primary,
.primary {
  background: linear-gradient(135deg, var(--v-indigo-1), var(--v-violet-1));
  border-color: transparent;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.32);
}
button.primary:hover:not(:disabled),
.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--v-indigo-2), var(--v-violet-1));
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.42);
}
.status.good {
  background: var(--v-emerald-bg);
  color: var(--v-emerald-text);
  border: 1px solid var(--v-emerald-bd);
  font-weight: 600;
}
.status.attention {
  background: var(--v-amber-bg);
  color: var(--v-amber-text);
  border: 1px solid var(--v-amber-bd);
  font-weight: 600;
}
.status.info {
  background: var(--v-blue-bg);
  color: var(--v-blue-text);
  border: 1px solid var(--v-blue-bd);
  font-weight: 600;
}

/* ===== Vivid Site Configuration Cards (.site-grid) ===== */
.site-grid .object-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-indigo-1) 6%, var(--surface)) 0%, var(--surface) 44%);
  border: 1px solid color-mix(in srgb, var(--v-indigo-1) 20%, var(--border));
  box-shadow: 0 3px 12px rgba(37, 56, 120, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.site-grid .object-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, var(--v-indigo-1), var(--v-blue-1), var(--v-emerald-2));
}
.site-grid .object-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--v-indigo-1) 48%, var(--border));
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.14);
}

/* Online connected site card: crisp ocean-emerald top bar */
.site-grid .object-card:has(.card-tags > .status.good) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-blue-1) 7%, var(--surface)) 0%, var(--surface) 42%);
  border-color: color-mix(in srgb, var(--v-blue-1) 26%, var(--border));
}
.site-grid .object-card:has(.card-tags > .status.good)::before {
  background: linear-gradient(90deg, var(--v-indigo-1), var(--v-blue-1), var(--v-emerald-2));
}

/* Offline / not-connected site card: warm amber-orange alert accent */
.site-grid .object-card:has(.card-tags > .status:last-child:not(.good)) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-amber-1) 10%, var(--surface)) 0%, var(--surface) 46%);
  border-color: color-mix(in srgb, var(--v-amber-1) 42%, var(--border));
}
.site-grid .object-card:has(.card-tags > .status:last-child:not(.good))::before {
  background: linear-gradient(90deg, #f59e0b, #ea580c, #f43f5e);
}

/* Disabled site card: subtle cool slate dim */
.site-grid .object-card:has(.object-heading > .status:not(.good)) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--muted) 9%, var(--surface)) 0%, var(--surface) 45%);
  border-color: var(--border-strong);
  opacity: 0.86;
}
.site-grid .object-card:has(.object-heading > .status:not(.good))::before {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}

/* Site Icon: jewel gradient badge */
.site-grid .object-icon {
  background: linear-gradient(135deg, var(--v-indigo-1), var(--v-violet-1));
  color: #ffffff;
  box-shadow: 0 2px 7px rgba(99, 102, 241, 0.34);
}
.site-grid .object-icon svg {
  color: #ffffff;
}
.site-grid .object-card:has(.card-tags > .status:last-child:not(.good)) .object-icon {
  background: linear-gradient(135deg, var(--v-amber-1), var(--v-amber-2));
  box-shadow: 0 2px 7px rgba(234, 88, 12, 0.32);
}
.site-grid .object-card:has(.object-heading > .status:not(.good)) .object-icon {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  box-shadow: none;
}

/* Site Name & Domain */
.site-grid .config-identity strong {
  color: var(--text);
  font-weight: 700;
}
.site-grid .config-identity > span {
  color: var(--v-blue-text);
  opacity: 0.85;
}

/* Top-right Enabled/Disabled pill */
.site-grid .object-heading > .status.good {
  background: linear-gradient(135deg, var(--v-emerald-1), var(--v-emerald-2));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.28);
}
.site-grid .object-heading > .status:not(.good) {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border-strong);
  font-weight: 600;
}

/* Vivid Semantic Tags Row (Role / AutoTransfer / AutoCrossseed / Connection) */
.site-grid .card-tags > .status {
  border-radius: 6px;
  font-weight: 600;
}
/* 1st tag: Role (目标站 / 源站与目标站) -> Indigo */
.site-grid .card-tags > .status:first-child {
  background: var(--v-indigo-bg);
  color: var(--v-indigo-text);
  border: 1px solid var(--v-indigo-bd);
}
/* Middle capability tags (自动转载 / 自动辅种) -> Violet + Sky Blue */
.site-grid .card-tags > .status:not(:first-child):not(:last-child) {
  background: var(--v-violet-bg);
  color: var(--v-violet-text);
  border: 1px solid var(--v-violet-bd);
}
.site-grid .card-tags > .status:nth-child(3):not(:last-child) {
  background: var(--v-blue-bg);
  color: var(--v-blue-text);
  border: 1px solid var(--v-blue-bd);
}
/* Last tag: Connection state (已连接 = Emerald, 离线/未标记 = Amber) */
.site-grid .card-tags > .status:last-child.good {
  background: var(--v-emerald-bg);
  color: var(--v-emerald-text);
  border: 1px solid var(--v-emerald-bd);
}
.site-grid .card-tags > .status:last-child:not(.good) {
  background: var(--v-amber-bg);
  color: var(--v-amber-text);
  border: 1px solid var(--v-amber-bd);
}

/* Vivid 3x2 Metrics Box */
.site-grid .definition-list {
  background: linear-gradient(135deg, color-mix(in srgb, var(--v-indigo-1) 6%, var(--surface-2)), color-mix(in srgb, var(--v-blue-1) 5%, var(--surface-2)));
  border: 1px solid color-mix(in srgb, var(--v-indigo-1) 14%, var(--border));
  padding: 7px 9px;
}
.site-grid .definition-list dt {
  color: var(--muted);
  font-weight: 500;
}
.site-grid .definition-list dd {
  font-weight: 700;
}
/* 1: 账户 */
.site-grid .definition-list > div:nth-child(1) dd {
  color: var(--text);
}
/* 2: 认证方式 */
.site-grid .definition-list > div:nth-child(2) dd {
  color: var(--v-indigo-text);
}
/* 3: 上传总量 -> Ocean Blue */
.site-grid .definition-list > div:nth-child(3) dd {
  color: var(--v-blue-text);
}
/* 4: 下载总量 -> Muted Slate */
.site-grid .definition-list > div:nth-child(4) dd {
  color: var(--muted);
  font-weight: 600;
}
/* 5: 分享率 -> Warm Amber */
.site-grid .definition-list > div:nth-child(5) dd {
  color: var(--v-amber-text);
}
/* 6: 今日上传 -> Vivid Emerald */
.site-grid .definition-list > div:nth-child(6) dd {
  color: var(--v-emerald-text);
}

/* Crisp Action Buttons */
.site-grid .object-card > .actions {
  border-top: 1px solid color-mix(in srgb, var(--v-indigo-1) 12%, var(--border));
}
.site-grid .object-card > .actions button {
  border-color: color-mix(in srgb, var(--v-indigo-1) 18%, var(--border));
  background: var(--surface);
  font-weight: 500;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.site-grid .object-card > .actions button:hover:not(:disabled) {
  background: var(--v-indigo-bg);
  color: var(--v-indigo-text);
  border-color: var(--v-indigo-bd);
}
/* 检查连接 */
.site-grid .object-card > .actions button:nth-last-child(3) {
  background: color-mix(in srgb, var(--v-blue-bg) 55%, var(--surface));
  color: var(--v-blue-text);
  border-color: color-mix(in srgb, var(--v-blue-bd) 70%, var(--border));
}
.site-grid .object-card > .actions button:nth-last-child(3):hover:not(:disabled) {
  background: var(--v-blue-bg);
  border-color: var(--v-blue-1);
}
/* 编辑 */
.site-grid .object-card > .actions button:nth-last-child(2) {
  background: color-mix(in srgb, var(--v-indigo-bg) 60%, var(--surface));
  color: var(--v-indigo-text);
  border-color: color-mix(in srgb, var(--v-indigo-bd) 70%, var(--border));
}
.site-grid .object-card > .actions button:nth-last-child(2):hover:not(:disabled) {
  background: var(--v-indigo-bg);
  border-color: var(--v-indigo-1);
}
/* 删除 */
.site-grid .object-card > .actions button:last-child {
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 35%, var(--border));
}
.site-grid .object-card > .actions button:last-child:hover:not(:disabled) {
  background: color-mix(in srgb, var(--red) 16%, var(--surface));
  border-color: var(--red);
}


/* ===== Download Management (下载管理) Proportions & Visual Hierarchy Upgrade ===== */
.qb-cluster-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.qb-kpi-tile {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  min-width: 0;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.qb-kpi-tile.is-up.is-hot {
  background: linear-gradient(135deg, color-mix(in srgb, var(--green) 11%, var(--surface)) 0%, var(--surface) 75%);
  border-color: color-mix(in srgb, var(--green) 38%, var(--border));
}
.qb-kpi-tile.is-dl.is-hot {
  background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 10%, var(--surface)) 0%, var(--surface) 75%);
  border-color: color-mix(in srgb, var(--blue) 36%, var(--border));
}
.qb-kpi-tile.is-seed {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, var(--surface)) 0%, var(--surface) 78%);
}
.qb-kpi-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.qb-kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  flex: none;
}
.qb-kpi-icon.is-up { background: color-mix(in srgb, var(--green) 15%, var(--surface)); color: var(--green); }
.qb-kpi-icon.is-dl { background: color-mix(in srgb, var(--blue) 15%, var(--surface)); color: var(--blue); }
.qb-kpi-icon.is-seed { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.qb-kpi-icon.is-health { background: var(--surface-2); color: var(--muted); }
.qb-kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qb-live-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
}
.qb-kpi-value {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text);
}
.qb-kpi-value.upload-rate { color: var(--green); }
.qb-kpi-value.download-rate { color: var(--blue); }
.qb-kpi-tile.is-idle .qb-kpi-value { opacity: .55; }
.qb-kpi-denom {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}
.qb-kpi-sub {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 4-column balanced card grid on desktop, 2-col on tablet, 1-col on mobile */
.instance-panel .object-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.instance-panel .instance-card {
  position: relative;
  padding: 0;
  gap: 0;
  border-radius: 13px;
  overflow: hidden;
  transition: transform .16s ease, border-color .18s ease, box-shadow .18s ease;
}
.instance-panel .instance-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  box-shadow: 0 8px 22px rgba(32, 27, 52, .08);
}
:root[data-theme=dark] .instance-panel .instance-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.qb-card-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 14px 12px;
  border-top: 3px solid var(--border);
  min-width: 0;
}
.qb-card-inner.is-role-dl { border-top-color: var(--blue); }
.qb-card-inner.is-role-seed { border-top-color: var(--green); }
.qb-card-inner.is-warn { border-top-color: var(--orange); }

.qb-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.qb-role-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  flex: none;
}
.qb-role-icon.is-role-dl {
  background: color-mix(in srgb, var(--blue) 14%, var(--surface)) !important;
  color: var(--blue) !important;
}
.qb-role-icon.is-role-seed {
  background: color-mix(in srgb, var(--green) 14%, var(--surface)) !important;
  color: var(--green) !important;
}
.qb-card-id {
  min-width: 0;
  flex: 1;
  gap: 2px !important;
}
.qb-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.qb-card-title-row strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qb-role-tag {
  font-size: 10.5px;
  line-height: 1;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
  flex: none;
}
.qb-role-tag.is-role-dl {
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 13%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent);
}
.qb-role-tag.is-role-seed {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 13%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--green) 30%, transparent);
}
.qb-card-meta {
  font-size: 11.5px !important;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.qb-card-head > .status {
  flex: none;
  font-size: 11px;
  padding: 2px 8px;
}

/* Recessed high-contrast speed tiles */
.instance-panel .qb-speed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.instance-panel .qb-speed-grid > div + div {
  border-left: 0;
  padding-left: 10px;
}
.qb-speed-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  min-width: 0;
}
.qb-speed-box.is-dl.is-active {
  background: color-mix(in srgb, var(--blue) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--blue) 32%, var(--border));
}
.qb-speed-box.is-up.is-active {
  background: color-mix(in srgb, var(--green) 11%, var(--surface));
  border-color: color-mix(in srgb, var(--green) 35%, var(--border));
}
.qb-speed-lbl {
  display: flex !important;
  align-items: center;
  gap: 4px !important;
  font-size: 11px !important;
  font-weight: 600;
  color: var(--muted) !important;
  margin-bottom: 0 !important;
}
.qb-speed-box.is-dl.is-active .qb-speed-lbl { color: var(--blue) !important; }
.qb-speed-box.is-up.is-active .qb-speed-lbl { color: var(--green) !important; }
.qb-speed-box strong {
  font-size: 18px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  letter-spacing: -.03em !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qb-speed-box strong.is-zero {
  color: var(--muted) !important;
  opacity: .55;
  font-weight: 600 !important;
}

/* Upload bandwidth share meter */
.qb-bw-share {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.qb-bw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.qb-bw-head b {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--muted);
}
.qb-bw-head b.is-hot { color: var(--green); }
.qb-bw-track {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.qb-bw-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .35s ease;
  background: linear-gradient(90deg, color-mix(in srgb, var(--green) 80%, #14b8a6), var(--green));
}
.qb-bw-fill.is-role-dl {
  background: linear-gradient(90deg, var(--blue), var(--green));
}

/* Balanced 4-cell mini stats strip */
.instance-panel .instance-card .qb-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  border-top: 1px solid var(--border);
  padding: 10px 0 0;
  min-height: 0;
}
.qb-stat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 4px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 65%, transparent);
}
.qb-stat-cell span {
  font-size: 10.5px;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
}
.qb-stat-cell b {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.qb-stat-cell.is-dl-active b { color: var(--blue); }
.qb-stat-cell.is-seed-active b { color: var(--green); }

/* Clean footer row with aligned edit/more actions */
.qb-card-clock {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding-right: 84px;
  font-size: 11px !important;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.instance-panel .instance-card > .instance-actions {
  right: 12px;
  bottom: 10px;
  gap: 6px;
}
.instance-panel .instance-card > .instance-actions > button,
.instance-panel .instance-card .instance-more summary {
  min-height: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 7px;
}

@media (max-width: 1240px) {
  .qb-cluster-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .instance-panel .object-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .qb-cluster-strip { grid-template-columns: 1fr; }
  .instance-panel .object-grid { grid-template-columns: 1fr; }
}


/* ===== Overview (流程总览) Visual Hierarchy & Proportion Upgrade ===== */
.ov-pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.ov-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px 14px;
  border-radius: 13px;
  border: 1px solid var(--border);
  border-top-width: 3px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
  transition: transform .16s ease, border-color .18s ease, box-shadow .18s ease;
}
.ov-stage:hover {
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(32, 27, 52, .08);
}
:root[data-theme=dark] .ov-stage:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.ov-stage + .ov-stage::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 50%;
  margin-top: -11px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c7596' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center/12px no-repeat;
  box-shadow: 0 2px 6px rgba(32, 27, 52, .08);
}
.ov-stage.is-sky { border-top-color: #0284c7; background: linear-gradient(160deg, color-mix(in srgb, #0284c7 6%, var(--surface)) 0%, var(--surface) 75%); }
.ov-stage.is-blue { border-top-color: var(--blue); background: linear-gradient(160deg, color-mix(in srgb, var(--blue) 7%, var(--surface)) 0%, var(--surface) 75%); }
.ov-stage.is-indigo { border-top-color: #4f46e5; background: linear-gradient(160deg, color-mix(in srgb, #4f46e5 6%, var(--surface)) 0%, var(--surface) 75%); }
.ov-stage.is-violet { border-top-color: var(--accent); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 10%, var(--surface)) 0%, var(--surface) 78%); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.ov-stage.is-emerald { border-top-color: var(--green); background: linear-gradient(160deg, color-mix(in srgb, var(--green) 10%, var(--surface)) 0%, var(--surface) 78%); border-color: color-mix(in srgb, var(--green) 32%, var(--border)); }

.ov-stage-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.ov-stage-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: none;
}
.ov-stage-ico.is-sky { background: color-mix(in srgb, #0284c7 14%, var(--surface)); color: #0284c7; }
.ov-stage-ico.is-blue { background: color-mix(in srgb, var(--blue) 14%, var(--surface)); color: var(--blue); }
.ov-stage-ico.is-indigo { background: color-mix(in srgb, #4f46e5 14%, var(--surface)); color: #4f46e5; }
.ov-stage-ico.is-violet { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); }
.ov-stage-ico.is-emerald { background: color-mix(in srgb, var(--green) 16%, var(--surface)); color: var(--green); }
:root[data-theme=dark] .ov-stage-ico.is-sky { color: #38bdf8; }
:root[data-theme=dark] .ov-stage-ico.is-indigo { color: #a5b4fc; }

.ov-stage-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ov-stage-step {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  opacity: .65;
  font-variant-numeric: tabular-nums;
}
.ov-stage-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ov-stage-num {
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.ov-stage.is-sky .ov-stage-num { color: #0284c7; }
.ov-stage.is-blue .ov-stage-num { color: var(--blue); }
.ov-stage.is-indigo .ov-stage-num { color: #4f46e5; }
.ov-stage.is-violet .ov-stage-num { color: var(--accent); }
.ov-stage.is-emerald .ov-stage-num { color: var(--green); }
:root[data-theme=dark] .ov-stage.is-sky .ov-stage-num { color: #38bdf8; }
:root[data-theme=dark] .ov-stage.is-indigo .ov-stage-num { color: #a5b4fc; }
.ov-stage.unknown .ov-stage-num { color: var(--muted); opacity: .55; }
.ov-stage-lbl {
  font-size: 11.5px;
  color: var(--muted);
}

/* Row 2: 4 Balanced KPI Metric Cards */
.ov-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}
.ov-kpi-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  min-width: 0;
}
.ov-kpi-card.is-warn {
  border-color: color-mix(in srgb, var(--orange) 45%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--orange) 10%, var(--surface)) 0%, var(--surface) 75%);
}
.ov-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.ov-kpi-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ov-kpi-pill.is-blue { color: var(--blue); background: color-mix(in srgb, var(--blue) 13%, var(--surface)); }
.ov-kpi-pill.is-emerald { color: var(--green); background: color-mix(in srgb, var(--green) 14%, var(--surface)); }
.ov-kpi-pill.is-warn { color: var(--orange); background: color-mix(in srgb, var(--orange) 16%, var(--surface)); }
.ov-kpi-val {
  font-size: 23px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.ov-kpi-card.is-warn .ov-kpi-val { color: var(--orange); }
.ov-kpi-unit {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}
.ov-mini-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.ov-mini-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width .35s ease;
}
.ov-mini-bar > span.is-blue { background: var(--blue); }
.ov-mini-bar > span.is-emerald { background: var(--green); }
.ov-mini-bar > span.is-violet { background: var(--accent); }
.ov-mini-bar > span.is-warn { background: var(--orange); }
.ov-kpi-card > small {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bottom 2-Column Balanced Workspace */
.ov-scope {
  margin: 0 0 12px;
}
.ov-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(340px, 1fr);
  gap: 14px;
  align-items: stretch;
}
.ov-recent-panel, .ov-sites-panel {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  overflow: hidden;
}
.ov-recent-panel > header, .ov-sites-panel > header {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-indigo-1) 6%, var(--surface)), var(--surface));
}
.ov-recent-panel > header h2, .ov-sites-panel > header h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}
.ov-recent-panel > .panel-body, .ov-sites-panel > .panel-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 13px 16px 15px;
}
.ov-panel-sub {
  font-size: 12px;
  margin: 0 0 10px;
}

/* Recent RSS list visual polish */
.ov-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ov-recent-list .ov-rss-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color .15s ease, background-color .15s ease;
}
.ov-recent-list .ov-rss-row .recent-side {
  gap: 4px;
}
.ov-recent-list .ov-rss-row:first-child { padding-top: 9px; border-top: 1px solid var(--border); }
.ov-recent-list .ov-rss-row:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
}
.ov-recent-list .ov-rss-row.is-pushed {
  border-left-color: var(--blue);
  background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 7%, var(--surface)) 0%, var(--surface) 45%);
  border-color: color-mix(in srgb, var(--blue) 26%, var(--border));
}
.ov-recent-list .ov-rss-row.is-failed {
  border-left-color: var(--red);
  background: linear-gradient(90deg, color-mix(in srgb, var(--red) 7%, var(--surface)) 0%, var(--surface) 45%);
}
.ov-recent-list .ov-rss-row.is-skipped {
  opacity: .84;
}
.ov-rss-title {
  display: block;
  font-size: 13px;
  font-weight: 600 !important;
  color: var(--text);
  margin-bottom: 4px;
}
.ov-rss-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}
.ov-src-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 6px;
  flex: none;
}
.ov-src-tag.is-blue { color: var(--blue); background: color-mix(in srgb, var(--blue) 13%, var(--surface)); }
.ov-src-tag.is-indigo { color: #4f46e5; background: color-mix(in srgb, #4f46e5 12%, var(--surface)); }
.ov-src-tag.is-violet { color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, var(--surface)); }
.ov-src-tag.is-emerald { color: var(--green); background: color-mix(in srgb, var(--green) 13%, var(--surface)); }
.ov-src-tag.is-neutral { color: var(--muted); background: var(--surface-2); }
:root[data-theme=dark] .ov-src-tag.is-indigo { color: #a5b4fc; }

.ov-rss-reason {
  font-size: 11.5px;
  line-height: 1.35;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ov-rss-reason.is-muted { color: var(--muted); }
.ov-rss-reason.is-bad { color: var(--red); font-weight: 600; }
.ov-st-pill {
  font-size: 11px !important;
  font-weight: 700;
  padding: 2px 9px !important;
  border-radius: 999px !important;
}
.ov-rss-time {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Sites panel health summary & crisp chips */
.ov-sites-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.ov-site-health {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.ov-health-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ov-hp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.ov-hp.is-good {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 35%, var(--border));
}
.ov-hp.is-warn {
  color: var(--orange);
  background: var(--warning-bg);
  border-color: color-mix(in srgb, var(--orange) 45%, var(--border));
}
.ov-hp.is-muted { color: var(--muted); }
.ov-health-bar {
  display: flex;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--border) 70%, transparent);
  gap: 2px;
}
.ov-health-bar > span.is-good { background: var(--green); border-radius: 999px; }
.ov-health-bar > span.is-warn { background: var(--orange); border-radius: 999px; }

.ov-site-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ov-site-group h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.ov-grp-cnt {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ov-site-chips {
  gap: 7px !important;
}
.ov-site-chips .site-chip {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  background: color-mix(in srgb, var(--green) 4%, var(--surface));
  border-color: color-mix(in srgb, var(--green) 20%, var(--border));
  transition: transform .12s ease, border-color .15s ease;
}
.ov-site-chips .site-chip:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
}
.ov-site-chips .site-chip.offline {
  background: var(--warning-bg);
  border-color: color-mix(in srgb, var(--orange) 55%, var(--border));
  color: var(--orange);
  font-weight: 700;
}
.ov-site-chips .site-chip.disabled {
  background: var(--surface-2);
  border-color: var(--border);
  opacity: .65;
}
.ov-site-legend {
  margin-top: auto !important;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

@media (max-width: 1180px) {
  .ov-pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ov-stage + .ov-stage::before { display: none; }
  .ov-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .ov-pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-kpi-strip { grid-template-columns: 1fr; }
}


/* ===== Unified Visual Polish: Navigation, Headers, Logs, Rules & System Settings ===== */
.section-navigation a {
  position: relative;
  border-radius: 10px 10px 0 0;
  transition: color .15s ease, background-color .15s ease;
}
.section-navigation a:hover {
  background: color-mix(in srgb, var(--v-indigo-1) 6%, transparent);
}
.section-navigation a.active {
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-indigo-1) 9%, transparent) 0%, color-mix(in srgb, var(--v-indigo-1) 3%, transparent) 100%);
  color: var(--v-indigo-text);
  border-bottom-color: var(--v-indigo-1);
  font-weight: 700;
}
.ui-head-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ui-head-pill.is-indigo { color: var(--v-indigo-text); background: var(--v-indigo-bg); border: 1px solid var(--v-indigo-bd); }
.ui-head-pill.is-good { color: var(--v-emerald-text); background: var(--v-emerald-bg); border: 1px solid var(--v-emerald-bd); }
.ui-head-pill.is-blue { color: var(--v-blue-text); background: var(--v-blue-bg); border: 1px solid var(--v-blue-bd); }
.ui-head-pill.is-muted { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }

/* Unified crisp panel headers across history, rules, and settings */
.history-panel > header,
.config-transfer-rules > header,
.config-delete-rules > header,
.set-page .panel > header {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-indigo-1) 6%, var(--surface)), var(--surface));
}
.history-panel > header h2,
.config-transfer-rules > header h2,
.config-delete-rules > header h2,
.set-page .panel > header h2 {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0;
}
.config-transfer-rules > .panel-body,
.config-delete-rules > .panel-body,
.set-page .panel > .panel-body {
  padding: 14px 16px 16px;
}
.history-panel { overflow: hidden; }
.history-panel .filter-bar {
  padding: 12px 16px;
  background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
}
.segmented {
  padding: 3px;
  border: 1px solid var(--border);
}
.segmented button[aria-pressed=true],
.segmented button[aria-selected=true] {
  background: linear-gradient(135deg, var(--v-indigo-1), var(--v-violet-1));
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.28);
}

/* ===== 1. Logs Page (日志追踪) ===== */
.log-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px 4px;
}
.log-kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  border-top-width: 3px;
  background: var(--surface);
  box-shadow: var(--shadow);
  min-width: 0;
}
.log-kpi.is-indigo { border-top-color: var(--v-indigo-1); background: linear-gradient(155deg, color-mix(in srgb, var(--v-indigo-1) 7%, var(--surface)) 0%, var(--surface) 72%); }
.log-kpi.is-violet { border-top-color: var(--v-violet-1); background: linear-gradient(155deg, color-mix(in srgb, var(--v-violet-1) 8%, var(--surface)) 0%, var(--surface) 72%); }
.log-kpi.is-warn { border-top-color: var(--v-amber-1); background: linear-gradient(155deg, color-mix(in srgb, var(--v-amber-1) 10%, var(--surface)) 0%, var(--surface) 72%); border-color: color-mix(in srgb, var(--v-amber-1) 38%, var(--border)); }
.log-kpi.is-bad { border-top-color: var(--red); background: linear-gradient(155deg, color-mix(in srgb, var(--red) 10%, var(--surface)) 0%, var(--surface) 72%); border-color: color-mix(in srgb, var(--red) 38%, var(--border)); }
.log-kpi.is-good { border-top-color: var(--v-emerald-1); background: linear-gradient(155deg, color-mix(in srgb, var(--v-emerald-1) 8%, var(--surface)) 0%, var(--surface) 72%); }
.log-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.log-kpi-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.log-kpi-pill.is-indigo { color: var(--v-indigo-text); background: var(--v-indigo-bg); }
.log-kpi-pill.is-violet { color: var(--v-violet-text); background: var(--v-violet-bg); }
.log-kpi-pill.is-warn { color: var(--v-amber-text); background: var(--v-amber-bg); }
.log-kpi-pill.is-bad { color: var(--red); background: var(--error-bg); }
.log-kpi-pill.is-good { color: var(--v-emerald-text); background: var(--v-emerald-bg); }
.log-kpi-val {
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.log-kpi.is-indigo .log-kpi-val { color: var(--v-indigo-text); }
.log-kpi.is-violet .log-kpi-val { color: var(--v-violet-text); }
.log-kpi.is-warn .log-kpi-val { color: var(--v-amber-text); }
.log-kpi.is-bad .log-kpi-val { color: var(--red); }
.log-kpi.is-good .log-kpi-val { color: var(--v-emerald-text); }
.log-kpi-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.log-kpi-bar > span { display: block; height: 100%; border-radius: 999px; }
.log-kpi-bar > span.is-indigo { background: var(--v-indigo-1); }
.log-kpi-bar > span.is-violet { background: var(--v-violet-1); }
.log-kpi-bar > span.is-warn { background: var(--v-amber-1); }
.log-kpi-bar > span.is-bad { background: var(--red); }
.log-kpi-bar > span.is-good { background: var(--v-emerald-1); }
.log-kpi > small {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log-apply-btn {
  background: var(--v-indigo-bg);
  color: var(--v-indigo-text);
  border-color: var(--v-indigo-bd);
  font-weight: 600;
}
.log-export-btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
}
.log-name-cell {
  display: block;
  font-weight: 600;
  color: var(--text);
}
.table-row:hover .log-name-cell { color: var(--v-indigo-text); }
.log-time-cell { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.log-src-cell { display: block; font-size: 12px; color: var(--muted); }
.log-detail-cell { display: block; font-size: 12.5px; color: var(--muted); }
.log-type-pill,
.log-site-pill,
.log-res-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log-type-pill.is-transfer { color: var(--v-violet-text); background: var(--v-violet-bg); border: 1px solid var(--v-violet-bd); }
.log-type-pill.is-seeding { color: var(--v-emerald-text); background: var(--v-emerald-bg); border: 1px solid var(--v-emerald-bd); }
.log-type-pill.is-delete { color: var(--red); background: color-mix(in srgb, var(--red) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--red) 30%, var(--border)); }
.log-type-pill.is-rss { color: #0284c7; background: color-mix(in srgb, #0284c7 12%, var(--surface)); border: 1px solid color-mix(in srgb, #0284c7 28%, var(--border)); }
.log-type-pill.is-download { color: var(--v-blue-text); background: var(--v-blue-bg); border: 1px solid var(--v-blue-bd); }
.log-type-pill.is-dedup { color: var(--v-indigo-text); background: var(--v-indigo-bg); border: 1px solid var(--v-indigo-bd); }
.log-type-pill.is-review { color: var(--v-amber-text); background: var(--v-amber-bg); border: 1px solid var(--v-amber-bd); }
.log-type-pill.is-other { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
:root[data-theme=dark] .log-type-pill.is-rss { color: #38bdf8; }
.log-site-pill {
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-weight: 600;
}
.log-res-pill { border-radius: 999px; padding: 4px 10px; }
.log-res-pill.is-good { color: var(--v-emerald-text); background: var(--v-emerald-bg); border: 1px solid var(--v-emerald-bd); }
.log-res-pill.is-warn { color: var(--v-amber-text); background: var(--v-amber-bg); border: 1px solid var(--v-amber-bd); }
.log-res-pill.is-bad { color: var(--red); background: var(--error-bg); border: 1px solid color-mix(in srgb, var(--red) 35%, var(--border)); }
.log-res-pill.is-skip { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.log-res-pill.is-info { color: var(--v-blue-text); background: var(--v-blue-bg); border: 1px solid var(--v-blue-bd); }

/* ===== 2. Transfer & Delete Rules Pages (转载规则 / 删除规则) ===== */
.ru-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.ru-kpi {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  border-top-width: 3px;
  background: var(--surface);
  box-shadow: var(--shadow);
  min-width: 0;
}
.ru-kpi.is-indigo { border-top-color: var(--v-indigo-1); background: linear-gradient(155deg, color-mix(in srgb, var(--v-indigo-1) 7%, var(--surface)), var(--surface) 74%); }
.ru-kpi.is-blue { border-top-color: var(--v-blue-1); background: linear-gradient(155deg, color-mix(in srgb, var(--v-blue-1) 7%, var(--surface)), var(--surface) 74%); }
.ru-kpi.is-violet { border-top-color: var(--v-violet-1); background: linear-gradient(155deg, color-mix(in srgb, var(--v-violet-1) 8%, var(--surface)), var(--surface) 74%); }
.ru-kpi.is-emerald { border-top-color: var(--v-emerald-1); background: linear-gradient(155deg, color-mix(in srgb, var(--v-emerald-1) 8%, var(--surface)), var(--surface) 74%); }
.ru-kpi.is-rose { border-top-color: var(--red); background: linear-gradient(155deg, color-mix(in srgb, var(--red) 9%, var(--surface)), var(--surface) 74%); border-color: color-mix(in srgb, var(--red) 35%, var(--border)); }
.ru-kpi.is-amber { border-top-color: var(--v-amber-1); background: linear-gradient(155deg, color-mix(in srgb, var(--v-amber-1) 9%, var(--surface)), var(--surface) 74%); border-color: color-mix(in srgb, var(--v-amber-1) 35%, var(--border)); }
.ru-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.ru-kpi-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.ru-kpi-pill.is-good { color: var(--v-emerald-text); background: var(--v-emerald-bg); }
.ru-kpi-pill.is-blue { color: var(--v-blue-text); background: var(--v-blue-bg); }
.ru-kpi-pill.is-violet { color: var(--v-violet-text); background: var(--v-violet-bg); }
.ru-kpi-pill.is-rose { color: var(--red); background: var(--error-bg); }
.ru-kpi-pill.is-amber { color: var(--v-amber-text); background: var(--v-amber-bg); }
.ru-kpi-val {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.ru-kpi-val.is-text { font-size: 18px; letter-spacing: 0; padding: 3px 0; color: var(--v-emerald-text); }
.ru-kpi-unit { font-size: 13px; font-weight: 600; color: var(--muted); }
.ru-kpi > small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Rule cards layout & rich visual accents */
.config-transfer-rules .object-grid,
.config-delete-rules .object-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.config-transfer-rules .object-card,
.config-delete-rules .object-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  gap: 12px;
  border-radius: 13px;
  border: 1px solid color-mix(in srgb, var(--v-indigo-1) 20%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-indigo-1) 5%, var(--surface)) 0%, var(--surface) 45%);
  transition: transform .16s ease, box-shadow .18s ease, border-color .18s ease;
}
.config-transfer-rules .object-card::before,
.config-delete-rules .object-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--v-indigo-1), var(--v-violet-1), var(--v-blue-1));
}
.config-delete-rules .object-card:has(.dr-card-body.is-danger) {
  border-color: color-mix(in srgb, var(--red) 35%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--red) 6%, var(--surface)) 0%, var(--surface) 46%);
}
.config-delete-rules .object-card:has(.dr-card-body.is-danger)::before {
  background: linear-gradient(90deg, #f43f5e, #f59e0b);
}
.config-transfer-rules .object-card:has(.is-disabled),
.config-delete-rules .object-card:has(.is-disabled) {
  opacity: .78;
  border-color: var(--border);
  background: var(--surface);
}
.config-transfer-rules .object-card:has(.is-disabled)::before,
.config-delete-rules .object-card:has(.is-disabled)::before {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}
.config-transfer-rules .object-card:hover,
.config-delete-rules .object-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(32, 27, 52, .08);
}
:root[data-theme=dark] .config-transfer-rules .object-card:hover,
:root[data-theme=dark] .config-delete-rules .object-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.config-transfer-rules .object-card > .actions button:nth-last-child(2),
.config-delete-rules .object-card > .actions button:nth-last-child(2) {
  background: var(--v-indigo-bg);
  color: var(--v-indigo-text);
  border-color: var(--v-indigo-bd);
  font-weight: 600;
}
.config-transfer-rules .object-card > .actions button:last-child,
.config-delete-rules .object-card > .actions button:last-child {
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 32%, var(--border));
  font-weight: 600;
}
.tr-card-body,
.dr-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.ru-head {
  gap: 12px;
  align-items: center;
}
.ru-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex: none;
  color: #ffffff;
}
.ru-ico.is-transfer { background: linear-gradient(135deg, var(--v-indigo-1), var(--v-violet-1)); box-shadow: 0 3px 9px rgba(99, 102, 241, .34); }
.ru-ico.is-delete { background: linear-gradient(135deg, var(--v-blue-1), var(--v-indigo-1)); box-shadow: 0 3px 9px rgba(59, 130, 246, .3); }
.ru-ico.is-delete-danger { background: linear-gradient(135deg, #f43f5e, #ea580c); box-shadow: 0 3px 9px rgba(244, 63, 94, .34); }
.ru-ico.is-off { background: linear-gradient(135deg, #94a3b8, #64748b); }
.ru-title { font-size: 16px !important; font-weight: 700; color: var(--text); }
.ru-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.ru-src-pill,
.ru-cnt-pill,
.ru-scope-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 6px;
}
.ru-src-pill.is-blue { color: var(--v-blue-text); background: var(--v-blue-bg); border: 1px solid var(--v-blue-bd); }
.ru-src-pill.is-indigo { color: var(--v-indigo-text); background: var(--v-indigo-bg); border: 1px solid var(--v-indigo-bd); }
.ru-src-pill.is-violet { color: var(--v-violet-text); background: var(--v-violet-bg); border: 1px solid var(--v-violet-bd); }
.ru-src-pill.is-emerald { color: var(--v-emerald-text); background: var(--v-emerald-bg); border: 1px solid var(--v-emerald-bd); }
.ru-src-pill.is-neutral,
.ru-scope-pill { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.ru-arrow { color: var(--muted); font-weight: 700; font-size: 12px; }
.ru-cnt-pill { color: var(--v-indigo-text); background: color-mix(in srgb, var(--v-indigo-1) 10%, var(--surface)); border: 1px solid var(--v-indigo-bd); }
.ru-state-pill.good {
  background: linear-gradient(135deg, var(--v-emerald-1), var(--v-emerald-2)) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, .28);
}

.tr-targets-box {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  min-height: 44px;
  align-content: flex-start;
}
.tr-target-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--v-indigo-1) 18%, var(--border));
  color: var(--text);
}
.tr-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.ru-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-variant-numeric: tabular-nums;
}
.ru-metric-pill i { font-style: normal; color: var(--muted); font-size: 11px; }
.ru-metric-pill b { font-weight: 700; }
.ru-metric-pill.is-blue { border-color: var(--v-blue-bd); background: color-mix(in srgb, var(--v-blue-1) 7%, var(--surface)); }
.ru-metric-pill.is-blue b { color: var(--v-blue-text); }
.ru-metric-pill.is-indigo { border-color: var(--v-indigo-bd); background: color-mix(in srgb, var(--v-indigo-1) 7%, var(--surface)); }
.ru-metric-pill.is-indigo b { color: var(--v-indigo-text); }
.ru-metric-pill.is-violet { border-color: var(--v-violet-bd); background: color-mix(in srgb, var(--v-violet-1) 7%, var(--surface)); }
.ru-metric-pill.is-violet b { color: var(--v-violet-text); }

.dr-trigger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.dr-trig-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.dr-trig-cell > span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.dr-trig-cell > strong { font-size: 15px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.dr-trig-cell > strong b { color: var(--v-indigo-text); }
.dr-scope-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dr-act-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
}
.dr-act-pill.is-danger { color: var(--red); background: var(--error-bg); border: 1px solid color-mix(in srgb, var(--red) 35%, var(--border)); }
.dr-act-pill.is-warn { color: var(--v-amber-text); background: var(--v-amber-bg); border: 1px solid var(--v-amber-bd); }
.dr-act-pill.is-safe { color: var(--v-emerald-text); background: var(--v-emerald-bg); border: 1px solid var(--v-emerald-bd); }

.dr-guard-panel {
  border-left: 4px solid var(--v-emerald-1) !important;
  background: linear-gradient(90deg, color-mix(in srgb, var(--v-emerald-1) 7%, var(--surface)) 0%, var(--surface) 42%) !important;
}
.dr-guard-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dr-guard-text { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.dr-guard-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.dr-guard-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--v-emerald-text);
  background: var(--v-emerald-bg);
  border: 1px solid var(--v-emerald-bd);
}

/* ===== 3. System Settings Page (系统设置 — Full-Width Balanced Grid) ===== */
.set-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: none;
}
.set-page .panel { margin-bottom: 0; overflow: hidden; }
.set-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.set-col-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.set-col-stack > .panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.set-col-stack > .panel > .panel-body { flex: 1; }
.set-col-stack .definition-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.set-col-stack .definition-list > div {
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.set-col-stack .definition-list dt { font-size: 11px; margin-bottom: 3px; }
.set-col-stack .definition-list dd { font-size: 13px; font-weight: 700; color: var(--text); }
.set-inline-note {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  margin: 0;
}
.set-inline-note > summary { font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.set-inline-note .panel { margin-top: 10px; box-shadow: none; }

.set-access-card { display: flex; flex-direction: column; }
.set-access-card > .panel-body { flex: 1; display: flex; flex-direction: column; }
.set-access-form { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.set-token-inputs { display: grid; grid-template-columns: 1fr; gap: 10px; }
.set-token-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.set-hint { font-size: 12px; margin: auto 0 0; }

/* DoubanInfo API Pool Dashboard */
.set-db-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.set-db-intro { font-size: 12.5px; margin: 0 0 12px; line-height: 1.55; }
.set-ip-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.set-ip-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  min-width: 0;
}
.set-ip-card.has-key {
  background: linear-gradient(155deg, color-mix(in srgb, var(--v-emerald-1) 7%, var(--surface)) 0%, var(--surface) 75%);
  border-color: color-mix(in srgb, var(--v-emerald-1) 30%, var(--border));
}
.set-ip-card.is-warn { border-color: color-mix(in srgb, var(--v-amber-1) 45%, var(--border)); }
.set-ip-card.is-bad { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
.set-ip-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.set-ip-addr {
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.set-ip-keys {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}
.set-ip-keys.is-active {
  color: var(--v-indigo-text);
  background: var(--v-indigo-bg);
  border-color: var(--v-indigo-bd);
}
.set-ip-nums {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.set-ip-nums b { color: var(--text); font-weight: 700; }
.set-ip-bar {
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 80%, transparent);
  overflow: hidden;
}
.set-ip-bar > span { display: block; height: 100%; border-radius: 999px; }
.set-ip-bar > span.is-good { background: var(--v-emerald-1); }
.set-ip-bar > span.is-warn { background: var(--v-amber-1); }
.set-ip-bar > span.is-bad { background: var(--red); }

.set-global-box {
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.set-global-grid {
  display: grid;
  grid-template-columns: 1.7fr repeat(3, minmax(0, 1fr)) 1.3fr;
  gap: 10px;
}
.set-global-grid label,
.set-prov-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  min-width: 0;
}
.set-toggle-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.set-prov-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.set-prov-empty {
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  margin: 0;
}
.set-prov-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--v-emerald-1);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.set-prov-card.is-warn { border-left-color: var(--v-amber-1); }
.set-prov-card.is-bad { border-left-color: var(--red); }
.set-prov-card.is-off { border-left-color: #94a3b8; opacity: .76; }
.set-prov-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.set-prov-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.set-prov-idx {
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--v-indigo-bg);
  color: var(--v-indigo-text);
  border: 1px solid var(--v-indigo-bd);
}
.set-prov-status {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
}
.set-prov-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.set-mini-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.set-mini-chip.is-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.set-mini-chip.is-ip { color: var(--v-blue-text); background: var(--v-blue-bg); border-color: var(--v-blue-bd); }
.set-prov-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.set-prov-btns button { min-height: 30px; padding: 3px 10px; font-size: 12px; }
.set-btn-test {
  background: var(--v-blue-bg) !important;
  color: var(--v-blue-text) !important;
  border-color: var(--v-blue-bd) !important;
  font-weight: 600;
}
.set-prov-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.set-prov-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.set-prov-err { font-size: 12px; }
.set-sub-details {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  margin: 0 0 12px;
}
.set-sub-details > summary { font-size: 12.5px; font-weight: 600; cursor: pointer; }
.set-bulk-box { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.set-actions-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.set-cache-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.set-cache-item {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 0;
}
.set-cache-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.set-cache-head strong { font-size: 12.5px; color: var(--text); }
.set-cache-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--muted); }

.set-quick-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 13px;
}
.set-quick-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--v-indigo-text);
  background: var(--v-indigo-bg);
  border: 1px solid var(--v-indigo-bd);
  text-decoration: none;
}
.set-quick-link:hover { filter: brightness(.97); text-decoration: none; }

@media (max-width: 1240px) {
  .set-top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-ip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .set-global-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .set-prov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-cache-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .log-kpi-grid, .ru-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .config-transfer-rules .object-grid, .config-delete-rules .object-grid { grid-template-columns: 1fr; }
  .set-top-grid, .set-global-grid { grid-template-columns: 1fr; }
  .set-ip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .log-kpi-grid, .ru-kpi-grid, .set-ip-grid, .set-prov-grid, .set-cache-grid, .dr-trigger-grid { grid-template-columns: 1fr; }
}


/* ============================================================================
   AutoSeed Holistic Visual Redesign ("Porcelain & Obsidian Studio")
   Cohesive shell, frosted sticky nav, unified surfaces, tactile controls,
   refined tables, slide-over drawers, and complete light/dark parity.
   ============================================================================ */

:root {
  --bg: #f3f6fc;
  --surface: #ffffff;
  --surface-2: #edf1f9;
  --border: #dce4f2;
  --border-strong: #c5d1e8;
  --text: #0f172a;
  --muted: #52607a;
  --faint: #7c8aa6;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --accent-soft: #e0e7ff;
  --row-hover: #f5f8ff;
  --row-active: #ebefff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -10px rgba(30, 41, 90, .08);
  --shadow-elevated: 0 12px 32px -12px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .04);
}

:root[data-theme="dark"] {
  --bg: #0a0e1a;
  --surface: #121829;
  --surface-2: #1a2238;
  --border: #26314d;
  --border-strong: #374569;
  --text: #f1f5f9;
  --muted: #94a3c0;
  --faint: #697899;
  --accent: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-soft: #232a4f;
  --row-hover: #172036;
  --row-active: #20294a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -10px rgba(0, 0, 0, .45);
  --shadow-elevated: 0 18px 42px -12px rgba(0, 0, 0, .65);
}

/* Ambient Canvas */
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 85% 360px at 50% -100px, rgba(79, 70, 229, .09), transparent 72%),
    radial-gradient(ellipse 45% 240px at 88% -40px, rgba(14, 165, 233, .06), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
:root[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 85% 380px at 50% -110px, rgba(99, 102, 241, .16), transparent 70%),
    radial-gradient(ellipse 45% 260px at 88% -40px, rgba(14, 165, 233, .08), transparent 70%);
}

/* Sleek Custom Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }

/* ===== Sticky Frosted-Glass App Header & Navigation ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 35;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
  border-bottom: 1px solid color-mix(in srgb, var(--v-indigo-1) 14%, var(--border));
  box-shadow: 0 4px 20px -12px rgba(15, 23, 42, .12);
}
:root[data-theme="dark"] .app-header {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: 0 6px 24px -10px rgba(0, 0, 0, .55);
}

.topbar {
  min-height: 60px;
  padding-top: 8px;
  padding-bottom: 8px;
  border-bottom: 0;
}

.brand {
  gap: 10px;
  transition: opacity .15s ease;
}
.brand:hover { opacity: .9; }
.brand strong {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.035em;
  background: linear-gradient(135deg, var(--text) 20%, var(--v-indigo-1) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
:root[data-theme="dark"] .brand strong {
  background: linear-gradient(135deg, #ffffff 25%, #a5b4fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Recessed Pill Dock for Group Navigation */
.group-navigation {
  gap: 4px;
  padding: 4px;
  margin-left: 8px;
  border-left: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 85%, transparent);
  border: 1px solid var(--border);
}
.group-navigation a {
  padding: 6px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color .15s ease, background-color .15s ease, box-shadow .18s ease, transform .12s ease;
}
.group-navigation a:hover:not(.active) {
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  color: var(--text);
}
.group-navigation a.active {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 12px -2px rgba(79, 70, 229, .42), inset 0 1px 0 rgba(255, 255, 255, .2);
}

/* Live SSE Pulse Pill */
@keyframes agyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .45); }
  60% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}
.connection.desktop-stream {
  max-width: 240px;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 78%, var(--surface));
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.connection.desktop-stream:has(.online-dot) {
  background: color-mix(in srgb, var(--v-emerald-bg) 52%, var(--surface));
  border-color: color-mix(in srgb, var(--v-emerald-bd) 55%, var(--border));
  color: var(--v-emerald-text);
}
.connection .online-dot {
  animation: agyPulse 2.4s ease-in-out infinite;
}

/* Floating Pill Rail Sub-Navigation */
.section-navigation {
  gap: 6px;
  padding-top: 7px;
  padding-bottom: 7px;
  border-top: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
}
.section-navigation a {
  padding: 7px 14px;
  border-radius: 9px;
  border-bottom: 0 !important;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.section-navigation a:hover:not(.active) {
  background: color-mix(in srgb, var(--surface-2) 85%, transparent);
  color: var(--text);
}
.section-navigation a.active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--v-indigo-1) 14%, var(--surface)) 0%, color-mix(in srgb, var(--v-violet-1) 10%, var(--surface)) 100%);
  color: var(--v-indigo-text);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--v-indigo-1) 32%, transparent), 0 2px 8px -3px rgba(79, 70, 229, .2);
}
.section-navigation a.active svg { color: var(--v-indigo-1); }
:root[data-theme="dark"] .section-navigation a.active svg { color: #a5b4fc; }

/* Main Content Rhythm & Page Headers */
.content {
  padding: 22px 28px 36px;
}
.page-header {
  margin-bottom: 18px;
  min-height: 38px;
}
.page-header h1,
.instance-panel h1 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  line-height: 28px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
}
.page-header h1::before,
.instance-panel h1::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4f46e5, #8b5cf6);
  flex: none;
}

/* ===== Unified Tactile Controls (Buttons, Inputs, Selects, Tabs) ===== */
button {
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: transform .12s ease, border-color .15s ease, background-color .15s ease, box-shadow .16s ease, color .15s ease;
}
button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--v-indigo-1) 48%, var(--border));
  background: color-mix(in srgb, var(--surface-2) 65%, var(--surface));
}
button:active:not(:disabled) { transform: translateY(0); }

button.primary,
.primary {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-color: transparent;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 3px 10px -2px rgba(79, 70, 229, .42), inset 0 1px 0 rgba(255, 255, 255, .22);
}
button.primary:hover:not(:disabled),
.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -3px rgba(79, 70, 229, .48), inset 0 1px 0 rgba(255, 255, 255, .25);
}
button.danger {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 6%, var(--surface));
  border-color: color-mix(in srgb, var(--red) 30%, var(--border));
}
button.danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--red) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--red) 50%, var(--border));
}
.icon-button {
  min-height: 36px;
  width: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
  border-color: var(--border);
  color: var(--muted);
}
.icon-button:hover:not(:disabled) {
  color: var(--v-indigo-text);
  background: var(--v-indigo-bg);
  border-color: var(--v-indigo-bd);
}

input, select, textarea {
  min-height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  padding: 6px 11px;
  font-size: 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--v-indigo-1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--v-indigo-1) 18%, transparent);
}

/* Segmented Modern Pill Tabs (Workflow / Seeding / etc.) */
.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.tabs button {
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.tabs button:hover:not(:disabled):not([aria-selected=true]) {
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  color: var(--text);
}
.tabs button[aria-selected=true] {
  background: var(--surface);
  color: var(--v-indigo-text);
  font-weight: 700;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, .12), inset 0 0 0 1px color-mix(in srgb, var(--v-indigo-1) 24%, transparent);
}
:root[data-theme="dark"] .tabs button[aria-selected=true] {
  background: color-mix(in srgb, var(--v-indigo-1) 22%, var(--surface));
  color: #e0e7ff;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .4);
}

/* ===== Unified Elevated Panels, Status Pills & Notices ===== */
.panel {
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--v-indigo-1) 14%, var(--border));
  box-shadow: var(--shadow);
  overflow: visible;
}
.panel:not(.instance-panel) > header {
  padding: 13px 18px;
  border-radius: 13px 13px 0 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-indigo-1) 5%, var(--surface)) 0%, var(--surface) 100%);
}
.panel:not(.instance-panel) > header h2 {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.panel:not(.instance-panel):not(.history-panel):not(.download-tasks) > .panel-body {
  padding: 15px 18px 18px;
}

/* 5-Tone Semantic Status Badges App-Wide */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  line-height: 16px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
}
.status.good {
  background: var(--v-emerald-bg);
  color: var(--v-emerald-text);
  border-color: var(--v-emerald-bd);
}
.status.info {
  background: var(--v-blue-bg);
  color: var(--v-blue-text);
  border-color: var(--v-blue-bd);
}
.status.attention {
  background: var(--v-amber-bg);
  color: var(--v-amber-text);
  border-color: var(--v-amber-bd);
}
.status.bad {
  background: var(--error-bg);
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 42%, var(--border));
}
.ui-head-pill.is-warn {
  color: var(--v-amber-text);
  background: var(--v-amber-bg);
  border: 1px solid var(--v-amber-bd);
}

.notice {
  border-radius: 11px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--v-indigo-1);
  background: color-mix(in srgb, var(--v-indigo-1) 5%, var(--surface));
  padding: 12px 15px;
  font-size: 13px;
}
.notice.success {
  border-left-color: var(--v-emerald-1);
  background: color-mix(in srgb, var(--v-emerald-1) 8%, var(--surface));
}
.notice.error {
  border-left-color: var(--red);
  background: var(--error-bg);
}

/* ===== Refined Virtual Tables, Shared HistoryPanel Cells, Drawers & Modals ===== */
.table-scroll {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.table-head {
  background: color-mix(in srgb, var(--surface-2) 86%, var(--surface));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  min-height: 40px;
  padding: 8px 16px;
}
.table-row {
  padding: 10px 16px;
  font-size: 13px;
  transition: background-color .12s ease;
}
.table-row:hover {
  background: var(--row-hover);
}
.hp-name-cell {
  display: block;
  font-weight: 600;
  color: var(--text);
}
.table-row:hover .hp-name-cell { color: var(--v-indigo-text); }
.hp-site-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hp-inst-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--v-blue-bg);
  border: 1px solid var(--v-blue-bd);
  color: var(--v-blue-text);
  white-space: nowrap;
}
.hp-msg-cell { display: block; font-size: 12.5px; color: var(--muted); }
.hp-msg-cell.danger-text { color: var(--red); font-weight: 600; }
.hp-time-cell { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.history-panel .pagination {
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
  border-radius: 0 0 13px 13px;
}
.history-panel { overflow: visible; }
.set-page .panel { overflow: visible; }
.bulk-bar {
  background: #111827;
  color: #f8fafc;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .35);
  border: 1px solid rgba(255, 255, 255, .12);
}

/* Slide-Over Drawers & Dialogs */
.drawer-scrim {
  background: rgba(15, 23, 42, .32);
  backdrop-filter: blur(4px);
}
.drawer {
  border-radius: 18px 0 0 18px;
  background: var(--surface);
  box-shadow: -16px 0 48px rgba(15, 23, 42, .18);
}
.drawer-header {
  background: linear-gradient(180deg, color-mix(in srgb, var(--v-indigo-1) 6%, var(--surface)), var(--surface));
  padding: 16px 20px;
}
.drawer-footer {
  background: color-mix(in srgb, var(--surface-2) 50%, var(--surface));
}
.detail-list {
  gap: 8px;
  padding: 12px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
dialog:not(.drawer) {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}

/* ===== RSS Feed Cards Grid (RSS 监听) ===== */
.rss-feed-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.rss-feed-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1px solid var(--border);
  border-top-width: 3px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
  min-width: 0;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .18s ease, border-color .18s ease;
}
.rss-feed-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}
.rss-feed-card.is-live { border-top-color: var(--v-emerald-1); background: linear-gradient(160deg, color-mix(in srgb, var(--v-emerald-1) 6%, var(--surface)), var(--surface) 72%); }
.rss-feed-card.is-live.is-blue { border-top-color: var(--v-blue-1); background: linear-gradient(160deg, color-mix(in srgb, var(--v-blue-1) 6%, var(--surface)), var(--surface) 72%); }
.rss-feed-card.is-live.is-indigo { border-top-color: var(--v-indigo-1); background: linear-gradient(160deg, color-mix(in srgb, var(--v-indigo-1) 6%, var(--surface)), var(--surface) 72%); }
.rss-feed-card.is-live.is-violet { border-top-color: var(--v-violet-1); background: linear-gradient(160deg, color-mix(in srgb, var(--v-violet-1) 7%, var(--surface)), var(--surface) 72%); }
.rss-feed-card.is-warn { border-top-color: var(--v-amber-1); border-color: color-mix(in srgb, var(--v-amber-1) 45%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, var(--v-amber-1) 10%, var(--surface)), var(--surface) 72%); }
.rss-feed-card.is-bad { border-top-color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, var(--red) 9%, var(--surface)), var(--surface) 72%); }
.rss-feed-card.is-off { border-top-color: #94a3b8; opacity: .76; }
.rss-fc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.rss-fc-head strong { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; min-width: 0; }
.rss-fc-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  flex: none;
}
.rss-fc-pill.is-live { color: var(--v-emerald-text); background: var(--v-emerald-bg); }
.rss-fc-pill.is-warn { color: var(--v-amber-text); background: var(--v-amber-bg); }
.rss-fc-pill.is-bad { color: var(--red); background: var(--error-bg); }
.rss-fc-pill.is-off { color: var(--muted); background: var(--surface-2); }
.rss-fc-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rss-fc-meta small {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Workflow Live Phase Strip (查重检测 / 转种发布) ===== */
.wf-phase-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--v-indigo-1) 8%, var(--surface)) 0%, var(--surface-2) 100%);
  border: 1px solid color-mix(in srgb, var(--v-indigo-1) 20%, var(--border));
}
.wf-phase-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-right: auto;
}

/* ===== Sites Collapsible CookieCloud Card ===== */
.ui-section-card {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.ui-section-card > summary {
  padding: 2px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--v-indigo-text);
}

/* ===== Auth / Login Screen Polish ===== */
.auth-card {
  border-radius: 18px !important;
  border: 1px solid color-mix(in srgb, var(--v-indigo-1) 20%, var(--border)) !important;
  box-shadow: var(--shadow-elevated) !important;
}

/* Responsive Adjustments */
@media (max-width: 1180px) {
  .rss-feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .content { padding: 14px 14px 28px; }
  .rss-feed-grid { grid-template-columns: 1fr; }
  .drawer { border-radius: 16px 16px 0 0; }
}

/* ===== Header Toolbar & Horizontal Select Alignment Fix ===== */
.select-root select {
  padding-right: 32px;
}
.stats-controls,
.panel > header > .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.stats-controls .select-root,
.panel > header .select-root,
.page-header .select-root,
.dash-toolbar .select-root,
.filter-bar .select-root {
  width: auto !important;
  flex: 0 0 auto;
  min-width: 124px;
  max-width: 190px;
}
.stats-controls .select-root select,
.panel > header .select-root select,
.page-header .select-root select,
.dash-toolbar .select-root select {
  min-height: 32px;
  height: 32px;
  padding: 4px 30px 4px 10px;
  font-size: 12.5px;
}
.stats-seg {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 2px;
  gap: 2px;
  flex: 0 0 auto;
}
.stats-seg button {
  min-height: 26px !important;
  height: 26px;
  padding: 0 10px;
  font-size: 12.5px;
  line-height: 1;
}
.stats-controls .icon-button,
.stats-controls button.stats-btn-sm {
  min-height: 32px !important;
  height: 32px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.stats-controls .icon-button {
  width: 32px;
  min-width: 32px;
}
.stats-controls button.stats-btn-sm {
  padding: 0 11px;
  font-size: 12.5px;
}
.stats-controls .muted,
.stats-controls .updated,
.panel > header > .actions .muted {
  white-space: nowrap;
  margin: 0;
  font-size: 12px;
  flex: 0 0 auto;
}
.stats-page .panel > header,
.dash-page .panel > header {
  flex-wrap: nowrap;
  gap: 12px;
}
.stats-page .panel > header h2,
.dash-page .panel > header h2 {
  white-space: nowrap;
  flex: 0 0 auto;
}
@media (max-width: 960px) {
  .stats-page .panel > header,
  .dash-page .panel > header,
  .stats-controls,
  .panel > header > .actions {
    flex-wrap: wrap;
  }
}
