:root{font-family:Inter,"Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:#1e2d43;background:#f4f7fb;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;min-width:320px}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
a{color:inherit}
.hidden{display:none!important}
.boot-screen{min-height:100vh;display:grid;place-content:center;justify-items:center;gap:12px;color:#66758e}
.boot-mark,.brand-mark{display:grid;place-items:center;background:#2878d8;color:white;font-weight:800;border-radius:12px}
.boot-mark{width:56px;height:56px;font-size:25px}
.app-shell{min-height:100vh;display:flex;flex-direction:column}
.topbar{height:68px;display:flex;align-items:center;gap:28px;padding:0 27px;background:#10223d;color:#dce9fa;box-shadow:0 3px 16px #142b4924;z-index:2}
.brand{display:flex;align-items:center;gap:10px;flex:none;color:white;font-size:19px;font-weight:750;letter-spacing:.02em;white-space:nowrap}
.brand-mark{width:34px;height:34px;font-size:17px;border-radius:9px}
.top-nav{display:flex;align-self:stretch;align-items:stretch;gap:4px;overflow-x:auto;scrollbar-width:none}
.top-nav::-webkit-scrollbar{display:none}
.top-nav button{border:0;background:none;color:#b7cae3;min-width:112px;padding:0 15px;white-space:nowrap;font-weight:600;border-bottom:3px solid transparent}
.top-nav button:hover,.top-nav button.active{color:#fff;background:#ffffff0b}
.top-nav button.active{border-bottom-color:#4da4ff}
.account{margin-left:auto;display:flex;align-items:center;gap:12px;white-space:nowrap;font-size:13px}
.avatar{width:31px;height:31px;display:grid;place-items:center;border-radius:50%;background:#2c5f9f;color:white;font-weight:700}
.ghost-on-dark{background:none;border:1px solid #59708b;color:#dce9fa;padding:6px 11px;border-radius:7px}
.body-layout{display:flex;flex:1;min-height:calc(100vh - 68px)}
.sidebar{width:220px;flex:none;background:#fff;border-right:1px solid #e5eaf1;padding:25px 12px 20px;display:flex;flex-direction:column}
.sidebar-label{padding:0 13px 16px;color:#8996a9;font-size:12px;font-weight:700;letter-spacing:.13em}
.side-nav{display:grid;gap:3px}
.side-nav button{display:flex;align-items:center;gap:11px;width:100%;text-align:left;border:0;border-left:3px solid transparent;background:transparent;color:#52647b;padding:11px 12px;border-radius:0 8px 8px 0;font-size:14px;font-weight:600}
.side-nav button:before{content:"";width:7px;height:7px;border:1.5px solid currentColor;border-radius:2px;opacity:.8}
.side-nav button:hover{background:#f3f7fd;color:#205fbc}
.side-nav button.active{background:#e9f2ff;color:#1b63bb;border-left-color:#2878d8}
.side-footer{margin-top:auto;padding:18px 12px 0;border-top:1px solid #e8edf3;color:#8b98a9;font-size:12px;line-height:1.6}
.main{flex:1;min-width:0;padding:29px 34px 60px;max-width:1900px;margin:0 auto;width:100%}
.page-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:19px}
.eyebrow{color:#8493a6;font-size:12px;font-weight:600;margin:0 0 8px;letter-spacing:.02em}
h1{font-size:27px;line-height:1.25;margin:0;font-weight:760;color:#172b48}
.subtitle{color:#7d8ca0;font-size:13px;margin:8px 0 0;line-height:1.6}
.heading-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:30px;background:#e9f3ff;color:#2668ae;font-size:12px;font-weight:650;white-space:nowrap}
.badge.warn{background:#fff1df;color:#9d6418}
.badge.neutral{background:#edf1f5;color:#64748b}
.tabs{display:flex;align-items:center;gap:5px;border-bottom:1px solid #dce4ee;margin-bottom:22px;overflow-x:auto;scrollbar-width:thin}
.tabs button{border:0;border-bottom:3px solid transparent;background:none;color:#6c7c91;padding:11px 16px;margin-bottom:-1px;white-space:nowrap;font-size:14px;font-weight:650}
.tabs button:hover{color:#1e65b9}
.tabs button.active{border-bottom-color:#2878d8;color:#1d62b7}
.card{background:#fff;border:1px solid #e4eaf2;border-radius:12px;box-shadow:0 3px 18px #1f3e6710}
.card-pad{padding:22px}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 17px}
.section-title h2,.section-title h3{font-size:16px;margin:0;color:#213653}
.section-title small{font-size:12px;color:#8a98aa}
.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.metric-card{padding:18px 20px;min-height:116px;position:relative;overflow:hidden}
.metric-card:before{content:"";position:absolute;right:-20px;top:-28px;width:90px;height:90px;border-radius:50%;background:#edf6ff}
.metric-label{color:#7d8ca0;font-size:13px;font-weight:600;position:relative}
.metric-value{color:#1b3558;font-size:27px;font-weight:760;letter-spacing:-.03em;margin:13px 0 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative}
.metric-note{color:#a1adbc;font-size:11px;position:relative}
.two-col{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(290px,1fr);gap:18px;margin-bottom:18px}
.stack{display:grid;gap:18px}
.main > div > .card + .card{margin-top:18px}
.empty{display:grid;place-items:center;min-height:180px;padding:26px;text-align:center;color:#7c8aa0}
.empty-icon{height:48px;width:48px;border-radius:14px;background:#eff5fc;color:#6e95c3;display:grid;place-items:center;font-size:23px;margin-bottom:10px}
.empty strong{color:#3b4f69;font-size:15px}
.empty p{margin:7px 0 0;font-size:13px;line-height:1.6;max-width:470px}
.empty button{margin-top:15px}
.btn{border:1px solid #ccd9e8;border-radius:8px;background:#fff;color:#34516d;padding:8px 14px;font-size:13px;font-weight:650;line-height:1.35;white-space:nowrap}
.btn:hover{border-color:#72a6da;color:#1869bd}
.btn.primary{background:#2878d8;border-color:#2878d8;color:white}
.btn.primary:hover{background:#1768c5}
.btn.danger{color:#af4249;border-color:#f0ccd0}
.btn.danger:hover{background:#fff0f0}
.btn.subtle{background:#f5f8fc}
.btn:disabled{opacity:.56;cursor:default}
.notice{border:1px solid #cbdff5;background:#f1f7ff;color:#42648a;border-radius:9px;padding:13px 15px;font-size:13px;line-height:1.6;margin-bottom:17px}
.notice.warn{background:#fff9ee;border-color:#f6dfb3;color:#856022}
.notice.error{background:#fff3f3;border-color:#f2c9c9;color:#a23c45}
.notice.success{background:#f0faf4;border-color:#bde5cb;color:#257143}
.filter-card{padding:16px;margin-bottom:18px}
.filter-row{display:flex;align-items:flex-end;flex-wrap:wrap;gap:11px}
.field{display:flex;flex-direction:column;gap:7px;min-width:0;color:#5a6d84;font-size:12px;font-weight:650}
.field input,.field select,.field textarea{border:1px solid #d2deeb;border-radius:8px;background:#fff;color:#283e59;outline:none;padding:9px 11px;min-height:38px;font-size:13px;font-weight:400;width:100%}
.field textarea{resize:vertical;min-height:92px}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#4d98e6;box-shadow:0 0 0 3px #4d98e621}
.filter-row .field{min-width:132px;flex:1 1 140px}
.filter-row .filter-submit{align-self:flex-end}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.form-grid .wide{grid-column:1/-1}
.form-actions{display:flex;gap:9px;justify-content:flex-start;align-items:center;margin-top:18px;flex-wrap:wrap}
.helper{color:#8998a9;font-size:12px;line-height:1.6;margin:7px 0 0}
.table-wrap{overflow:auto;width:100%}
table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}
th{background:#f8fafc;color:#76869a;font-size:12px;font-weight:700;white-space:nowrap}
th,td{padding:12px 14px;border-bottom:1px solid #edf1f5;vertical-align:middle}
tbody tr:hover{background:#fafcff}
td{color:#40536c;max-width:300px;overflow-wrap:anywhere}
td .btn{padding:5px 9px;margin-right:5px}
.table-total{padding:12px 17px;color:#8a98a9;font-size:12px;text-align:right}
.trend{height:198px;display:flex;align-items:end;gap:7px;padding:15px 4px 25px;border-bottom:1px solid #e8eef5;overflow:hidden}
.trend-item{flex:1;min-width:7px;max-width:48px;height:100%;display:flex;align-items:end;position:relative}
.trend-bar{width:100%;min-height:2px;border-radius:4px 4px 0 0;background:linear-gradient(180deg,#43a3f2,#2c75cf)}
.trend-item:hover .trend-bar{background:#1766b7}
.trend-caption{position:absolute;bottom:-24px;font-size:10px;color:#9caaba;left:50%;transform:translateX(-50%);white-space:nowrap}
.list{display:grid;gap:10px}
.list-row{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:11px 0;border-bottom:1px solid #eef1f5}
.list-row:last-child{border-bottom:0}
.list-row strong{font-size:13px;color:#344a65}
.list-row small{display:block;color:#9aa7b7;margin-top:4px;font-size:11px}
.list-row .amount{color:#254d7b;font-size:14px;font-weight:700}
.import-zone{border:1px dashed #95b9df;border-radius:10px;background:#f7fbff;padding:23px;display:grid;gap:12px;justify-items:start}
.import-zone input{max-width:100%}
.status-pill{display:inline-block;padding:4px 8px;border-radius:99px;background:#edf4fd;color:#2c6cb4;font-size:11px;font-weight:700}
.status-pill.pending{background:#fff3de;color:#a4772e}
.status-pill.off{background:#eef1f5;color:#7e8998}
.rule-grid{display:grid;grid-template-columns:minmax(320px,1.05fr) minmax(440px,1.5fr);gap:18px}
.rule-card{padding:15px;border:1px solid #e5ebf2;border-radius:9px;margin-bottom:10px;background:#fff}
.rule-card:last-child{margin-bottom:0}
.rule-head{display:flex;justify-content:space-between;gap:8px;align-items:center}
.rule-card h3{margin:0;font-size:14px;color:#273c59}
.rule-card p{font-size:12px;color:#7f8da1;line-height:1.6;margin:8px 0 10px}
.rule-card .rule-url{background:#f6f9fc;border-radius:6px;padding:7px 9px;color:#52657b;overflow-wrap:anywhere;word-break:break-word}
.rule-actions{display:flex;gap:7px}
.product-link{color:#206bbb;font-weight:650;text-decoration:none;white-space:nowrap}
.product-link:hover{text-decoration:underline}
.agent-section{margin-top:18px}
.agent-row{display:grid;grid-template-columns:minmax(150px,1fr) auto auto;align-items:center;gap:12px}
.agent-row .rule-actions{justify-content:flex-end}
.agent-form{border-top:1px solid #e8edf3;margin-top:20px;padding-top:20px}
.agent-form h3{font-size:15px;color:#344a65;margin:0 0 17px}
.account-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-width:240px}
.role-select{min-width:140px;max-width:210px;border:1px solid #d2deeb;border-radius:7px;background:#fff;color:#32485f;padding:7px 9px;font-size:12px}
.role-workspace{min-width:0}
.permission-columns{display:grid;grid-template-columns:205px 235px minmax(350px,1fr);gap:14px;align-items:start}
.permission-panel{min-width:0;min-height:570px;background:#fff;border:1px solid #e2eaf3;border-radius:11px;padding:17px;box-shadow:0 3px 18px #1f3e6710}
.permission-panel-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:14px;border-bottom:1px solid #ebeff5;color:#263c59;font-size:14px}
.permission-panel-head .btn{padding:6px 9px;font-size:11px}
.permission-group{margin:18px 4px 7px;color:#91a0b1;font-size:11px;font-weight:700;letter-spacing:.06em}
.role-item,.resource-item{width:100%;border:1px solid transparent;background:transparent;border-radius:7px;text-align:left;color:#4a5e76;cursor:pointer}
.role-item{display:grid;gap:4px;padding:11px 12px;margin:2px 0}
.role-item strong{font-size:13px;font-weight:650}
.role-item small{font-size:11px;color:#92a1b2}
.role-item:hover,.resource-item:hover{background:#f4f8fd}
.role-item.active,.resource-item.active{background:#eaf3ff;border-color:#d0e4fc;color:#1e64b3}
.resource-search,.role-name-input{border:1px solid #d2deeb;border-radius:7px;background:#fff;color:#32485f;outline:none;padding:9px 10px;font-size:12px;width:100%}
.resource-search{margin-top:14px}
.resource-search:focus,.role-name-input:focus{border-color:#4d98e6;box-shadow:0 0 0 3px #4d98e621}
.resource-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px;margin:2px 0;font-size:13px}
.resource-item small{white-space:nowrap;color:#8c9aaa;font-size:11px}
.resource-item.active small{color:#4281c9}
.permission-detail-top{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-bottom:15px;border-bottom:1px solid #ebeff5}
.permission-detail-top strong{display:block;color:#243951;font-size:14px}
.permission-detail-top small{display:block;color:#95a2b1;font-size:11px;margin-top:4px}
.permission-detail-top .role-name-input{max-width:230px}
.permission-resource-title{margin:18px 0 13px}
.permission-resource-title h2{font-size:19px;color:#203752;margin:0}
.permission-radio{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0;padding:0;border:0}
.permission-radio legend{width:100%;padding:0;margin-bottom:10px;color:#4b607a;font-size:13px;font-weight:700}
.permission-option{display:flex;align-items:center;gap:6px;border:1px solid #d8e2ed;border-radius:7px;padding:8px 11px;font-size:12px;color:#4a617b;cursor:pointer;min-width:74px}
.permission-option:has(input:checked){background:#eaf3ff;border-color:#8ebdf0;color:#1b63b4;font-weight:700}
.permission-option:has(input:disabled){cursor:default}
.permission-option input,.permission-check input{accent-color:#2878d8;margin:0}
.permission-multi{margin:20px 0;padding-top:16px;border-top:1px solid #edf1f5}
.permission-multi h3{font-size:13px;color:#4b607a;margin:0 0 12px}
.permission-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:9px}
.permission-check{display:flex;align-items:center;gap:7px;font-size:12px;color:#52667d;cursor:pointer;padding:4px 0;min-width:0}
.permission-check span{overflow-wrap:anywhere}
.permission-check.all{font-weight:700;color:#2a5d98}
.permission-save{border-top:1px solid #ebeff5;padding-top:17px;margin-top:22px}
.muted{color:#8897a9}
.ai-answer{white-space:pre-wrap;line-height:1.75;color:#334a64;font-size:14px}
.auth-page{min-height:100vh;background:radial-gradient(circle at 75% 15%,#1c4b7b 0,#10233e 38%,#0b1b31 100%);display:grid;grid-template-columns:minmax(280px,1fr) minmax(350px,440px);gap:7vw;align-items:center;padding:55px max(40px,8vw);color:#fff}
.auth-intro{max-width:580px}
.auth-intro h1{color:white;font-size:43px;letter-spacing:-.03em;margin:30px 0 17px}
.auth-intro p{font-size:16px;color:#aebfd3;line-height:1.9;margin:0}
.auth-points{display:flex;gap:9px;flex-wrap:wrap;margin-top:32px}
.auth-points span{border:1px solid #47617d;border-radius:6px;padding:8px 10px;color:#c5d5e6;font-size:12px}
.auth-card{background:#fff;color:#2c3e55;padding:34px;border-radius:18px;box-shadow:0 22px 60px #07142666}
.auth-card h2{font-size:23px;margin:0 0 7px;color:#172c49}
.auth-card>p{font-size:13px;color:#8b98a9;margin:0 0 23px;line-height:1.6}
.auth-card .field{margin-bottom:14px}
.auth-card .btn.primary{width:100%;padding:11px;margin-top:8px}
.auth-switch{font-size:13px;color:#7e8ea2;margin-top:18px;text-align:center}
.link-btn{border:0;background:none;color:#2878d8;font-weight:700;padding:2px 4px}
.toast{position:fixed;right:22px;bottom:22px;max-width:min(400px,calc(100vw - 44px));z-index:10;background:#1d344f;color:white;border-radius:10px;box-shadow:0 10px 32px #142b4944;padding:13px 17px;font-size:13px;line-height:1.5}
.toast.error{background:#a7424b}
.toast.success{background:#27744e}
@media(max-width:1100px){.topbar{gap:15px;padding:0 15px}.top-nav button{min-width:auto;padding:0 11px;font-size:13px}.account .account-name{display:none}.main{padding:24px}.sidebar{width:190px}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rule-grid{grid-template-columns:1fr}}
@media(max-width:1150px){.permission-columns{grid-template-columns:185px 210px minmax(300px,1fr)}.permission-panel{padding:13px}}
@media(max-width:760px){.topbar{height:auto;min-height:64px;flex-wrap:wrap;padding:10px 15px 0;gap:6px}.brand{font-size:16px}.brand-mark{width:30px;height:30px}.top-nav{order:3;width:100%;height:45px}.top-nav button{padding:0 10px}.account{margin-left:auto}.body-layout{display:block}.sidebar{width:100%;padding:9px 12px;display:block;border-right:0;border-bottom:1px solid #e5eaf1}.sidebar-label,.side-footer{display:none}.side-nav{display:flex;overflow-x:auto;gap:4px}.side-nav button{width:auto;white-space:nowrap;padding:8px 11px;border-left:0;border-bottom:2px solid transparent;border-radius:6px}.side-nav button.active{border-bottom-color:#2878d8}.main{padding:20px 14px 40px}.page-heading{display:block}.heading-actions{justify-content:flex-start;margin-top:15px}.two-col{grid-template-columns:1fr}.auth-page{grid-template-columns:1fr;padding:35px 20px;gap:30px}.auth-intro h1{font-size:31px;margin:13px 0}.auth-points{margin-top:15px}.auth-card{padding:24px}}
@media(max-width:980px){.permission-columns{grid-template-columns:1fr 1fr}.detail-panel{grid-column:1/-1}.permission-panel{min-height:0}}
@media(max-width:480px){.metric-grid,.form-grid{grid-template-columns:1fr}.metric-card{min-height:95px}.metric-value{font-size:24px}.auth-intro p{font-size:14px}.account{gap:5px}}
@media(max-width:520px){.permission-columns{grid-template-columns:1fr}.detail-panel{grid-column:auto}.permission-check-grid{grid-template-columns:1fr}}
@media(max-width:600px){.agent-row{grid-template-columns:1fr}.agent-row .rule-actions{justify-content:flex-start}}

.sync-toolbar{display:flex;justify-content:flex-end;margin:-3px 0 16px}
.sync-toolbar{gap:9px;flex-wrap:wrap}
.sync-monitor{display:grid;gap:18px}
.sync-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:15px}
.sync-fact{min-width:0;border:1px solid #e5ecf4;border-radius:9px;background:#f8fbff;padding:13px 14px}
.sync-fact span{display:block;color:#8291a5;font-size:12px}
.sync-fact strong{display:block;margin-top:7px;color:#263e5c;font-size:14px;overflow-wrap:anywhere}
.sync-monitor .notice:last-child{margin-bottom:0}
.sync-monitor .table-wrap{max-height:540px;overflow:auto}
.sync-monitor td:last-child{min-width:180px;max-width:320px}
.sync-products-section{margin-bottom:20px}
.sync-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;margin-top:18px}
.sync-product-card{min-width:0;border:1px solid #e3eaf3;border-radius:10px;overflow:hidden;background:#fff}
.sync-product-image{height:180px;display:grid;place-items:center;background:#f2f6fb;color:#91a0af;font-size:12px;text-align:center}
.sync-product-image img{width:100%;height:100%;object-fit:contain}
.sync-product-body{padding:13px 14px;display:grid;gap:8px;min-width:0}
.sync-product-body strong{font-size:13px;color:#233a56;line-height:1.5;overflow-wrap:anywhere}
.sync-product-body span{font-size:12px;color:#526a83;overflow-wrap:anywhere}
.sync-product-body small{font-size:11px;color:#91a0af;overflow-wrap:anywhere}
.sync-more{display:flex;justify-content:center;margin-top:16px}
.sync-settings{margin-top:18px}
.sync-settings-summary{margin:14px 0 18px;padding:10px 13px;border:1px solid #dfebf7;border-radius:8px;background:#f5f9fe;color:#56718f;font-size:12px;line-height:1.6}
@media(max-width:760px){.sync-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.sync-product-grid{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}}
@media(max-width:480px){.sync-facts{grid-template-columns:1fr}.sync-product-grid{grid-template-columns:1fr 1fr}.sync-product-image{height:130px}}

.mcp-section{margin-top:18px}
.mcp-address{margin:16px 0;padding:12px 14px;border:1px solid #d8e6f6;border-radius:9px;background:#f5f9fe;color:#526d8a;font-size:12px;line-height:1.7;overflow-wrap:anywhere}
.mcp-subtitle,.mcp-form h3{color:#293f5d;font-size:15px;margin:18px 0 13px}
.mcp-agent-list{display:grid;gap:10px}
.mcp-agent-list .mcp-subtitle{margin-bottom:2px}
.mcp-agent-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:14px;border:1px solid #e4ebf3;border-radius:9px;background:#fbfdff}
.mcp-agent-info{display:grid;gap:5px;min-width:0;color:#647891;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.mcp-agent-info strong{color:#263d5a;font-size:14px}
.mcp-agent-actions{display:flex;gap:7px;flex:none;flex-wrap:wrap}
.mcp-form{border-top:1px solid #e8edf3;margin-top:21px;padding-top:7px}
.mcp-tool-set{border:1px solid #dfe8f2;border-radius:9px;padding:12px 14px;margin:16px 0 0;display:grid;gap:8px}
.mcp-tool-set legend{color:#5a6d84;font-size:12px;font-weight:650;padding:0 5px}
.mcp-tool-option{display:flex;align-items:flex-start;gap:9px;font-size:12px;color:#4f647f;padding:5px 0;cursor:pointer;min-width:0}
.mcp-tool-option input{margin:2px 0 0;accent-color:#2878d8}
.mcp-tool-option span{display:grid;gap:3px;min-width:0}
.mcp-tool-option strong{font-size:12px;color:#24446d;overflow-wrap:anywhere}
.mcp-tool-option small{font-size:11px;color:#8b9bad}
.mcp-issued-result:empty{display:none}
.mcp-issued{border:1px solid #b9d8fb;border-radius:10px;background:#f8fbff;padding:17px;margin:18px 0}
.mcp-secret-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.mcp-key-input{min-width:230px;flex:1 1 260px;border:1px solid #d2deeb;border-radius:8px;padding:9px 11px;color:#283e59;background:#fff;font:13px ui-monospace,SFMono-Regular,Consolas,monospace}
.mcp-prompt{min-height:250px!important;font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace!important;white-space:pre-wrap}
.mcp-section .table-wrap{max-height:520px;overflow:auto}
.mcp-section td{min-width:90px;max-width:290px}
@media(max-width:760px){.mcp-agent-row{display:block}.mcp-agent-actions{margin-top:13px}}
@media(max-width:480px){.mcp-secret-row .btn{flex:1}.mcp-key-input{min-width:0;flex-basis:100%}.mcp-issued{padding:12px}}

.realtime-dashboard,.overview-dashboard{display:grid;gap:18px}
.dash-anomalies:empty{display:none}
.dash-anomalies{border:1px solid #f1dfba;border-radius:9px;background:#fffaf0;padding:11px 14px;color:#765b2c}
.dash-anomalies h2{font-size:13px;line-height:1.35;margin:0 0 7px;color:#765728}
.dash-anomaly-list{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:18px;row-gap:6px}
.dash-anomaly-list li{display:flex;align-items:baseline;gap:7px;min-width:0;font-size:12px;line-height:1.4}
.dash-anomaly-list code{flex:none;font:11px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;color:#825819;overflow-wrap:anywhere;max-width:55%}
.dash-anomaly-list span{min-width:0;overflow-wrap:anywhere}
.realtime-dashboard>.notice,.overview-dashboard>.notice{margin-bottom:0}
.realtime-metric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.realtime-metric,.realtime-compare-card{display:grid;gap:8px;min-width:0;padding:15px;border:1px solid #e3ebf5;border-radius:9px;background:#f9fbfe}
.realtime-metric span,.realtime-compare-card span{color:#7489a0;font-size:12px;font-weight:650}
.realtime-metric strong{color:#1e426d;font-size:23px;line-height:1.3;overflow-wrap:anywhere}
.realtime-metric small,.realtime-compare-card small{color:#8b9aac;font-size:11px;overflow-wrap:anywhere}
.realtime-compare-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.realtime-compare-card strong{color:#21598e;font-size:17px;overflow-wrap:anywhere}
.hourly-trend,.overview-trend{display:flex;align-items:flex-end;gap:7px;height:205px;padding:12px 3px 27px;border-bottom:1px solid #e6edf5;overflow-x:auto}
.hourly-item,.overview-trend-item{min-width:25px;flex:1;height:100%;display:flex;align-items:flex-end;position:relative}
.hourly-bars{width:100%;height:100%;display:flex;align-items:flex-end;gap:2px}
.hourly-bar-slot{flex:1;height:100%;display:flex;align-items:flex-end;min-width:0}
.hourly-bar{width:100%;border-radius:4px 4px 0 0;background:linear-gradient(180deg,#65b8ef,#2675cb)}
.hourly-bar.yesterday{background:linear-gradient(180deg,#b8c5d6,#859ab5)}
.hourly-legend{display:flex;gap:16px;margin:9px 0 2px;color:#637b96;font-size:11px}
.hourly-legend span{display:inline-flex;align-items:center;gap:5px}
.hourly-legend span:before{content:"";display:inline-block;width:9px;height:9px;border-radius:2px;background:#428ed8}
.hourly-legend span.yesterday:before{background:#9bacbf}
.hourly-item span,.overview-trend-item span{position:absolute;bottom:-24px;left:50%;transform:translateX(-50%);font-size:10px;color:#91a1b3;white-space:nowrap}
.sampling-description{margin:0 0 8px;color:#617790;font-size:12px;line-height:1.7}
.sampling-time{margin:0 0 11px;color:#315d8c;font-size:12px;font-weight:650}
.sampling-summary{display:grid;gap:5px;margin:0 0 12px;color:#526f8e;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.sampling-legend{display:flex;gap:16px;margin:8px 0;color:#637b96;font-size:11px}
.sampling-legend span{display:inline-flex;align-items:center;gap:5px}
.sampling-legend span:before{content:"";display:inline-block;width:9px;height:9px;border-radius:2px;background:#428ed8}
.sampling-legend span.yesterday:before{background:#9bacbf}
.sampling-viewport{max-width:100%;overflow-x:auto;overflow-y:hidden;padding-bottom:25px;border-bottom:1px solid #e6edf5}
.sampling-plot{height:175px;min-width:1728px;display:grid;grid-template-columns:repeat(144,minmax(12px,1fr));align-items:end}
.sampling-slot{height:100%;position:relative;min-width:0}
.sampling-bars{height:100%;display:flex;align-items:flex-end;gap:1px}
.sampling-bar-track{height:100%;flex:1;min-width:0;display:flex;align-items:flex-end}
.sampling-bar{width:100%;min-height:3px;border-radius:3px 3px 0 0;background:#428ed8}
.sampling-bar.yesterday{background:#9bacbf}
.sampling-axis{position:absolute;bottom:-22px;left:0;color:#91a1b3;font-size:10px;white-space:nowrap}
.overview-trend-item{min-width:20px}
.overview-trend-item .trend-bar{width:100%}
.profit-list{display:grid;gap:14px;padding:4px 0}
.profit-row{display:grid;grid-template-columns:85px minmax(0,1fr) 110px;gap:10px;align-items:center;color:#64758c;font-size:12px}
.profit-row strong{text-align:right;color:#324d6d;overflow-wrap:anywhere}
.profit-track{height:10px;border-radius:99px;background:#eff3f8;overflow:hidden}
.profit-fill{height:100%;background:#4e9cda;border-radius:99px}
.profit-fill.negative{background:#d7868e}
.realtime-rankings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.realtime-rankings .card{min-width:0}
.realtime-rankings .list-row{min-width:0}
.realtime-rankings .list-row strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.realtime-rankings .list-row .amount{font-size:12px;white-space:nowrap}
.overview-controls{padding:15px 17px;margin-bottom:18px}
.overview-periods{display:flex;flex-wrap:wrap;gap:9px}
.overview-custom-period{display:flex;align-items:flex-end;gap:9px;margin-top:14px}
.overview-custom-period .field{min-width:190px}
.overview-range{margin:0;color:#536f8d;font-size:13px;font-weight:650}
.product-archive-section{margin-bottom:25px}
.archive-intro{margin-bottom:14px}
.archive-intro h2{font-size:18px;color:#213653;margin:0 0 5px}
.archive-intro p{color:#8292a5;font-size:12px;line-height:1.6;margin:0}
.archive-filter .filter-row .field:first-child{flex:2 1 240px}
.archive-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.archive-card{display:flex;flex-direction:column;min-width:0;overflow:hidden;background:#fff;border:1px solid #e3ebf4;border-radius:10px;box-shadow:0 2px 10px #1f3e670b}
.archive-image{height:175px;flex:0 0 175px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#f3f7fb;color:#9aaaba;font-size:12px;text-align:center}
.archive-image img{display:block;width:100%;height:100%;object-fit:contain}
.archive-details{padding:14px;display:grid;align-content:start;gap:8px;min-width:0;flex:1;background:#fff;border-top:1px solid #e3ebf4}
.archive-details>strong{color:#243c59;font-size:14px;line-height:1.45;min-height:40px;overflow-wrap:anywhere}
.archive-detail{display:grid;grid-template-columns:70px minmax(0,1fr);gap:7px;font-size:12px;line-height:1.4}
.archive-detail span{color:#8b9caf}
.archive-detail b{font-weight:550;color:#516981;overflow-wrap:anywhere}
.archive-pagination{display:flex;justify-content:flex-end;align-items:center;gap:9px;margin-top:14px;color:#7b8da2;font-size:12px;flex-wrap:wrap}
.archive-pagination span{margin-right:auto}
@media(max-width:1100px){.realtime-rankings,.archive-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.realtime-metric-grid,.realtime-compare-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.realtime-rankings{grid-template-columns:1fr}.archive-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.realtime-metric-grid,.realtime-compare-grid,.archive-grid,.dash-anomaly-list{grid-template-columns:1fr}.profit-row{grid-template-columns:65px minmax(0,1fr) 80px;gap:6px}.overview-custom-period{display:block}.overview-custom-period .btn{margin-top:10px}.archive-pagination span{flex-basis:100%}}
@media(max-width:680px){.archive-grid{grid-template-columns:1fr}.archive-image{height:200px;flex-basis:200px}}

.account-access-list{display:grid;gap:12px}
.account-access-row{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:15px;border:1px solid #e3ebf4;border-radius:10px;background:#fbfdff}
.account-access-info{display:grid;gap:5px;min-width:0;overflow-wrap:anywhere;color:#637992;font-size:12px}
.account-access-info strong{font-size:14px;color:#263d5a}
.account-access-controls{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;max-width:58%}
.account-inline-role{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.account-inline-role select{min-width:120px;max-width:180px}
.account-editor-host:not(:empty){margin-top:20px}
.access-editor{max-width:900px}
.access-editor form{display:grid;gap:15px}
.access-subsection{display:grid;gap:10px;padding:15px;border:1px solid #dfe8f2;border-radius:9px;background:#fafcff;min-width:0}
.access-subsection h3{margin:0;color:#293f5d;font-size:14px}
.access-zero{display:flex;align-items:center;gap:8px;color:#4f647f;font-size:12px;line-height:1.5;cursor:pointer}
.access-all-scope{padding:10px 12px;border:1px solid #c9ddf3;border-radius:8px;background:#f0f7ff;color:#285a91;font-weight:650}
.access-scope-tree{display:grid;gap:10px}
.access-zero input,.store-tree input,.access-tool-grid input{accent-color:#2878d8;flex:none}
.store-tree{display:grid;gap:10px;min-width:0}
.store-tree-group{border:1px solid #e2eaf3;border-radius:8px;background:#fff;overflow:hidden}
.store-tree-platform{display:flex;align-items:center;gap:9px;padding:10px 12px;background:#f2f7fd;color:#355273;cursor:pointer}
.store-tree-platform small{margin-left:auto;color:#8396aa;font-size:11px}
.store-tree-children{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 12px;padding:8px 12px}
.store-tree-store{display:flex;align-items:center;gap:7px;min-width:0;padding:5px;color:#4e657f;font-size:12px;cursor:pointer}
.store-tree-store span{min-width:0;overflow-wrap:anywhere}
.store-tree-store small{margin-left:auto;color:#90a0b1;font-size:11px;overflow-wrap:anywhere}
.access-tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.access-tool-choice{display:flex;align-items:flex-start;gap:8px;padding:9px;border:1px solid #e1eaf3;border-radius:8px;background:#fff;min-width:0;cursor:pointer}
.access-tool-choice span{display:grid;gap:4px;min-width:0}
.access-tool-choice strong{font-size:11px;color:#335778;overflow-wrap:anywhere}
.access-tool-choice small{font-size:11px;color:#8194a8}
.trial-days-control{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}
.trial-days-control .field{min-width:150px}
.mcp-scope-host .store-tree{max-height:300px;overflow:auto}
@media(max-width:760px){.account-access-row{display:grid}.account-access-controls{max-width:none;justify-content:flex-start}.store-tree-children,.access-tool-grid{grid-template-columns:1fr}}
@media(max-width:480px){.account-access-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.account-inline-role{grid-column:1/-1}.account-access-controls .btn{min-width:0}.access-subsection{padding:11px}}
:root[data-theme="dark"] .archive-details,:root[data-theme="dark"] .store-tree-group,:root[data-theme="dark"] .access-tool-choice{background:#18263a;border-color:#344760}
:root[data-theme="dark"] .account-access-row,:root[data-theme="dark"] .access-subsection,:root[data-theme="dark"] .store-tree-platform{background:#21344c;border-color:#3c526d;color:#d9e6f6}
:root[data-theme="dark"] .access-all-scope{background:#1d3d5d;border-color:#4a769d;color:#d4e9ff}
:root[data-theme="dark"] .account-access-info strong,:root[data-theme="dark"] .access-subsection h3,:root[data-theme="dark"] .access-tool-choice strong{color:#e1edfc}
:root[data-theme="dark"] .account-access-info,:root[data-theme="dark"] .access-zero,:root[data-theme="dark"] .store-tree-store,:root[data-theme="dark"] .access-tool-choice small{color:#aec2d8}

.top-nav{flex:1;min-width:0}
.top-controls{display:flex;align-items:center;gap:10px;margin-left:auto;min-width:0}
.theme-toggle{border:1px solid #637a96;border-radius:8px;background:#1c3555;color:#edf5ff;width:35px;height:35px;padding:0;font-size:19px;flex:none}
.theme-toggle:hover{background:#2a4d75;color:#fff}
.top-sync{display:grid;align-content:center;gap:2px;min-width:146px;max-width:240px;padding:6px 10px;border:1px solid #47617e;border-radius:8px;background:#183553;color:#cde1f8;line-height:1.25}
.top-sync strong{font-size:11px;color:#eaf4ff;white-space:nowrap}
.top-sync small{font-size:10px;color:#b8cae0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top-sync .top-sync-error{color:#ffd2ad}
.top-sync.running{border-color:#84b9e8;background:#17436b}
.top-sync.success{border-color:#488f77;background:#19483f}
.top-sync.blocked,.top-sync.error,.top-sync.partial{border-color:#b58752;background:#4b3826}
.account-menu{position:relative;flex:none}
.account-summary{display:flex;align-items:center;gap:7px;list-style:none;cursor:pointer;color:#e7f1fd;font-size:12px;white-space:nowrap}
.account-summary::-webkit-details-marker{display:none}
.account-summary:after{content:"▾";font-size:10px;color:#a9c0dc}
.account-dropdown{position:absolute;z-index:20;right:0;top:calc(100% + 12px);min-width:210px;display:grid;gap:8px;padding:15px;background:#fff;border:1px solid #dbe4ef;border-radius:10px;box-shadow:0 12px 32px #0a1d3950;color:#4a5d75;font-size:12px}
.account-dropdown strong{font-size:14px;color:#223b5a}
.account-dropdown .btn{justify-self:start;margin-top:4px}
.task-entry-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.task-entry{border:1px solid #e1eaf4;border-radius:9px;background:#f8fbff;padding:15px;min-width:0}
.task-entry strong{color:#24415f;font-size:14px}
.task-entry p{font-size:12px;color:#8294a9;line-height:1.5;margin:7px 0 12px}
@media(max-width:1200px){.topbar{gap:12px}.top-sync{min-width:115px;max-width:155px}.top-nav button{min-width:auto;padding:0 10px}}
@media(max-width:760px){.topbar{padding:9px 14px 0}.top-nav{order:3;flex:1 0 100%;width:100%;height:43px}.top-controls{margin-left:auto}.top-sync{min-width:110px;max-width:140px}.account-summary .account-name{display:none}.task-entry-grid{grid-template-columns:1fr}}
@media(max-width:420px){.top-controls{gap:6px}.top-sync{min-width:96px;max-width:110px;padding:5px 6px}.top-sync small{font-size:9px}.account-summary .avatar{width:28px;height:28px}.theme-toggle{width:31px;height:31px}}

:root[data-theme="dark"]{color-scheme:dark;background:#0e1726;color:#d9e6f6}
:root[data-theme="dark"] body,:root[data-theme="dark"] .main{background:#0e1726;color:#d9e6f6}
:root[data-theme="dark"] .topbar{background:#0b1a2d;box-shadow:0 3px 16px #0005}
:root[data-theme="dark"] .sidebar,:root[data-theme="dark"] .card,:root[data-theme="dark"] .permission-panel,:root[data-theme="dark"] .auth-card,:root[data-theme="dark"] .account-dropdown,:root[data-theme="dark"] .archive-card,:root[data-theme="dark"] .rule-card{background:#18263a;border-color:#344760;color:#d9e6f6}
:root[data-theme="dark"] .sidebar{border-right-color:#344760}
:root[data-theme="dark"] .sidebar-label,:root[data-theme="dark"] .eyebrow,:root[data-theme="dark"] .subtitle,:root[data-theme="dark"] .helper,:root[data-theme="dark"] .field,:root[data-theme="dark"] .table-total,:root[data-theme="dark"] .side-footer,:root[data-theme="dark"] .archive-intro p{color:#a5b6cb}
:root[data-theme="dark"] h1,:root[data-theme="dark"] .section-title h2,:root[data-theme="dark"] .section-title h3,:root[data-theme="dark"] .account-dropdown strong,:root[data-theme="dark"] .archive-intro h2,:root[data-theme="dark"] .permission-detail-top strong,:root[data-theme="dark"] .role-item strong,:root[data-theme="dark"] .task-entry strong{color:#e5f0ff}
:root[data-theme="dark"] .side-nav button,:root[data-theme="dark"] .tabs button,:root[data-theme="dark"] .resource-item,:root[data-theme="dark"] .role-item{color:#aec3dc}
:root[data-theme="dark"] .side-nav button:hover,:root[data-theme="dark"] .side-nav button.active,:root[data-theme="dark"] .role-item:hover,:root[data-theme="dark"] .resource-item:hover,:root[data-theme="dark"] .role-item.active,:root[data-theme="dark"] .resource-item.active{background:#203a58;color:#9bcaff}
:root[data-theme="dark"] .tabs{border-color:#344760}
:root[data-theme="dark"] .tabs button.active{color:#97c8ff}
:root[data-theme="dark"] .btn:not(.primary):not(.danger):not(.ghost-on-dark):not(.theme-toggle){background:#22354c;border-color:#49617a;color:#d5e6f8}
:root[data-theme="dark"] .btn.subtle{background:#253d58}
:root[data-theme="dark"] .field input,:root[data-theme="dark"] .field select,:root[data-theme="dark"] .field textarea,:root[data-theme="dark"] .role-select,:root[data-theme="dark"] .role-name-input,:root[data-theme="dark"] .resource-search,:root[data-theme="dark"] .mcp-key-input,:root[data-theme="dark"] .mcp-prompt{background:#111f31;border-color:#435a73;color:#ecf5ff}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#8096ad}
:root[data-theme="dark"] th{background:#203248;color:#bdd0e6}
:root[data-theme="dark"] td{color:#d0def0;border-color:#31445b}
:root[data-theme="dark"] tbody tr:hover{background:#21374f}
:root[data-theme="dark"] .metric-value,:root[data-theme="dark"] .metric-label,:root[data-theme="dark"] .list-row strong,:root[data-theme="dark"] .archive-details>strong,:root[data-theme="dark"] .realtime-metric strong,:root[data-theme="dark"] .realtime-compare-card strong,:root[data-theme="dark"] .profit-row strong{color:#e2efff}
:root[data-theme="dark"] .metric-note,:root[data-theme="dark"] .list-row small,:root[data-theme="dark"] .archive-detail span,:root[data-theme="dark"] .archive-detail b{color:#a3b9d0}
:root[data-theme="dark"] .notice{background:#1c3653;border-color:#41658a;color:#cee3fb}
:root[data-theme="dark"] .notice.warn,:root[data-theme="dark"] .dash-anomalies{background:#3e3321;border-color:#8e7244;color:#f1d9aa}
:root[data-theme="dark"] .dash-anomalies h2,:root[data-theme="dark"] .dash-anomaly-list code{color:#f4d095}
:root[data-theme="dark"] .notice.error{background:#46282e;border-color:#a65b63;color:#ffd4d8}
:root[data-theme="dark"] .notice.success{background:#204338;border-color:#578b73;color:#d2f3df}
:root[data-theme="dark"] .empty,:root[data-theme="dark"] .empty p{color:#a9bdd3}
:root[data-theme="dark"] .empty strong{color:#e0edfb}
:root[data-theme="dark"] .empty-icon,:root[data-theme="dark"] .sync-fact,:root[data-theme="dark"] .realtime-metric,:root[data-theme="dark"] .realtime-compare-card,:root[data-theme="dark"] .mcp-agent-row,:root[data-theme="dark"] .task-entry,:root[data-theme="dark"] .archive-image,:root[data-theme="dark"] .mcp-address,:root[data-theme="dark"] .sync-settings-summary{background:#21344c;border-color:#3c526d;color:#c9dcef}
:root[data-theme="dark"] .filter-card,:root[data-theme="dark"] .import-zone,:root[data-theme="dark"] .mcp-issued{background:#1b2c42;border-color:#3c5b7c}
:root[data-theme="dark"] .profit-track{background:#30455e}
:root[data-theme="dark"] .permission-option,:root[data-theme="dark"] .permission-multi,:root[data-theme="dark"] .permission-detail-top,:root[data-theme="dark"] .rule-card,:root[data-theme="dark"] .list-row{border-color:#344760}
:root[data-theme="dark"] .permission-option:has(input:checked){background:#244d75;color:#e2f1ff;border-color:#598dc2}
:root[data-theme="dark"] .auth-page{background:radial-gradient(circle at 75% 15%,#1b3655 0,#0d1d31 55%,#081321 100%)}
:root[data-theme="dark"] .permission-panel-head,:root[data-theme="dark"] .permission-resource-title h2,:root[data-theme="dark"] .permission-multi h3,:root[data-theme="dark"] .permission-radio legend,:root[data-theme="dark"] .permission-check,:root[data-theme="dark"] .permission-detail-top small,:root[data-theme="dark"] .permission-group{color:#c5d8ec}
:root[data-theme="dark"] .sync-fact strong,:root[data-theme="dark"] .mcp-agent-info strong,:root[data-theme="dark"] .mcp-tool-option strong,:root[data-theme="dark"] .role-item small,:root[data-theme="dark"] .resource-item small{color:#d9e9fa}
:root[data-theme="dark"] .realtime-metric span,:root[data-theme="dark"] .realtime-metric small,:root[data-theme="dark"] .realtime-compare-card span,:root[data-theme="dark"] .realtime-compare-card small,:root[data-theme="dark"] .sync-fact span,:root[data-theme="dark"] .mcp-agent-info,:root[data-theme="dark"] .mcp-tool-option small,:root[data-theme="dark"] .task-entry p{color:#aec2d8}
:root[data-theme="dark"] .archive-detail b,:root[data-theme="dark"] .archive-pagination,:root[data-theme="dark"] .overview-range,:root[data-theme="dark"] .profit-row{color:#c1d4e8}
:root[data-theme="dark"] .sampling-description,:root[data-theme="dark"] .sampling-summary,:root[data-theme="dark"] .sampling-legend{color:#b2c8df}
:root[data-theme="dark"] .sampling-time{color:#9ac9f8}
:root[data-theme="dark"] .sampling-viewport{border-bottom-color:#344760}
:root[data-theme="dark"] .rule-url{background:#20354d;color:#d2e3f4}
