:root{--ink:#172033;--muted:#6f7b91;--line:#e6eaf0;--canvas:#f4f6f9;--nav:#121b2d;--primary:#5b5cf0;--primary-dark:#4748d8;--radius:14px}*{box-sizing:border-box}body{margin:0;background:var(--canvas);color:var(--ink);font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;font-size:14px}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:230px;background:linear-gradient(180deg,#162135,#101827);padding:26px 16px 20px;color:#cfd7e7;z-index:20;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:11px;color:#fff;text-decoration:none;padding:0 8px 27px}.brand-mark{width:38px;height:38px;background:linear-gradient(135deg,#7878ff,#5354da);display:grid;place-items:center;border-radius:11px;font-weight:800;font-size:19px;box-shadow:0 8px 20px #090d1780}.brand strong,.brand small{display:block}.brand strong{font-size:17px;letter-spacing:-.3px}.brand small{text-transform:uppercase;color:#7f8ba2;font-size:9px;letter-spacing:1.7px;margin-top:2px}.sidebar .nav-link{color:#9eabc0;border-radius:9px;padding:11px 12px;font-weight:550}.sidebar .nav-link span{display:inline-grid;width:24px;font-size:17px}.sidebar .nav-link:hover{color:#fff;background:#ffffff0a}.sidebar .nav-link.active{background:#6566e9;color:#fff;box-shadow:0 6px 18px #070c1840}.sidebar-footer{margin-top:auto;border-top:1px solid #ffffff12;padding:18px 10px 0;font-size:12px;color:#9ea9bc}.sidebar-footer small{display:block;color:#667288;margin:7px 0 0 14px}.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#3ed18a;box-shadow:0 0 0 4px #3ed18a1f;margin-right:7px}.main-content{margin-left:230px;min-height:100vh;padding:30px 36px 22px;max-width:1600px}.topbar{display:flex;align-items:center;margin-bottom:26px}.topbar h1{font-size:25px;line-height:1;margin:6px 0 0;font-weight:720;letter-spacing:-.6px}.eyebrow{font-size:10px;letter-spacing:1.6px;color:#8a94a6;font-weight:700}.top-actions{margin-left:auto;display:flex;gap:9px}.btn{border-radius:8px;font-weight:600;font-size:13px;padding:.56rem .86rem}.btn-primary{background:var(--primary);border-color:var(--primary)}.btn-primary:hover{background:var(--primary-dark);border-color:var(--primary-dark)}.sidebar-toggle{display:none}.alert{border:0;box-shadow:0 5px 20px #25314b10}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}.stat-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:19px 18px;display:grid;grid-template-columns:46px 1fr;align-items:center;gap:12px;box-shadow:0 4px 16px #22304a08}.stat-card small,.stat-card strong{display:block}.stat-card small{color:var(--muted);font-size:12px}.stat-card strong{font-size:25px;margin-top:2px;letter-spacing:-.5px}.stat-card em{grid-column:2;color:#9ba4b4;font-style:normal;font-size:10px;margin-top:-9px}.stat-icon{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;font-size:17px;font-weight:700}.stat-icon.blue{background:#edf1ff;color:#5864e7}.stat-icon.green{background:#eafaf2;color:#1daa6e}.stat-icon.amber{background:#fff6e4;color:#d58c22}.stat-icon.violet{background:#f4edff;color:#955add}.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 4px 18px #22304a07;overflow:hidden}.panel-head{padding:19px 21px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.panel-head h2{font-size:16px;margin:0;font-weight:720}.panel-head p{font-size:11px;color:#929bad;margin:4px 0 0}.filter-bar{display:flex;gap:9px;padding:14px 20px;border-bottom:1px solid var(--line)}.filter-bar .form-select{width:auto;min-width:135px}.search-box{position:relative;flex:1;min-width:210px}.search-box span{position:absolute;left:12px;top:8px;color:#8993a5;font-size:18px}.search-box input{border:1px solid #dce1e8;border-radius:8px;width:100%;padding:9px 12px 9px 36px;outline:0}.search-box input:focus,.form-control:focus,.form-select:focus{border-color:#898af2;box-shadow:0 0 0 3px #6566e919}.form-select,.form-control{border-color:#dce1e8;border-radius:8px;font-size:13px}.rule-table{font-size:12px}.rule-table thead th{background:#fafbfc;color:#8791a3;font-size:10px;text-transform:uppercase;letter-spacing:.45px;padding:11px 20px;border-bottom-color:var(--line);font-weight:700}.rule-table td{padding:13px 20px;border-bottom-color:#edf0f4}.rule-table td:first-child{min-width:210px}.rule-table code{font-family:"Cascadia Code",Consolas,monospace;color:#27324a;background:transparent;font-size:12px}.type-badge{border:1px solid #dfe4ec;border-radius:5px;padding:4px 7px;color:#58657a;background:#fbfcfd;font-size:10px;font-weight:650}.category-badge{padding:4px 9px;border-radius:20px;background:#eef1f5;color:#586476;font-weight:700;font-size:10px}.category-ai{background:#f0eaff!important;color:#8053c8!important}.category-direct{background:#e7f9f0!important;color:#268a62!important}.category-proxy{background:#e9eeff!important;color:#4f65c8!important}.category-media{background:#fff0e8!important;color:#c26c3c!important}.category-telegram{background:#e6f6fc!important;color:#3581a8!important}.category-microsoft{background:#fff6dc!important;color:#a47d1e!important}.remark{color:#778397}.status-switch{border:0;background:transparent;padding:0;display:flex;align-items:center;gap:7px;color:#8993a4;font-size:11px}.status-switch i{display:block;width:29px;height:16px;border-radius:10px;background:#c9cfda;position:relative;transition:.2s}.status-switch i:after{content:"";position:absolute;width:12px;height:12px;border-radius:50%;background:#fff;top:2px;left:2px;box-shadow:0 1px 2px #0003;transition:.2s}.status-switch.on{color:#218662}.status-switch.on i{background:#38bd84}.status-switch.on i:after{left:15px}.muted-row{opacity:.58}.row-actions{display:flex;justify-content:flex-end;gap:12px}.row-actions a,.row-actions button{color:#5866d9;text-decoration:none;border:0;background:none;padding:0;font-size:11px}.row-actions button{color:#d45555}.row-actions form{margin:0}.panel-foot{display:flex;justify-content:space-between;align-items:center;padding:13px 20px;color:#8e98a9;font-size:11px}.page-chip{display:inline-grid;place-items:center;width:27px;height:27px;color:#687389;text-decoration:none;border-radius:6px}.page-chip.active{background:#6263e9;color:#fff}.empty-state{text-align:center;padding:48px 20px}.empty-state>span{font-size:30px;color:#a7afbd}.empty-state h3{font-size:15px;margin:8px 0 4px}.empty-state p{color:#8a94a5}.form-layout{display:grid;grid-template-columns:minmax(0,2.2fr) minmax(250px,.8fr);gap:20px}.form-panel{overflow:visible}.stack-form{padding:24px}.stack-form>*+*{margin-top:22px}.form-label{font-size:12px;font-weight:700;margin-bottom:7px}.form-label span{font-weight:400;color:#9ba4b5}.stack-form .form-control,.stack-form .form-select{padding:.68rem .75rem}.form-text{font-size:10px;color:#98a1b1}.form-actions{display:flex;justify-content:flex-end;gap:9px;padding-top:18px;border-top:1px solid var(--line)}.hint-card{background:#f0f1ff;border:1px solid #dfe1ff;border-radius:var(--radius);padding:22px;color:#56607c;align-self:start}.hint-icon{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#6869e9;color:#fff;font-weight:800;margin-bottom:14px}.hint-card h3{font-size:14px;color:#303b59;margin-bottom:18px}.hint-card dl{margin:0}.hint-card dt{font-family:Consolas,monospace;font-size:11px;color:#555ad3}.hint-card dd{font-size:11px;color:#7d879a;margin:2px 0 12px}.hint-card p{font-size:11px;line-height:1.7}.category-list{padding:4px 20px}.category-row{display:flex;align-items:center;gap:12px;padding:15px 0;border-bottom:1px solid var(--line)}.category-row:last-child{border:0}.category-letter{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#eef1f5;color:#5c687c;font-weight:800}.category-info{width:145px}.category-info strong,.category-info span{display:block}.category-info strong{font-size:13px}.category-info span{font-size:10px;color:#8d97a8;margin-top:2px}.category-row>code{font-size:10px;color:#68748a;background:#f6f7f9;padding:7px;border-radius:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.category-row form{margin:0}.categories-layout{grid-template-columns:minmax(0,2.4fr) minmax(270px,.8fr)}.compact-form{align-self:start}.import-area{font-family:"Cascadia Code",Consolas,monospace;font-size:12px;line-height:1.8;background:#fbfcfd}.preview-panel{max-width:1050px}.subscription-strip{margin:20px;padding:12px 14px;background:#f5f6fa;border:1px solid var(--line);border-radius:9px;display:flex;align-items:center;gap:12px}.subscription-strip span{font-size:10px;font-weight:700;color:#8590a2;text-transform:uppercase}.subscription-strip code{flex:1;color:#4c5970;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.subscription-strip button{border:0;background:none;color:#595bdc;font-weight:700;font-size:11px}.code-window{background:#141d2e;border-radius:11px;margin:0 20px 20px;overflow:hidden;color:#dce5f4}.code-toolbar{height:40px;background:#1d283b;display:flex;align-items:center;justify-content:space-between;padding:0 14px}.code-toolbar i{display:inline-block;width:8px;height:8px;border-radius:50%;background:#ff6872;margin-right:5px}.code-toolbar i:nth-child(2){background:#ffc554}.code-toolbar i:nth-child(3){background:#3fd18b}.code-toolbar button{border:0;background:transparent;color:#9ba8bb;font-size:10px}.code-window pre{margin:0;padding:22px;min-height:300px;color:#cad5e5;font-size:12px;line-height:1.75}.page-footer{text-align:center;color:#a4acb9;font-size:10px;padding-top:25px}.alert-danger{background:#fff0f0;color:#a84444}.alert-success{background:#eaf8f1;color:#237856}
@media(max-width:1050px){.stats-grid{grid-template-columns:repeat(2,1fr)}.filter-bar{flex-wrap:wrap}.search-box{flex-basis:100%}.form-layout,.categories-layout{grid-template-columns:1fr}.hint-card{order:-1}.category-row{flex-wrap:wrap}.category-row>code{order:5;flex-basis:100%}}
@media(max-width:720px){.sidebar{transform:translateX(-100%);transition:.2s}.nav-open .sidebar{transform:translateX(0);box-shadow:8px 0 30px #0004}.main-content{margin-left:0;padding:22px 16px}.sidebar-toggle{display:block;border:0;background:transparent;font-size:22px;margin-right:12px}.top-actions .btn:first-child{display:none}.stats-grid{grid-template-columns:1fr 1fr;gap:10px}.stat-card{padding:14px;grid-template-columns:38px 1fr}.stat-icon{width:36px;height:36px}.stat-card strong{font-size:20px}.filter-bar .form-select{width:calc(50% - 5px);min-width:0}.rule-table td,.rule-table thead th{padding-left:12px;padding-right:12px}.panel-head{align-items:flex-start;gap:10px}.category-info{width:auto;flex:1}.category-row>code{flex-basis:100%}.topbar h1{font-size:21px}}

/* YAML document workspace */
.file-grid{padding:4px 20px}.yaml-card{display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:15px;padding:18px 0;border-bottom:1px solid var(--line)}.yaml-card:last-child{border-bottom:0}.yaml-card.draft{background:linear-gradient(90deg,transparent,#fafbfc 50%,transparent)}.yaml-file-icon{width:48px;height:54px;border-radius:9px;background:linear-gradient(145deg,#5961e8,#7d70f1);color:#fff;display:grid;place-items:center;box-shadow:0 7px 18px #5b5cf029}.yaml-file-icon span{font-size:9px;font-weight:800;letter-spacing:.6px}.yaml-card-main{min-width:0}.yaml-title-row{display:flex;align-items:center;gap:8px}.yaml-title-row h3{font-size:14px;margin:0;font-weight:720}.yaml-card-main>code{display:inline-block;margin-top:4px;color:#5c67d8;font-size:11px}.yaml-card-main>p{margin:7px 0;color:#7d8798;font-size:11px}.yaml-meta{display:flex;gap:14px;color:#9aa3b2;font-size:10px}.publish-badge{padding:3px 7px;border-radius:10px;background:#f0f2f5;color:#8993a4;font-size:9px;font-weight:700}.publish-badge.published{background:#e7f8ef;color:#248861}.yaml-card-actions{display:flex;align-items:center;gap:7px}.yaml-card-actions form{margin:0}.file-empty{grid-column:1/-1}.yaml-editor-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:18px;align-items:start}.editor-panel{overflow:hidden}.editor-toolbar{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid var(--line)}.editor-toolbar h2{font-size:15px;margin:0}.editor-toolbar p{font-size:10px;color:#8f99aa;margin:3px 0 0}.editor-tools{display:flex;align-items:center;gap:8px}.yaml-status{font-size:10px;padding:5px 8px;border-radius:12px}.yaml-status.neutral{background:#f1f3f6;color:#7d8798}.yaml-status.valid{background:#e7f8ef;color:#21825d}.yaml-status.invalid{background:#ffeded;color:#bb4848}.code-editor-wrap{background:#131c2c}.code-editor-head{height:36px;background:#1c2739;color:#9eabc0;display:flex;justify-content:space-between;align-items:center;padding:0 15px;font-size:10px}.yaml-editor{display:block;width:100%;height:560px;resize:vertical;border:0;outline:0;padding:20px;background:#131c2c;color:#d6dfed;font:12px/1.75 "Cascadia Code",Consolas,monospace;tab-size:2}.editor-footer{display:flex;justify-content:space-between;padding:10px 16px;color:#8f99aa;font-size:9px}.editor-settings{display:flex;flex-direction:column;gap:16px}.editor-settings .stack-form{padding:19px}.editor-settings .stack-form>*+*{margin-top:17px}.editor-help pre{background:#1b2540;color:#dbe3f0;border-radius:8px;padding:12px;font-size:9px;overflow:auto}.input-group-text{font-size:11px;color:#7f8999;border-color:#dce1e8;background:#f5f6f8}.subscription-list .category-info{width:170px}.mini-category-list{border-top:1px solid var(--line);padding:8px 19px 16px}.mini-category-list>div{display:flex;align-items:center;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--line)}.mini-category-list>div:last-child{border:0}.mini-category-list strong,.mini-category-list small{display:block}.mini-category-list strong{font-size:11px}.mini-category-list small{font-size:9px;color:#9aa3b2;margin-top:2px}.mini-category-list form{margin:0}.mini-category-list button{border:0;background:none;color:#cc5353;font-size:10px}
@media(max-width:1050px){.yaml-editor-layout{grid-template-columns:1fr}.editor-settings{display:grid;grid-template-columns:1fr 1fr}.yaml-card{grid-template-columns:52px 1fr}.yaml-card-actions{grid-column:2;justify-content:flex-start}}
@media(max-width:720px){.file-stats{grid-template-columns:1fr 1fr}.yaml-card{grid-template-columns:42px 1fr;align-items:start}.yaml-file-icon{width:40px;height:46px}.yaml-card-actions{flex-wrap:wrap}.yaml-meta{flex-wrap:wrap;gap:6px 12px}.editor-toolbar{align-items:flex-start;gap:12px}.editor-tools{flex-wrap:wrap;justify-content:flex-end}.yaml-status{flex-basis:100%;text-align:right}.yaml-editor{height:480px;padding:14px;font-size:11px}.editor-settings{grid-template-columns:1fr}}
