:root{--purple:#9250f7;--purple-2:#b34df2;--ink:#10213a;--muted:#728099;--line:#e8ebf2;--bg:#f6f8fc;--card:#fff;--shadow:0 12px 30px rgba(26,43,77,.08)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:var(--ink)}button,input,textarea{font:inherit}button,a{transition:.2s ease}button{cursor:pointer}a{text-decoration:none;color:inherit}[hidden]{display:none!important}
.auth-shell{position:relative;min-height:100vh;display:grid;place-items:center;overflow:hidden;padding:20px;background:linear-gradient(135deg,#1a1a2e,#16213e,#0f3460);color:#fff}
.auth-shell:before,.auth-shell:after{display:none}
.star-field{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:1}.particle{position:absolute;bottom:-20px;display:block;background:linear-gradient(135deg,#8b5cf6,#a855f7);border-radius:50%;box-shadow:0 0 10px rgba(139,92,246,.7);animation:particle-float-up linear infinite;will-change:transform,opacity}@keyframes particle-float-up{0%{transform:translate3d(0,0,0) rotate(0);opacity:0}10%{opacity:1}90%{opacity:1}100%{transform:translate3d(0,-105vh,0) rotate(720deg);opacity:0}}
.orbit{position:absolute;left:50%;top:50%;border:2px solid rgba(139,92,246,.15);border-radius:50%;transform:translate(-50%,-50%);z-index:1;will-change:transform,opacity}.orbit-one{width:400px;height:400px;animation:orbit-pulse 4s ease-in-out infinite}.orbit-two{width:500px;height:500px;animation:orbit-pulse 4s 1s ease-in-out infinite}.orbit-three{width:600px;height:600px;animation:orbit-pulse 4s 2s ease-in-out infinite}@keyframes orbit-pulse{0%,100%{transform:translate(-50%,-50%) scale(1);opacity:.3}50%{transform:translate(-50%,-50%) scale(1.05);opacity:.6}}
.glass-card{position:relative;z-index:10;width:min(420px,calc(100vw - 40px));padding:40px;border:1px solid rgba(255,255,255,.2);border-radius:24px;background:rgba(255,255,255,.1);box-shadow:0 25px 50px -12px rgba(0,0,0,.5),inset 0 0 0 1px rgba(255,255,255,.1);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}.glass-card[data-view="login"]{min-height:586px}.glass-card:before{content:"";position:absolute;inset:-2px;border-radius:26px;background:linear-gradient(135deg,#8b5cf6,#a855f7,#8b5cf6);z-index:-1;opacity:.42;filter:blur(20px);animation:card-glow 3s ease-in-out infinite}@keyframes card-glow{0%,100%{opacity:.3}50%{opacity:.6}}
.brand-emblem{width:80px;height:80px;margin:0 auto 20px;display:grid;place-items:center;border-radius:20px;background:linear-gradient(135deg,#8b5cf6,#a855f7);font-size:48px;color:#33d8e9;box-shadow:0 10px 30px rgba(102,126,234,.4);position:relative}.brand-emblem span{position:absolute;font-size:22px;color:#ff80e8;transform:rotate(-22deg)}
.auth-panel h1{text-align:center;margin:0 0 8px;font-size:28px;font-weight:700;line-height:1.5;letter-spacing:1px}.auth-subtitle{text-align:center;font-size:14px;color:rgba(255,255,255,.6);margin:0 0 35px}.auth-panel form{display:grid;gap:20px}.field{height:52px;display:flex;align-items:center;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:rgba(255,255,255,.1);overflow:hidden;transition:all .3s ease}.field:focus-within{border-color:rgba(102,126,234,.6);background:rgba(255,255,255,.15);box-shadow:0 0 20px rgba(102,126,234,.2)}.field-icon{width:50px;height:50px;flex:0 0 50px;display:grid;place-items:center;color:rgba(255,255,255,.5)}.field input{flex:1;height:50px;min-width:0;border:0;outline:0;color:#fff;background:transparent;padding:0 4px;font-size:15px}.field input::placeholder{color:rgba(255,255,255,.4)}.field textarea{flex:1;min-width:0;min-height:84px;border:0;outline:0;resize:vertical;color:#fff;background:transparent;padding:14px 12px 14px 0;font-size:15px;line-height:1.5;caret-color:#fff}.field textarea::placeholder{color:rgba(255,255,255,.4)}.activate-panel .field{height:auto;min-height:96px;align-items:flex-start;padding:4px 0}.activate-panel .field-icon{height:auto;padding-top:14px}.password-eye{border:0;background:transparent;color:rgba(255,255,255,.5);padding:12px}.remember{display:flex;align-items:center;gap:8px;font-size:14px;color:rgba(255,255,255,.7);margin:2px 0 0}.remember input{accent-color:#8b5cf6}
.primary-action,.primary-small{border:0;color:#fff;font-weight:600;background:linear-gradient(135deg,#8b5cf6,#a855f7)}.primary-action{height:52px;border-radius:12px;font-size:16px;letter-spacing:2px;position:relative;overflow:hidden}.primary-action:before{content:"";position:absolute;inset:0;left:-100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent);transition:left .5s}.primary-action:hover:before{left:100%}.primary-action:hover,.primary-small:hover{transform:translateY(-2px);box-shadow:0 10px 30px rgba(102,126,234,.5)}.auth-switch{text-align:center;margin:25px 0 0;color:rgba(255,255,255,.6);font-size:14px}.auth-switch a{color:#8b5cf6;font-weight:500;margin-left:5px}.auth-note{margin-top:18px;padding:12px;border-radius:9px;text-align:center;background:rgba(102,126,227,.18);color:rgba(242,241,255,.72);font-size:12px}.auth-shell footer{position:absolute;bottom:20px;z-index:10;color:rgba(255,255,255,.3);font-size:12px}
.key-emblem{width:86px;height:86px;margin:0 auto 18px;display:grid;place-items:center;border-radius:50%;border:7px solid rgba(76,108,203,.38);background:#755ad5;font-size:43px}.account-tile{display:flex;gap:14px;align-items:center;padding:14px;margin:26px 0 20px;border:1px solid rgba(255,255,255,.13);border-radius:11px;background:rgba(255,255,255,.08)}.account-tile>span{width:44px;height:44px;display:grid;place-items:center;border-radius:50%;background:#755adb}.account-tile small,.account-tile strong{display:block}.account-tile small{color:rgba(255,255,255,.55);font-size:12px}.activation-help{margin-top:24px;padding:17px;border:1px solid rgba(239,174,45,.45);border-radius:11px;background:rgba(140,119,90,.35);font-size:12px;color:rgba(255,255,255,.74)}.activation-help strong{display:block;color:#ffd21d;margin-bottom:9px}.activation-help p{margin:7px 0}.activation-help p:last-child{color:#ff8b93}.text-button{display:block;margin:24px auto 0;border:0;background:transparent;color:rgba(255,255,255,.55)}.toast{position:fixed;z-index:50;top:22px;left:50%;transform:translateX(-50%);max-width:min(90vw,520px);padding:12px 20px;border-radius:10px;background:#fff;color:#34425a;box-shadow:0 14px 40px rgba(0,0,0,.22)}.toast.ok{color:#2e9b3c}.toast.error{color:#d94656}
.app-shell{min-height:100vh;background:var(--bg)}.topbar{height:72px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 34px;border-bottom:1px solid #edf0f5;box-shadow:0 4px 15px rgba(16,33,58,.05);position:sticky;top:0;z-index:20}.top-brand{display:flex;align-items:center;gap:18px;font-size:20px}.mini-logo{width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(135deg,#5de2db,#ac42f1);color:#fff;font-size:14px}.top-actions,.user-menu{display:flex;align-items:center;gap:14px}.round-button{width:38px;height:38px;border:1px solid #e0e5ed;border-radius:50%;background:#fff;color:#64748b;font-size:20px}.user-badge{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:var(--purple);color:#fff}.user-badge.user-avatar{padding:0;object-fit:cover;background:#eef0f4}.user-menu{font-size:14px}.workspace{display:grid;grid-template-columns:260px minmax(0,1fr);gap:24px;padding:24px}.sidebar{height:calc(100vh - 120px);max-height:calc(100vh - 120px);position:sticky;top:96px;background:#fff;border-radius:24px;padding:20px 16px;box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden;min-height:0}.sidebar nav{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;display:grid;gap:7px;align-content:start;padding-right:4px;-webkit-overflow-scrolling:touch}.nav-item{width:100%;height:51px;border:0;border-radius:12px;background:transparent;color:#64738c;text-align:left;padding:0 22px;display:flex;align-items:center;gap:18px;font-weight:600}.nav-item span{width:20px;text-align:center}.nav-item:hover{background:#f6f1ff;color:var(--purple)}.nav-item.active{color:#fff;background:linear-gradient(90deg,#8652f6,#b348ee);box-shadow:0 10px 22px rgba(147,72,238,.27)}.sidebar-logout{flex:0 0 auto;margin-top:8px;border:0;background:transparent;color:#94a0b4;padding:12px}.content{min-width:0;padding:4px 0 40px}.page-panel{display:none}.page-panel.active{display:block}.page-heading{min-height:58px;display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:22px}.page-heading h1{font-size:25px;margin:0}.page-heading p{margin:7px 0 0;color:var(--muted)}.eyebrow{font-size:10px;color:var(--purple);font-weight:800;letter-spacing:2px}.soft-button,.primary-small{border-radius:9px;padding:10px 16px}.soft-button{border:1px solid var(--line);background:#fff;color:#65728a}.primary-small{border:0}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}.stat-card{height:98px;padding:20px;display:flex;align-items:center;gap:16px;border:1px solid #e8ebf1;border-radius:18px;background:#fff;box-shadow:0 5px 12px rgba(19,36,67,.04)}.stat-icon,.quota-icon{display:grid;place-items:center;color:#fff}.stat-icon{width:49px;height:49px;border-radius:11px;font-size:22px}.stat-card strong,.stat-card small{display:block}.stat-card strong{font-size:27px;line-height:1.05}.stat-card small{margin-top:5px;color:#53617a}.purple{background:#9250f7}.pink{background:#ef3e77}.cyan{background:#0eafd7}.green{background:#20c68a}.amber{background:#ffb511}.red{background:#ff5b61}.danger{color:#ff474f}.dashboard-card{background:#fff;border:1px solid #e8ebf1;border-radius:18px;box-shadow:0 5px 12px rgba(19,36,67,.04)}.quota-card{padding:25px;margin-bottom:24px}.dashboard-card h2{font-size:15px;margin:0}.quota-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:20px}.quota-grid>div{min-height:71px;display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:13px;background:#f7f8fb}.quota-icon{width:39px;height:39px;border-radius:10px}.quota-grid p,.quota-grid small,.quota-grid strong{display:block;margin:0}.quota-grid small{font-size:12px;color:#6d7890}.quota-grid strong{font-size:14px;margin-top:3px}.chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.chart-card{padding:21px}.card-title{display:flex;justify-content:space-between;align-items:center}.card-title button{border:0;border-radius:8px;background:#8d50f4;color:#fff;padding:6px 12px;font-size:12px}.empty-chart{height:255px;margin-top:22px;display:grid;grid-template-columns:30px 1fr;grid-template-rows:repeat(3,1fr);align-items:start;color:#8995a9;font-size:12px}.empty-chart i{border-top:1px solid #e7eaf0}.help-bubble{position:fixed;right:18px;top:50%;bottom:auto;transform:translateY(-50%);width:60px;height:60px;border:9px solid rgba(169,78,241,.42);border-radius:50%;background:linear-gradient(135deg,#8158f5,#d947cf);color:#fff;font-size:24px;box-shadow:0 10px 30px rgba(167,58,223,.36);z-index:40;cursor:pointer}
.table-card{padding:20px}.table-toolbar{display:flex;justify-content:space-between;gap:12px;margin-bottom:18px}.table-toolbar input{max-width:430px;padding:11px 14px;border:1px solid var(--line);border-radius:9px;outline:0}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}th{color:#7b8799;font-weight:600;background:#f8f9fb}th,td{padding:14px 12px;border-bottom:1px solid #edf0f4}td a{color:#7654df}.status-pill{display:inline-block;padding:4px 9px;border-radius:20px;background:#e8fbf3;color:#18a875}.row-actions{display:flex;gap:7px}.row-actions button{border:0;background:#f2eefc;color:#7654df;border-radius:7px;padding:6px 9px}.empty-state{text-align:center;padding:50px;color:#98a2b5}.feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.feature-card{padding:22px;background:#fff;border:1px solid var(--line);border-radius:16px}.feature-card small{color:var(--muted)}
.modal{width:min(520px,calc(100vw - 30px));border:0;border-radius:18px;padding:0;box-shadow:0 28px 90px rgba(16,25,50,.24)}.modal::backdrop{background:rgba(17,25,46,.46);backdrop-filter:blur(3px)}.modal form{padding:26px}.modal-head{display:flex;justify-content:space-between;align-items:start}.modal-head h2{margin:3px 0 18px}.modal-head button{border:0;background:transparent;font-size:25px;color:#8490a3}.modal label{display:grid;gap:7px;margin-top:15px;color:#5f6d84;font-size:13px}.modal input,.modal textarea{border:1px solid #dfe4ec;border-radius:9px;padding:11px;outline:0}.modal input:focus,.modal textarea:focus{border-color:var(--purple);box-shadow:0 0 0 3px rgba(146,80,247,.1)}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.form-message{font-size:12px;color:#df4457}.app-toast{top:auto;bottom:24px}
body.dark{--ink:#e6ecf7;--muted:#9aa7bc;--line:#2d3850;--bg:#11182a;--card:#1b2438}body.dark .topbar,body.dark .sidebar,body.dark .stat-card,body.dark .dashboard-card,body.dark .feature-card{background:#1b2438;border-color:#2c3850}body.dark .quota-grid>div,body.dark th,body.dark .table-toolbar input{background:#141d30;color:#e6ecf7;border-color:#303c53}body.dark .soft-button{background:#1b2438;color:#d3dbea;border-color:#354158}
@media(max-width:1100px){.workspace{grid-template-columns:220px 1fr}.stat-grid,.quota-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.topbar{padding:0 18px}.user-menu strong{display:none}.workspace{display:block;padding:12px}.sidebar{height:auto;position:static;border-radius:16px;margin-bottom:16px;padding:10px;overflow:auto}.sidebar nav{display:flex}.nav-item{min-width:max-content;padding:0 15px}.sidebar-logout{display:none}.stat-grid,.quota-grid,.chart-grid,.feature-grid{grid-template-columns:1fr}.content{padding-bottom:80px}.page-heading{align-items:flex-start}.glass-card{padding:30px 25px;border-radius:20px}.glass-card[data-view="login"]{min-height:0}.orbit-one,.orbit-two,.orbit-three{display:none}}
@media(prefers-reduced-motion:reduce){.particle,.auth-shell:before,.auth-shell:after,.orbit-one,.orbit-two,.orbit-three,.glass-card:before{animation:none!important}}
.nav-icon{width:19px;height:19px;flex:0 0 19px;display:block;color:currentColor;overflow:visible}
.icon-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px}.button-icon{width:15px;height:15px}.icon-button.loading .button-icon{animation:dashboard-spin .8s linear infinite}@keyframes dashboard-spin{to{transform:rotate(360deg)}}
.stat-icon{flex:0 0 49px;font-size:0}.stat-icon svg{width:24px;height:24px}.quota-icon{flex:0 0 39px;font-size:0}.quota-icon svg{width:20px;height:20px}
.chart-card{min-height:350px}.card-title h2{display:flex;align-items:center;gap:6px}.title-icon{width:14px;height:14px;color:#20304a}.export-button{display:inline-flex;align-items:center;gap:4px}.export-button svg{width:13px;height:13px}.export-button:hover{background:#7b40e8;box-shadow:0 6px 14px rgba(141,80,244,.25)}
body.dark .title-icon{color:#e6ecf7}
.channel-pill{display:inline-flex;margin-top:5px;padding:2px 7px;border-radius:999px;font-size:10px;font-weight:700}.channel-pill.local{background:#e9f8ff;color:#1683a7}.channel-pill.fallback{background:#fff4df;color:#c27800}.row-actions button.danger,.soft-button.danger{background:#fff0f1;color:#d64b59}
.provider-notice{min-height:82px;margin-bottom:20px;padding:18px 20px;display:flex;align-items:center;gap:14px}.provider-notice>svg{width:38px;height:38px;padding:9px;border-radius:10px;background:#f1eaff;color:#8d50f4}.provider-notice>div{flex:1}.provider-notice strong{display:block;font-size:14px}.provider-notice p{margin:5px 0 0;color:#7a8699;font-size:12px}.round-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.round-card{min-height:220px;padding:20px;display:flex;gap:20px}.round-preview{width:180px;min-width:180px;display:grid;place-items:center;border-radius:14px;background:#f7f8fb;overflow:hidden}.round-preview img{display:block;width:164px;height:164px;object-fit:contain}.round-info{min-width:0;display:flex;flex:1;flex-direction:column;justify-content:center}.round-info h3{margin:7px 0 8px}.round-info p{margin:0;color:#637189;font-size:12px;line-height:1.7;word-break:break-all}.round-info small{margin-top:6px;color:#9aa4b5}.round-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.round-actions .primary-small,.round-actions .soft-button{padding:8px 11px;font-size:12px}.modal-note{margin-top:16px;padding:11px 13px;border-radius:9px;background:#fff7e6;color:#9b6a14;font-size:12px;line-height:1.6}body.dark .provider-notice>svg,body.dark .round-preview{background:#141d30}body.dark .channel-pill.local{background:#123044}body.dark .channel-pill.fallback{background:#46351a}
@media(max-width:1100px){.round-grid{grid-template-columns:1fr}}@media(max-width:600px){.round-card{display:block}.round-preview{width:100%;margin-bottom:16px}.provider-notice{align-items:flex-start}.provider-notice .status-pill{display:none}}

/* External links and QR management: aligned with the reference portal. */
.quota-alert{min-height:74px;margin-bottom:18px;padding:15px 20px;display:flex;align-items:center;gap:14px;border:1px solid #d9e9ff;border-radius:12px;background:#f2f8ff;color:#51617b}.quota-alert>span:first-child{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#409eff;color:#fff;font-weight:800}.quota-alert>div{flex:1}.quota-alert strong{display:block;color:#34435c;font-size:14px}.quota-alert p{margin:4px 0 0;font-size:12px}.quota-alert b{color:#7c4ce4}.list-shell{padding:20px}.filter-bar{display:flex;align-items:center;gap:12px;margin-bottom:20px}.search-box{height:40px;max-width:330px;flex:1;display:flex;align-items:center;gap:8px;padding:0 12px;border:1px solid #dfe4ec;border-radius:8px;background:#fff}.search-box input{width:100%;border:0;outline:0}.filter-bar select,.modal select{height:40px;border:1px solid #dfe4ec;border-radius:8px;background:#fff;color:#56647a;padding:0 34px 0 12px}.management-list{display:grid;gap:14px}.link-manage-card{display:grid;grid-template-columns:minmax(255px,1.05fr) minmax(270px,1fr) auto;gap:18px;align-items:center;padding:18px;border:1px solid #e8ebf1;border-radius:13px;transition:.2s;background:#fff}.link-manage-card:hover{border-color:#cdb9fa;box-shadow:0 8px 22px rgba(81,54,135,.08)}.link-card-preview{display:flex;align-items:center;gap:13px;min-width:0}.link-card-preview>div{min-width:0;flex:1}.link-card-preview strong,.link-card-preview small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.link-card-preview strong{font-size:15px;color:#2b3950}.link-card-preview small{margin-top:5px;color:#8b96a9}.link-meta{min-width:0}.link-meta p{margin:5px 0;display:flex;align-items:center;gap:7px;color:#68768d;font-size:12px}.link-meta p span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.link-meta a{color:#7250db}.manage-tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}.tag{padding:3px 8px;border-radius:999px;font-size:11px}.tag.type{background:#f0eaff;color:#7a4de2}.tag.ok{background:#e8f8f1;color:#18a875}.tag.off{background:#f2f3f5;color:#8a94a6}.tag.warn{background:#fff2dc;color:#c57a0c}.link-actions{display:flex;justify-content:flex-end;align-items:center;gap:6px;flex-wrap:nowrap;white-space:nowrap}.link-actions button{flex:0 0 auto}.link-actions button{border:0;border-radius:7px;padding:7px 9px;background:#f3effd;color:#7654df;font-size:12px}.link-actions button.danger{background:#fff0f1;color:#d64b59}.pagination{display:flex;justify-content:flex-end;align-items:center;gap:9px;margin-top:18px;color:#7b8799;font-size:12px}.pagination .soft-button{padding:6px 11px}.empty-art{width:58px;height:58px;margin:0 auto 10px;display:grid;place-items:center;border-radius:18px;background:#f1eaff;color:#8d50f4;font-size:26px}.empty-state h3{margin:8px 0}.empty-state p{margin:0;font-size:12px}
.wide-modal{width:min(900px,calc(100vw - 30px))}.wide-modal form{padding:25px 28px}.form-preview-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(250px,.75fr);gap:24px}.form-fields>label,.form-row>label{display:grid;gap:7px;margin-top:14px;color:#5f6d84;font-size:13px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-fields small{color:#9aa4b5}.icon-field{display:grid;grid-template-columns:52px 1fr auto;gap:9px;align-items:center}.icon-field img{width:52px;height:52px;border:1px solid #e4e7ed;border-radius:8px;object-fit:cover}.card-live-preview,.round-live-preview{margin-top:14px;padding:16px;border-radius:12px;background:#f6f7fa;color:#7a8699;font-size:12px}.douyin-card{margin-top:14px;padding:16px;display:flex;align-items:center;gap:13px;border-radius:7px;background:#fff;box-shadow:0 3px 13px rgba(24,35,55,.09)}.douyin-card img{width:58px;height:58px;border-radius:8px;object-fit:cover}.douyin-card strong,.douyin-card p{display:block;margin:0;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#303b4d}.douyin-card i{display:block;width:18px;margin:8px 0;border-top:1px solid #dfe3e9}.round-placeholder{margin-top:14px;min-height:245px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:10px;background:#fff}.round-placeholder img{width:86px;height:86px;border-radius:18px;object-fit:cover;box-shadow:0 7px 20px rgba(48,57,78,.14)}.round-placeholder b{margin-top:17px;color:#334158}.round-placeholder small{margin-top:6px}.icon-modal{width:min(760px,calc(100vw - 30px));padding:24px}.icon-modal .modal-head p,.links-modal .modal-head p{margin:5px 0 0;color:#8994a6;font-size:12px}.icon-template-grid{max-height:460px;overflow:auto;display:grid;grid-template-columns:repeat(8,1fr);gap:12px;margin-top:20px;padding:3px}.icon-template{aspect-ratio:1;border:2px solid transparent;border-radius:10px;padding:0;background:#f4f5f7;overflow:hidden}.icon-template:hover,.icon-template.selected{border-color:#8951ed}.icon-template img{width:100%;height:100%;display:block;object-fit:cover}.links-modal{width:min(720px,calc(100vw - 30px));padding:24px}.channel-tabs{display:flex;gap:8px;margin:20px 0 14px;border-bottom:1px solid #eceef2}.channel-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;padding:10px 14px;color:#7b8799}.channel-tabs button.active{border-color:#8b50ed;color:#7849de}.generated-link-list{display:grid;gap:10px}.generated-link{display:grid;grid-template-columns:100px 1fr auto;align-items:center;gap:10px;padding:12px;border-radius:9px;background:#f7f8fb}.generated-link input{min-width:0;border:1px solid #e0e4eb;border-radius:7px;padding:9px;background:#fff;color:#536079}.generated-link button{border:0;border-radius:7px;padding:8px 11px;background:#8951ed;color:#fff}.guide-box{margin-top:18px;padding:13px 15px;border-radius:9px;background:#fff7e7;color:#8b641d;font-size:12px}.guide-box p{margin:6px 0 0;line-height:1.7}.preview-modal{width:min(520px,calc(100vw - 30px));padding:24px}.preview-center{text-align:center;padding:20px}.preview-center img{width:260px;height:260px;object-fit:contain}.preview-center h3{margin:14px 0 7px}.preview-center p{margin:0;color:#7d899b;word-break:break-all;font-size:12px}
.round-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.round-card{display:block;min-height:0;padding:16px}.round-preview{width:100%;height:210px}.round-preview img{width:190px;height:190px}.round-info{display:block;padding-top:12px}.round-info h3{margin:6px 0}.round-info .round-summary{display:flex;align-items:center;justify-content:space-between;gap:8px}.round-info .round-summary small{margin:0}.round-actions{margin-top:13px}.round-actions button,.round-actions a{flex:1;text-align:center}.round-channel{display:flex;align-items:center;gap:7px;margin-top:7px;color:#8290a5;font-size:11px}.round-channel img{width:20px;height:20px;border-radius:4px}
body.dark .quota-alert{background:#17273c;border-color:#29415e;color:#aeb9c9}body.dark .quota-alert strong{color:#e6ecf7}body.dark .link-manage-card,body.dark .search-box,body.dark .modal select,body.dark .douyin-card,body.dark .round-placeholder,body.dark .generated-link input{background:#1b2438;color:#dce4f1;border-color:#344159}body.dark .card-live-preview,body.dark .round-live-preview,body.dark .generated-link{background:#141d30}
@media(max-width:1200px){.round-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.link-manage-card{grid-template-columns:1fr 1fr}.link-actions{grid-column:1/-1;justify-content:flex-start}}@media(max-width:760px){.form-preview-layout,.form-row{grid-template-columns:1fr}.card-live-preview,.round-live-preview{display:none}.icon-template-grid{grid-template-columns:repeat(5,1fr)}.link-manage-card{grid-template-columns:1fr}.link-actions{grid-column:auto}.filter-bar{flex-wrap:wrap}.round-grid{grid-template-columns:1fr}.generated-link{grid-template-columns:1fr}.icon-field{grid-template-columns:52px 1fr}.icon-field button{grid-column:1/-1}}

/* Card, rule, account, chat and redemption modules. */
.heading-actions{display:flex;gap:10px}.business-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.business-card{position:relative;padding:18px;border:1px solid #e6e9ef;border-radius:14px;background:#fff;transition:.2s}.business-card:hover{transform:translateY(-2px);border-color:#cab5f8;box-shadow:0 10px 25px rgba(63,43,101,.09)}.business-card-top{display:flex;align-items:center;gap:13px}.business-card-top img{width:64px;height:64px;border-radius:10px;object-fit:cover;background:#f2f3f6}.business-card-top h3{margin:0 0 6px;font-size:15px}.business-card-top p{margin:0;color:#8792a4;font-size:12px;line-height:1.6}.business-card-link{display:block;margin:14px 0 0;padding:9px 11px;border-radius:8px;background:#f7f8fb;color:#7654df;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.business-card-footer{display:flex;align-items:center;justify-content:space-between;margin-top:13px}.business-card-actions{display:flex;gap:6px}.business-card-actions button{border:0;border-radius:7px;padding:6px 9px;background:#f2eefc;color:#7654df}.business-card-actions button.danger{background:#fff0f1;color:#d64b59}.managed-card-preview{min-height:110px}.rule-list{display:grid;gap:14px}.rule-card{padding:18px;border:1px solid #e7eaf0;border-radius:13px;background:#fff}.rule-card-head,.rule-card-foot{display:flex;align-items:center;justify-content:space-between;gap:15px}.rule-title{display:flex;align-items:center;gap:11px}.rule-type-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:10px;background:linear-gradient(135deg,#8a55ee,#b347e9);color:#fff;font-size:19px}.rule-title h3{margin:0 0 5px;font-size:15px}.rule-title small{color:#8c97a9}.rule-details{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0;padding:13px;border-radius:9px;background:#f7f8fb}.rule-details span{padding:5px 9px;border-radius:7px;background:#fff;color:#647188;font-size:11px}.rule-replies{color:#69768b;font-size:12px;line-height:1.7}.rule-card-foot{margin-top:13px;padding-top:12px;border-top:1px solid #edf0f4}.rule-actions{display:flex;gap:6px}.rule-actions button{border:0;border-radius:7px;padding:6px 10px;background:#f2eefc;color:#7654df}.rule-actions button.danger{background:#fff0f1;color:#d64b59}.rule-modal{width:min(920px,calc(100vw - 30px));max-height:92vh}.rule-modal form{max-height:92vh;overflow:auto;padding:25px 28px}.rule-form-section{margin-top:17px;padding:17px;border:1px solid #e8ebf1;border-radius:12px}.rule-form-section h3{margin:0 0 13px;color:#40506a;font-size:14px}.rule-form-section>label,.rule-reply-panel>label,.account-form-grid label,.preview-modal>label{display:grid;gap:7px;margin-top:12px;color:#5f6d84;font-size:13px}.rule-type-tabs,.rule-reply-tabs{display:flex;flex-wrap:wrap;gap:8px}.rule-type-tabs button,.rule-reply-tabs button,.composer-tools button,.conversation-tabs button{border:1px solid #e1e5ec;border-radius:8px;padding:8px 12px;background:#fff;color:#6c788d}.rule-type-tabs button.active,.rule-reply-tabs button.active,.composer-tools button.active,.conversation-tabs button.active{border-color:#8d51ef;background:#f2ebff;color:#7549d6}.rule-reply-panel{margin-top:13px;padding:13px;border-radius:9px;background:#f8f9fb}.card-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.advanced-rule-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:12px}.advanced-rule-grid label,.switch-line{display:flex!important;align-items:center;gap:6px;padding:10px;border-radius:8px;background:#f7f8fb;color:#667388!important}.advanced-rule-grid input[type=number]{width:70px}.full-button{width:100%;margin-top:12px}.test-result{margin-top:14px;padding:14px;border-radius:9px;background:#f7f8fb;color:#68768b;line-height:1.7}.test-result.hit{background:#eaf9f2;color:#17835f}.account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.account-card{padding:18px;border:1px solid #e6e9ef;border-radius:15px;background:#fff}.account-card-head{display:flex;align-items:center;gap:13px}.account-avatar{width:58px;height:58px;border-radius:50%;object-fit:cover;background:#f1eaff}.account-card-head h3{margin:0 0 5px}.account-card-head small{color:#8b96a8}.account-status{margin-left:auto}.account-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:14px 0}.account-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 12px}.account-meta-grid div{padding:8px 10px;border-radius:8px;background:#f7f8fb;min-width:0}.account-meta-grid span{display:block;color:#8a95a7;font-size:10px;margin-bottom:3px}.account-meta-grid b{display:block;color:#40506a;font-size:12px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.field-hint{display:block;margin-top:4px;color:#8a95a7;font-size:11px;line-height:1.5}
.dy-profile-card{padding:0;overflow:hidden}.dy-profile-body{padding:18px}.dy-profile-top{display:flex;align-items:center;gap:14px;margin-top:0}.dy-avatar{width:72px;height:72px;flex:0 0 72px;border-radius:50%;border:2px solid #edf0f5;object-fit:cover;box-shadow:0 2px 10px rgba(20,24,40,.08);background:#f3f4f7}.dy-profile-id{min-width:0;flex:1}.dy-profile-id h3{margin:0 0 6px;font-size:18px;line-height:1.25;color:#161823}.dy-id-line,.dy-remark-line{margin:0;color:#8b96a8;font-size:12px;line-height:1.5}.dy-remark-line{margin-top:3px}.dy-profile-top .account-status{margin:0 0 0 auto;flex:0 0 auto;max-width:42%;text-align:center;white-space:normal;line-height:1.35}.dy-metrics{margin:16px 0 12px;padding:12px 8px;border-radius:12px;background:#f7f8fb}.dy-metrics div{background:transparent;padding:4px 0}.dy-metrics strong{font-size:18px;font-weight:700;color:#161823}.dy-profile-foot{display:flex;justify-content:space-between;gap:10px;color:#748197;font-size:12px;padding-bottom:2px}
body.dark .account-meta-grid div{background:#141d30}body.dark .account-meta-grid b{color:#dce4f1}
.account-metrics div{padding:10px;border-radius:8px;background:#f7f8fb;text-align:center}.account-metrics strong,.account-metrics small{display:block}.account-metrics small{margin-top:4px;color:#8a95a7;font-size:10px}.account-node{display:flex;justify-content:space-between;color:#748197;font-size:12px}.account-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px;padding-top:13px;border-top:1px solid #edf0f4}.account-actions button{border:0;border-radius:7px;padding:7px 10px;background:#f2eefc;color:#7654df}.account-actions button.danger{background:#fff0f1;color:#d64b59}.account-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.account-security-note{margin-top:18px;padding:14px;border-radius:9px;background:#f2f8ff;color:#5b6e8d;font-size:12px;line-height:1.7}.account-node-hint{display:block;margin:8px 0 12px;padding:10px 12px;border-radius:10px;background:#f4f6fa;color:#4a5568;font-size:15px;font-weight:600;line-height:1.45;letter-spacing:.02em}.account-node-hint .node-status-word{font-size:17px;font-weight:800}.account-node-hint .node-status-word.is-ok,.account-node-hint.is-ok .node-status-word{color:#1f9d55}.account-node-hint .node-status-word.is-busy,.account-node-hint.is-busy .node-status-word{color:#d97706}.account-node-hint .node-status-word.is-full,.account-node-hint.is-full .node-status-word{color:#e03131}.account-node-hint .node-status-word.is-offline,.account-node-hint.is-offline .node-status-word{color:#868e96}.account-node-hint.is-ok{background:#eafaf0;border:1px solid #b6e6c8}.account-node-hint.is-busy{background:#fff8e8;border:1px solid #f5d78e}.account-node-hint.is-full{background:#fff1f0;border:1px solid #f5b5b0}.account-node-hint.is-offline{background:#f1f3f5;border:1px solid #dee2e6}
.chat-panel .page-heading{margin-bottom:14px}.chat-heading{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.chat-heading-title{flex:0 0 auto}.chat-heading .heading-actions{margin-left:auto}.imapi-status-inline{flex:1 1 280px;min-width:220px;max-width:min(560px,100%);padding:8px 12px;border-radius:10px;border:1px solid #f0c2c2;background:#fff5f5;color:#b42318;font-size:12px;line-height:1.45}.imapi-status-inline.ok{border-color:#b7e4c7;background:#f1fff6;color:#1b7a3d}.imapi-status-inline strong{margin-right:6px}.imapi-status-inline span{opacity:.95}.imapi-status-inline a{color:inherit;text-decoration:underline}.chat-shell{height:calc(100dvh - 220px);min-height:0;display:grid;grid-template-columns:minmax(238px,268px) minmax(300px,340px) minmax(0,1fr);gap:0;overflow:hidden}.chat-accounts,.chat-conversations{border-right:1px solid #e9ecf1;overflow:hidden;background:#fbfcfe;display:flex;flex-direction:column;min-height:0}.chat-conversations-head{flex:0 0 auto;position:sticky;top:0;z-index:5;background:#fbfcfe;box-shadow:0 1px 0 #e9ecf1}.conversation-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.chat-accounts>#chatAccountList{flex:1;min-height:0;overflow:auto}.chat-column-title{height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid #e9ecf1}.chat-column-title span{min-width:22px;padding:3px 6px;border-radius:20px;background:#e8f1ff;color:#2f7cf6;text-align:center;font-size:11px}.chat-account-item,.conversation-item{display:flex;align-items:flex-start;gap:10px;margin:6px 8px;padding:10px 12px;border-radius:10px;cursor:pointer;position:relative}.chat-account-item:hover,.chat-account-item.active,.conversation-item:hover,.conversation-item.active{background:#eef5ff}.chat-account-item img,.conversation-item img,.chat-peer img{width:40px;height:40px;border-radius:50%;object-fit:cover;background:#eef0f4}.chat-account-item .chat-account-meta,.conversation-item>div{min-width:0;flex:1}.chat-account-item strong{display:-webkit-box;max-width:100%;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;white-space:normal;word-break:break-all;line-height:1.35}.conversation-item strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-account-item small,.conversation-item small{display:block;margin-top:2px;color:#8a96a8;font-size:11px;line-height:1.35;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all}.chat-account-item small.chat-account-id{font-variant-numeric:tabular-nums}.chat-account-item small.chat-account-status{color:#7a8699;font-size:10px}.online-dot{width:8px;height:8px;margin-left:auto;border-radius:50%;background:#20c68a}.offline-dot{background:#aeb5c1}.account-unread-badge,.nav-unread-badge{margin-left:auto;min-width:18px;height:18px;padding:0 5px;border-radius:10px;background:#ee4c67;color:#fff;text-align:center;font-size:10px;line-height:18px;font-weight:700}.nav-item{position:relative}.nav-unread-badge{position:absolute;right:12px;top:50%;transform:translateY(-50%);margin:0}.conversation-item.has-unread{background:#fff7f8}.conversation-sub .conversation-last{vertical-align:baseline}.unread-badge{position:absolute;right:10px;bottom:10px;min-width:18px;height:18px;padding:0 5px;border-radius:10px;background:#ee4c67;color:#fff;text-align:center;font-size:10px;line-height:18px}.conversation-top{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.conversation-top strong{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-time{flex:0 0 auto;color:#9aa4b5;font-size:11px;font-weight:500;line-height:1.2;font-variant-numeric:tabular-nums}.conversation-sub{display:block;margin-top:4px;padding-right:28px;color:#8a94a6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-last{color:#6b778c}.chat-search{height:38px;margin:10px;display:flex;align-items:center;gap:7px;padding:0 10px;border:1px solid #e1e5ec;border-radius:8px;background:#fff}.chat-search input{width:100%;border:0;outline:0}.conversation-tabs{display:flex;gap:5px;padding:0 10px 7px}.conversation-tabs button{flex:1;padding:6px}.conversation-item{position:relative;overflow:visible}.conversation-item>.conversation-meta{min-width:0;flex:1}.chat-main{min-width:0;min-height:0;height:100%;background:#f7f8fb;display:flex;flex-direction:column;overflow:hidden}.chat-empty{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#8b96a8}.chat-empty>div{font-size:55px}.chat-empty h3{margin:12px 0 7px;color:#536178}.chat-empty p{margin:0}.chat-active,#chatActive{flex:1;min-height:0;height:100%;display:grid;grid-template-rows:64px minmax(0,1fr) auto auto;overflow:hidden}.chat-active[hidden],#chatActive[hidden],#chatNoSelection[hidden]{display:none!important}.chat-peer{display:flex;align-items:center;gap:11px;padding:0 18px;border-bottom:1px solid #e4e8ee;background:#fff}.chat-peer-meta{min-width:0;flex:1}.chat-peer-title{display:flex;align-items:center;gap:10px;min-width:0}.chat-peer-title strong{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-peer-follow{margin-left:0;display:flex;align-items:center;gap:8px;flex:0 0 auto}.peer-follow-btn,.peer-relation-label{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;height:24px;min-height:24px;max-height:24px;padding:0 12px;border:0;border-radius:8px;font-size:12px;font-weight:600;line-height:1;white-space:nowrap;vertical-align:middle;background:linear-gradient(135deg,#8d51ef,#a855f7);color:#fff}.peer-follow-btn{cursor:pointer;font-family:inherit}.peer-follow-btn:hover{filter:brightness(1.05)}.peer-follow-btn:disabled{opacity:.6;cursor:wait}.peer-relation-label.mutual{background:linear-gradient(135deg,#8d51ef,#a855f7);color:#fff}.peer-relation-label.following{background:linear-gradient(135deg,#8d51ef,#a855f7);color:#fff;opacity:.92}.peer-relation-label.loading{opacity:.55;min-width:64px;letter-spacing:2px}.chat-peer-title strong{display:block}.chat-peer small{display:block;margin-top:4px;color:#929cad}.message-list{overflow:auto;min-height:0;padding:18px}.message-row{display:flex;margin-bottom:13px;justify-content:flex-start}.message-row.self{justify-content:flex-end}.message-row.peer{justify-content:flex-start}.message-bubble{max-width:72%;padding:10px 13px;border-radius:11px;background:#fff;color:#43516a;box-shadow:0 2px 8px rgba(35,49,72,.06);line-height:1.65;font-size:13px}.message-row.self .message-bubble{background:#2f7cf6;color:#fff}.message-bubble small{display:block;margin-top:5px;opacity:.65;font-size:9px}.composer-tools{display:flex;gap:6px;padding:8px 13px;border-top:1px solid #e2e6ed;background:#fff}.composer-tools button{padding:6px 10px;font-size:11px}.composer{display:grid;grid-template-columns:1fr auto;gap:10px;padding:0 13px 13px;background:#fff}.composer>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.composer textarea,.composer select,.composer input{width:100%;border:1px solid #dfe4ec;border-radius:8px;padding:10px;outline:0}.composer #composerText{display:block}.composer #sendChatBtn{align-self:end;min-width:80px;height:42px}.redemption-layout{display:grid;grid-template-columns:minmax(340px,.9fr) minmax(420px,1.1fr);gap:22px;max-width:1080px;margin:0 auto}.redemption-card,.redemption-side{padding:28px}.redeem-hero{position:relative;overflow:hidden;border:1px solid #ebe4ff;background:linear-gradient(165deg,#ffffff 0%,#faf7ff 55%,#f5f0ff 100%);box-shadow:0 10px 28px rgba(109,70,200,.08)}.redeem-hero:before{content:"";position:absolute;right:-40px;top:-50px;width:160px;height:160px;border-radius:50%;background:radial-gradient(circle,rgba(146,80,247,.18),transparent 70%);pointer-events:none}.redemption-head{display:flex;align-items:center;gap:14px;position:relative}.redeem-icon,.redemption-head>span{width:56px;height:56px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(135deg,#8951ed,#b947e2);font-size:24px;box-shadow:0 8px 18px rgba(137,81,237,.28)}.redemption-head h2,.redemption-side h2{margin:0 0 5px;font-size:17px}.redemption-head p{margin:0;color:#8994a6;font-size:12px;line-height:1.55}.redemption-field{display:grid;gap:8px;margin-top:22px}.redeem-label{color:#5f6d84;font-size:13px;font-weight:600}.redemption-field textarea{width:100%;min-height:110px;resize:vertical;border:1px solid #e2e0f0;border-radius:12px;padding:14px 16px;outline:0;background:#fff;line-height:1.55;box-shadow:inset 0 1px 2px rgba(40,30,80,.04)}.redemption-field textarea:focus{border-color:#9b6ef3;box-shadow:0 0 0 3px rgba(146,80,247,.12)}.redeem-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;margin-top:14px}.redeem-actions .soft-button,.redeem-actions .primary-small{width:100%;min-height:44px;margin:0}.redemption-input{height:auto;min-height:48px;display:flex;align-items:flex-start;gap:9px;margin-top:22px;padding:12px 13px;border:1px solid #dfe4ec;border-radius:12px}.redemption-input textarea{width:100%;min-height:96px;border:0;outline:0;resize:vertical;background:transparent;line-height:1.5}.redemption-input input{width:100%;border:0;outline:0}.redemption-preview{margin-top:14px;padding:14px;border-radius:12px;background:#f2f8ff;border:1px solid #e3eefc}.redemption-preview-grid,.redemption-quota-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.redemption-preview-grid div,.redemption-quota-grid div{padding:14px 10px;border-radius:12px;background:#f7f8fb;text-align:center;border:1px solid #eef1f6}.redemption-preview-grid strong,.redemption-preview-grid small,.redemption-quota-grid strong,.redemption-quota-grid small{display:block}.redemption-quota-grid strong{font-size:20px}.redemption-preview-grid small,.redemption-quota-grid small{margin-top:5px;color:#8793a5;font-size:10px}.redemption-side>h2:not(:first-child){margin-top:22px}.redemption-history{max-height:260px;overflow:auto}.history-row{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #edf0f4;font-size:12px}.history-row small{color:#8c97a8}
body.dark .business-card,body.dark .rule-card,body.dark .account-card,body.dark .chat-peer,body.dark .composer-tools,body.dark .composer,body.dark .chat-search{background:#1b2438;border-color:#344159}body.dark .rule-details,body.dark .rule-reply-panel,body.dark .advanced-rule-grid label,body.dark .account-metrics div,body.dark .chat-main,body.dark .redemption-preview-grid div,body.dark .redemption-quota-grid div{background:#141d30}body.dark .chat-accounts,body.dark .chat-conversations{background:#172033;border-color:#344159}body.dark .chat-conversations-head{background:#172033;box-shadow:0 1px 0 #344159}.modal input[type=checkbox]{width:auto;accent-color:#8d51ef}
@media(max-width:1200px){.business-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.chat-shell{grid-template-columns:minmax(218px,248px) minmax(280px,320px) minmax(0,1fr)}.advanced-rule-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:900px){.chat-shell{height:auto;grid-template-columns:1fr}.chat-accounts,.chat-conversations{max-height:260px;border-right:0;border-bottom:1px solid #e9ecf1}.chat-main{min-height:560px}.account-form-grid,.redemption-layout{grid-template-columns:1fr}}@media(max-width:680px){.business-card-grid,.account-grid,.card-fields,.advanced-rule-grid,.redemption-preview-grid,.redemption-quota-grid{grid-template-columns:1fr}.rule-type-tabs button,.rule-reply-tabs button{flex:1}.chat-shell{min-height:560px}}
.composer-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.composer-send-channel{display:inline-flex;align-items:center;gap:6px;margin-left:4px;padding:4px 8px;border:1px solid #e1e5ec;border-radius:8px;background:#fff;color:#5b6578;font-size:12px}.composer-send-channel span{white-space:nowrap;opacity:.85}.composer-send-channel select{border:0;background:transparent;color:#4b5568;font-size:12px;max-width:140px;outline:none;cursor:pointer}.composer-send-channel-hint{color:#8b93a7;font-size:11px;line-height:1.3;max-width:220px}.composer-tools .composer-emoji-btn{border:1px solid #e1e5ec;border-radius:8px;padding:8px 12px;background:#fff;color:#6c788d;cursor:pointer}.composer-tools .composer-emoji-btn.active,.composer-tools .composer-emoji-btn:hover{border-color:#8d51ef;color:#6b46d9}.emoji-panel{display:grid;grid-template-columns:repeat(8,minmax(0,36px));justify-content:start;gap:4px;max-height:168px;overflow:auto;margin:0 0 8px;padding:8px;border:1px solid #e2e6ed;border-radius:8px;background:#fafbfd;box-shadow:0 8px 24px rgba(20,40,80,.08)}.emoji-panel[hidden]{display:none!important}.emoji-panel button{width:36px;height:36px;border:0;background:transparent;font-size:18px;line-height:1;padding:0;border-radius:6px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.emoji-panel button:hover{background:#eef5ff}.emoji-panel .im-emoticon-pick{width:28px;height:28px;margin:0;vertical-align:middle}.im-emoticon-lg{width:48px;height:48px;vertical-align:middle}.im-sticker-fallback{display:inline-block;font-size:13px;opacity:.85}.conversation-item .kind-tag{display:inline-block;margin-left:4px;padding:1px 5px;border-radius:6px;background:#e8f1ff;color:#2f7cf6;font-size:10px;vertical-align:middle}
.im-card-bubble{display:flex;gap:10px;align-items:flex-start;min-width:180px;max-width:280px;padding:8px;border-radius:10px;background:rgba(255,255,255,.72);border:1px solid rgba(120,90,200,.18)}.message-row.self .im-card-bubble{background:rgba(255,255,255,.2);border-color:rgba(255,255,255,.28)}.im-card-cover{width:56px;height:56px;border-radius:8px;object-fit:cover;background:#eceff5;flex:none}.im-card-meta{min-width:0;flex:1}.im-card-meta strong{display:block;font-size:13px;line-height:1.35;margin:0 0 4px}.im-card-meta p{margin:0 0 6px;font-size:12px;opacity:.85;line-height:1.4}.im-card-meta a{font-size:12px;color:#6b46d9;text-decoration:none}.message-row.self .im-card-meta a{color:#fff}.im-media-bubble img{display:block;max-width:180px;max-height:180px;border-radius:10px;object-fit:cover}.im-emoji-bubble img{max-width:120px;max-height:120px;object-fit:contain;background:transparent}.im-media-caption{margin-top:4px;font-size:12px;opacity:.9}.im-voice-bubble{display:flex;flex-direction:column;gap:6px;min-width:140px;max-width:240px}.im-voice-label{font-size:13px;line-height:1.3}.im-voice-audio{width:100%;max-width:220px;height:32px}.im-emoticon-uni{display:inline-block;font-size:20px;line-height:1;vertical-align:-3px;margin:0 1px}.conversation-last .im-emoticon-uni{font-size:15px}.im-emoticon{width:22px;height:22px;vertical-align:-5px;display:inline-block;object-fit:contain;margin:0 1px}.im-emote-row{display:inline-flex;flex-wrap:wrap;gap:2px;align-items:center}.im-emote-row .im-emoticon{width:28px;height:28px;vertical-align:middle}
.message-row.pending .message-bubble{opacity:.72}
.message-row.pending .message-bubble small{opacity:.9}
.imapi-status-banner{margin:0 0 12px;padding:10px 14px;border-radius:10px;border:1px solid #f0c2c2;background:#fff5f5;color:#b42318;font-size:12px;line-height:1.55}.imapi-status-banner.ok{border-color:#b7e4c7;background:#f1fff6;color:#1b7a3d}.imapi-status-banner strong{display:block;margin-bottom:4px}
.message-load-more{display:flex;justify-content:center;padding:4px 0 14px}.message-load-more button{border:1px solid #dfe4ec;border-radius:999px;padding:6px 14px;background:#fff;color:#5b6b84;font-size:12px;cursor:pointer}.message-load-more button:hover{border-color:#8d51ef;color:#7549d6}.message-load-more button:disabled{opacity:.55;cursor:wait}
.rule-options{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.rule-options .tag{font-size:11px;padding:3px 8px;border-radius:999px;background:#f3eefc;color:#6b46d9}body.dark .rule-options .tag{background:#2a2340;color:#c4b5fd}
.chat-peer-avatar,.chat-peer img#chatPeerAvatar{cursor:pointer;transition:box-shadow .15s ease,transform .15s ease}.chat-peer-avatar.is-link:hover,.chat-peer img#chatPeerAvatar.is-link:hover{box-shadow:0 0 0 2px #8d51ef55;transform:scale(1.04)}.chat-peer small#chatPeerId{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Chat one-screen fit: lock page scroll; columns scroll inside */
body.chat-fit{overflow:hidden}
body.chat-fit .app-shell{height:100vh;height:100dvh;overflow:hidden;display:flex;flex-direction:column}
body.chat-fit .topbar{flex:0 0 auto}
body.chat-fit .workspace{flex:1;min-height:0;padding:16px 24px;overflow:hidden}
body.chat-fit .sidebar{height:100%;max-height:100%;position:static;top:auto;overflow:auto}
body.chat-fit .content{min-height:0;height:100%;padding:0;overflow:hidden;display:flex;flex-direction:column}
body.chat-fit #panel-chat.page-panel.active{flex:1;min-height:0;display:flex!important;flex-direction:column;overflow:hidden}
body.chat-fit .chat-panel .page-heading{flex:0 0 auto;margin-bottom:10px;min-height:0;align-items:center}
body.chat-fit .chat-shell{flex:1;min-height:0;height:auto!important}
@media(max-width:900px){
  body.chat-fit{overflow:auto}
  body.chat-fit .app-shell{height:auto;overflow:visible;display:block}
  body.chat-fit .workspace{overflow:visible;height:auto;padding:12px}
  body.chat-fit .content{height:auto;overflow:visible;display:block;padding:4px 0 40px}
  body.chat-fit #panel-chat.page-panel.active{display:block!important;height:auto;overflow:visible}
  body.chat-fit .chat-shell{height:auto!important;min-height:560px}
}
/* Peer online green-dot overlays avatar corner (no layout width) + read receipt + quick phrases */
.conversation-avatar-wrap,.chat-peer-avatar-wrap,.chat-account-avatar-wrap{position:relative;flex:0 0 40px!important;width:40px;min-width:40px;max-width:40px;height:40px;overflow:visible}
.conversation-item>.conversation-avatar-wrap,.chat-account-item>.chat-account-avatar-wrap,.chat-peer>.chat-peer-avatar-wrap{flex:0 0 40px!important;width:40px;min-width:40px;max-width:40px}
.conversation-avatar-wrap img,.chat-peer-avatar-wrap img,.chat-account-avatar-wrap img{width:40px;height:40px;border-radius:50%;object-fit:cover;display:block}
.peer-online-dot{position:absolute;top:-1px;right:-1px;bottom:auto;left:auto;width:12px;height:12px;margin:0;border-radius:50%;background:#22c55e;border:2px solid #fff;box-shadow:0 0 0 1px rgba(34,197,94,.35);z-index:6;pointer-events:none;display:block}
body.dark .peer-online-dot{border-color:#1b2438}
/* Legacy account trailing dots: hide from flex flow if any remain */
.chat-account-item>.online-dot{display:none}
/* Peer bubbles same blue as self */
.message-row.peer .message-bubble{background:#2f7cf6;color:#fff;box-shadow:0 2px 8px rgba(47,124,246,.22)}
.message-row.peer .message-bubble a{color:#e8f1ff}
.message-row.peer .im-card-bubble{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.28)}
.message-row.peer .im-card-meta a{color:#fff}
.msg-read-tag{display:inline;margin-left:6px;font-style:normal;font-weight:700;color:#fbbf24;opacity:1;letter-spacing:.5px}
.message-row.self .msg-read-tag{color:#ffe08a;text-shadow:0 0 1px rgba(0,0,0,.25)}
.message-row.peer .msg-read-tag{color:#ffe08a}
.message-row.system{justify-content:center;margin:6px 0}
.message-row.system .message-system{display:inline-flex;align-items:center;gap:8px;max-width:90%;padding:4px 12px;border-radius:999px;background:rgba(148,163,184,.14);color:#64748b;font-size:12px;line-height:1.4}
.message-row.system .message-system small{opacity:.75;font-size:11px}
.im-recall-stub{font-style:normal}
.im-card-bubble.is-recalled{opacity:.72}
.im-card-recalled{display:inline-block;margin-top:4px;font-style:normal;font-size:11px;color:#b45309;background:rgba(251,191,36,.18);border-radius:999px;padding:1px 8px}
.message-row.self .im-card-recalled{color:#ffe08a;background:rgba(255,255,255,.18)}
.quick-phrase-cats{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px;max-height:72px;overflow:auto}
.quick-phrase-cat-chip{border:1px solid #e1e5ec;background:#fff;color:#4b5568;border-radius:999px;padding:5px 12px;font-size:12px;line-height:1.2;cursor:pointer}
.quick-phrase-cat-chip:hover{border-color:#c4b5fd;color:#6d28d9}
.quick-phrase-cat-chip.active{border-color:#8b5cf6;background:#f3e8ff;color:#6d28d9;font-weight:600}
.quick-phrase-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 8px}
.quick-phrase-toolbar input{height:34px;border:1px solid #e1e5ec;border-radius:8px;padding:0 10px;background:#fff;flex:1;min-width:140px}
.quick-phrase-actions{display:flex;flex-wrap:wrap;gap:6px}
.quick-phrase-actions .soft-button{padding:6px 10px;font-size:12px}
.quick-phrase-hint{margin:0 0 10px;color:#8a96a8;font-size:12px}
.quick-phrase-list{max-height:min(64vh,560px);overflow:auto;display:grid;gap:6px}
.quick-phrase-item{display:flex;gap:12px;align-items:center;padding:8px 10px;border:1px solid #e8ecf2;border-radius:10px;background:#fafbfd;cursor:pointer}
.quick-phrase-item:hover{border-color:#c4b5fd;background:#f7f3ff}
.quick-phrase-body{min-width:0;flex:1}
.quick-phrase-head{display:flex;align-items:center;gap:8px;margin-bottom:2px;min-width:0}
.quick-phrase-body strong{display:block;min-width:0;flex:1;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.quick-phrase-cat{flex:0 0 auto;padding:1px 6px;border-radius:999px;background:#eef2ff;color:#5b6bdb;font-size:10px;line-height:1.4}
.quick-phrase-body small,.quick-phrase-content{display:block;color:#5f6d84;font-size:12px;line-height:1.5;white-space:pre-wrap;word-break:break-word}
.quick-phrase-item-actions{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:6px;flex:0 0 auto}
.quick-phrase-item-actions .soft-button,.quick-phrase-item-actions .primary-small{padding:5px 10px;font-size:12px;line-height:1.2;white-space:nowrap}
.quick-phrase-pager{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:10px}
.quick-phrase-pager button{padding:6px 12px}
.quick-phrase-cat-list{margin-top:14px;display:grid;gap:8px;max-height:220px;overflow:auto}
.quick-phrase-cat-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border:1px solid #e8ecf2;border-radius:8px}
.conversation-item .conversation-meta{min-width:0;flex:1}
.conversation-item .conversation-meta strong{display:inline;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#quickPhraseDialog.phrase-modal form{padding:18px 20px 16px}
#quickPhraseDialog .modal-head.phrase-modal-head,
#quickPhraseEditDialog .modal-head.phrase-modal-head{
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:36px;
  margin-bottom:6px;
}
#quickPhraseDialog .modal-head.phrase-modal-head h2,
#quickPhraseEditDialog .modal-head.phrase-modal-head h2{
  margin:0;
  width:100%;
  text-align:center;
  font-size:17px;
}
#quickPhraseDialog .modal-head.phrase-modal-head button,
#quickPhraseEditDialog .modal-head.phrase-modal-head button{
  position:absolute;
  right:0;
  top:50%;
  transform:translateY(-50%);
}
body.dark .quick-phrase-item,body.dark .quick-phrase-toolbar input,body.dark .quick-phrase-cat-row,body.dark .quick-phrase-cat-chip{background:#1b2438;border-color:#344159}
body.dark .quick-phrase-cat-chip.active{background:#2a1f45;border-color:#8d51ef;color:#c4b5fd}
body.dark .quick-phrase-item:hover{background:#24304a;border-color:#8d51ef}
body.dark .quick-phrase-cat{background:#2a3348;color:#c4b5fd}

/* dm abnormal (shark self-only watch) */
.account-status.tag.dm-bad,.tag.dm-bad{background:#fee2e2;color:#b91c1c;border:1px solid #fecaca;font-weight:700}
.account-card.dm-abnormal,.dy-profile-card.dm-abnormal{border-color:#f87171;box-shadow:0 0 0 1px rgba(239,68,68,.25)}
.chat-account-item.dm-abnormal{background:#fff5f5;border-left:3px solid #ef4444}
.chat-account-item.link-offline{background:#fff5f5}
.chat-account-item.link-offline:hover{background:#feecec}
.chat-account-item.link-offline.active{background:#fde8e8;box-shadow:inset 3px 0 0 #f87171}
.chat-account-item.link-offline .chat-account-status{color:#b91c1c}
.chat-account-status.bad{color:#b91c1c;font-weight:700}
.peer-dm-bad-dot{position:absolute;top:-1px;right:-1px;width:12px;height:12px;border-radius:50%;background:#ef4444;border:2px solid #fff;box-shadow:0 0 0 1px rgba(239,68,68,.4);z-index:6;display:block}
.imapi-status-inline.dm-abnormal{border-color:#f87171;background:#fef2f2;color:#b91c1c}

/* Account card node congestion badge (same pill style as session status) */
.account-node-line{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
.account-status.tag.node-cong{display:inline-flex;align-items:center;justify-content:center;min-height:22px;padding:2px 10px;border-radius:999px;font-size:12px;font-weight:700;line-height:1.3;white-space:nowrap;border:1px solid transparent}
.account-status.tag.node-cong.is-ok{background:#e8f8ef;color:#1b7a3d;border-color:#b7e4c7}
.account-status.tag.node-cong.is-busy{background:#fff7e6;color:#b45309;border-color:#f5d0a9}
.account-status.tag.node-cong.is-full{background:#fee2e2;color:#b91c1c;border-color:#fecaca}
.account-status.tag.node-cong.is-offline{background:#f3f4f6;color:#6b7280;border-color:#e5e7eb}
.account-node-hint{display:none!important}
.rule-text-link-block{margin-top:14px;padding:14px 16px;border:1px dashed #dfe4ec;border-radius:10px;background:#fafbfe}
.rule-text-link-block .rule-inline-check{display:flex;align-items:center;gap:8px;font-weight:600;color:#4a5870;margin:0}
.rule-text-link-fields{margin-top:12px}
.rule-text-link-fields .field-hint{display:block;margin-top:8px;color:#8792a4;font-size:12px;line-height:1.5}
body.dark .rule-text-link-block{background:#141d30;border-color:#344159}

.link-dialog .wide-modal form{padding:22px 26px}
.jump-section-label{display:block;margin:16px 0 8px;font-weight:600;color:#4a5870;font-size:13px}
.link-type-tabs{display:flex;gap:8px;margin:12px 0 10px}
.link-type-tabs button{border:1px solid #dfe4ec;border-radius:8px;padding:8px 14px;background:#fff;color:#68768d;font-size:12px}
.link-type-tabs button.active{border-color:#8951ed;background:#f6f0ff;color:#7849de;font-weight:600}
.jump-channel-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:8px}
.jump-channel-item{display:grid;gap:4px;justify-items:center;padding:10px 6px;border:1px solid #e8ebf1;border-radius:10px;background:#fff;cursor:pointer;transition:.15s}
.jump-channel-item:hover,.jump-channel-item.active{border-color:#8951ed;background:#faf6ff;box-shadow:0 4px 12px rgba(137,81,237,.12)}
.jump-channel-emoji{font-size:22px;line-height:1}
.jump-channel-name{font-size:11px;color:#3a4658;font-weight:600;text-align:center;line-height:1.2}
.jump-channel-label{font-size:10px;color:#9aa4b5}
.field-hint{margin:6px 0 0;color:#8792a4;font-size:12px;line-height:1.5}
.link-rows-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0 8px;font-size:12px;color:#68768d}
.link-rows-head,.link-row{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr) 68px minmax(108px,118px) 44px;gap:10px;align-items:center;font-size:12px}
.link-rows-head.no-wechat,.link-row.no-wechat,#linkUrlPanel.no-wechat .link-rows-head,#linkUrlPanel.no-wechat .link-row{grid-template-columns:minmax(0,1.8fr) 68px minmax(108px,118px) 44px}
.link-rows-head{margin-bottom:8px;padding:0 2px;color:#8792a4;min-height:20px}
.link-rows-head .col-weight,.link-rows-head .col-enabled,.link-rows-head .col-action{text-align:center}
#jumpUrlWhitelistTip{margin:6px 0 10px;color:#b45309;background:#fff7ed;border:1px solid #fed7aa;border-radius:8px;padding:8px 10px}
.link-rows-body{display:grid;gap:8px;max-height:220px;overflow:auto;padding-right:4px}
.link-row{align-items:center}
.link-row input[type=url],.link-row input[type=text],.link-row input[type=number]{width:100%;height:36px;margin:0;border:1px solid #dfe4ec;border-radius:7px;padding:0 10px;font-size:12px;box-sizing:border-box;align-self:center}
.link-row input[type=number]{-moz-appearance:textfield;appearance:textfield}
.link-row input[type=number]::-webkit-outer-spin-button,.link-row input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.link-row-weight,.link-row-enabled,.link-row-action{display:flex;align-items:center;justify-content:center;height:36px;align-self:center}
.link-row-weight{width:100%}
.link-row-weight input{text-align:center;padding:0 6px}
.link-row-action .link-row-del{min-width:36px;height:36px;padding:0 8px;font-size:12px;line-height:36px;display:inline-flex;align-items:center;justify-content:center}
.row-switch-wrap{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;height:36px;padding:0 8px;border:1px solid #dfe4ec;border-radius:7px;background:#fff;cursor:pointer;user-select:none;box-sizing:border-box;line-height:0}
.row-switch-wrap:hover{border-color:#cab5f8;background:#faf8ff}
.row-switch-text{display:flex;align-items:center;height:100%;font-size:11px;color:#56647a;font-weight:500;white-space:nowrap;line-height:1.2}
.row-switch-wrap .ui-switch{display:block;flex-shrink:0;margin:0;line-height:0}
.ui-switch-sm{width:38px;height:22px}
.ui-switch-sm .ui-switch-slider:before{width:16px;height:16px;left:3px;top:3px}
.ui-switch-sm input:checked+.ui-switch-slider:before{transform:translateX(16px)}
.inline-check{display:flex;align-items:center;gap:8px;font-size:13px;color:#56647a}
.qrcode-upload-row{display:flex;align-items:center;gap:12px;margin:10px 0}
.qrcode-preview-list{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}
.qrcode-preview-item{position:relative;width:96px}
.qrcode-preview-item img{width:96px;height:96px;object-fit:cover;border-radius:8px;border:1px solid #e4e7ed}
.qrcode-preview-item button{position:absolute;top:-6px;right:-6px;width:22px;height:22px;border:0;border-radius:50%;background:#d64b59;color:#fff;font-size:14px;line-height:1;cursor:pointer}
.qrcode-preview-item small{display:block;margin-top:4px;font-size:10px;color:#9aa4b5;word-break:break-all;line-height:1.3;max-height:2.6em;overflow:hidden}
.link-live-preview{padding:16px;border-radius:12px;background:#f6f7fa}
@media(max-width:760px){.jump-channel-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.link-rows-head,.link-row{grid-template-columns:1fr}.link-rows-head{display:none}}
body.dark .jump-channel-item,body.dark .link-type-tabs button{background:#1b2438;border-color:#344159;color:#c5d0e0}
body.dark .jump-channel-item.active,body.dark .link-type-tabs button.active{background:#2a1f45;border-color:#8951ed;color:#e8dcff}
body.dark .link-row input{background:#141d30;border-color:#344159;color:#dce4f1}
body.dark .row-switch-wrap{background:#1b2438;border-color:#344159}
body.dark .row-switch-wrap:hover{border-color:#8951ed;background:#221a38}
body.dark .row-switch-text{color:#c5d0e0}
body.dark .link-live-preview{background:#141d30}

.link-display-row{align-items:start}
.link-display-row>label,.auto-jump-field{margin-top:14px;display:grid;gap:7px;grid-template-rows:auto minmax(40px,auto);align-content:start}
.auto-jump-field .field-label{color:#5f6d84;font-size:13px;line-height:1.3}
.auto-jump-switch-wrap{display:flex;align-items:center;justify-content:space-between;gap:12px;height:40px;padding:0 14px;border:1px solid #dfe4ec;border-radius:8px;background:#fff;cursor:pointer;user-select:none;box-sizing:border-box;line-height:0}
.auto-jump-switch-wrap:hover{border-color:#cab5f8;background:#faf8ff}
.auto-jump-text{display:flex;align-items:center;height:100%;font-size:13px;color:#56647a;font-weight:500;min-width:3em;line-height:1.2}
.auto-jump-switch-wrap .ui-switch{display:block;flex-shrink:0;margin:0;line-height:0}
.ui-switch{position:relative;display:block;flex-shrink:0;width:46px;height:26px;line-height:0;cursor:pointer}
.ui-switch input{position:absolute;opacity:0;width:0;height:0;margin:0}
.ui-switch-slider{position:absolute;inset:0;border-radius:999px;background:#c8d0dc;transition:background .2s,box-shadow .2s}
.ui-switch-slider:before{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(24,35,55,.18);transition:transform .2s}
.ui-switch input:checked+.ui-switch-slider{background:linear-gradient(135deg,#8b5cf6,#a855f7);box-shadow:0 2px 8px rgba(139,92,246,.35)}
.ui-switch input:checked+.ui-switch-slider:before{transform:translateX(20px)}
.ui-switch input:focus-visible+.ui-switch-slider{outline:2px solid #8951ed;outline-offset:2px}
body.dark .auto-jump-switch-wrap{background:#1b2438;border-color:#344159}
body.dark .auto-jump-switch-wrap:hover{border-color:#8951ed;background:#221a38}
body.dark .auto-jump-text{color:#c5d0e0}
body.dark .ui-switch-slider{background:#4a5568}
/* Session list: show dy emoticons inline in preview (same CDN stickers as bubbles) */
.conversation-last .im-emoticon{width:18px;height:18px;vertical-align:-4px;margin:0 1px;object-fit:contain}
.conversation-last .im-emoticon-uni{font-size:15px;line-height:1}
.conversation-self-tag{color:#94a3b8;margin-right:2px}
.account-unread-badge{flex:0 0 auto}

/* Video component / anchor config */
.vc-modal{width:min(1080px,calc(100vw - 24px));max-height:calc(100vh - 28px)}
.vc-modal form{padding:18px 22px 20px;display:flex;flex-direction:column;max-height:calc(100vh - 40px)}
.vc-latency-note{margin:0 0 12px;padding:10px 12px;border-radius:8px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;font-size:12px;line-height:1.5}
.vc-layout{grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);align-items:start;flex:1;min-height:0}
.vc-form-scroll{max-height:min(68vh,640px);overflow:auto;padding-right:6px}
.vc-counter{display:block;text-align:right;color:#9aa4b5;font-size:11px;margin-top:2px}
.vc-feat-row{grid-template-columns:1fr 1fr 1fr}
.vc-list-grid{margin-top:8px}
.vc-phone-preview{margin-top:8px;padding:14px;border-radius:12px;background:#f3f4f8;color:#7a8699;font-size:12px}
.vc-phone{width:min(100%,300px);margin:12px auto 0;border:10px solid #1f2937;border-radius:28px;background:#fff;box-shadow:0 16px 40px rgba(15,23,42,.18);overflow:hidden}
.vc-phone-notch{height:18px;background:#1f2937;position:relative}
.vc-phone-notch:after{content:"";position:absolute;left:50%;top:6px;transform:translateX(-50%);width:72px;height:6px;border-radius:4px;background:#111827}
.vc-phone-body{padding:12px 12px 72px;min-height:460px;position:relative;background:#fff;color:#222}
.vc-base{display:flex;gap:10px;align-items:flex-start}
.vc-base img{width:72px;height:72px;border-radius:10px;object-fit:cover;background:#eee;flex:0 0 auto}
.vc-base strong{display:block;font-size:16px;font-weight:800;line-height:1.3;margin-bottom:6px}
.vc-tags{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}
.vc-tags span{font-size:10px;color:#ff6a00;background:#fff3e8;border-radius:4px;padding:1px 5px}
.vc-base p{margin:0;color:#666;font-size:12px}
.vc-check-list{margin:12px 0 4px;display:grid;gap:6px}
.vc-check-list div{display:flex;gap:6px;align-items:center;font-size:12px;color:#333}
.vc-check-list i{color:#ff8a00;font-style:normal;font-weight:700}
.vc-sec{margin:12px 0 8px;font-size:13px;font-weight:700;color:#222}
.vc-banner{width:100%;height:72px;object-fit:cover;border-radius:8px;background:#f3f4f6;display:block}
.vc-banner-action{display:flex;justify-content:space-between;align-items:center;padding:8px 2px;font-size:12px;color:#444}
.vc-detail-row{display:flex;justify-content:space-between;gap:8px;padding:8px 2px;border-bottom:1px solid #f0f0f0;font-size:12px;color:#444}
.vc-cta{position:absolute;left:0;right:0;bottom:0;padding:10px 12px 14px;background:linear-gradient(180deg,rgba(255,255,255,0),#fff 35%)}
.vc-cta button{width:100%;border:0;border-radius:22px;padding:11px 12px;background:#ff3b30;color:#fff;font-size:14px;font-weight:700;cursor:default}
.field-hint.warn{color:#dc2626}
@media(max-width:900px){.vc-layout{grid-template-columns:1fr}.vc-phone-preview{display:none}.vc-feat-row{grid-template-columns:1fr}}

/* 本机反代：账号编辑大开关 + 卡片出口标识 */
.local-egress-panel{margin:12px 0 14px;padding:14px 16px;border:1px solid #d9c8ff;border-radius:14px;background:linear-gradient(135deg,#f7f2ff 0%,#eef5ff 100%);box-shadow:0 6px 18px rgba(109,70,200,.08)}
.local-egress-panel.is-on{border-color:#7c5cff;background:linear-gradient(135deg,#efe8ff 0%,#e6f7ef 100%)}
.local-egress-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.local-egress-copy{min-width:0;flex:1}
.local-egress-copy strong{display:block;font-size:16px;font-weight:800;color:#3b2a6e;letter-spacing:.02em}
.local-egress-copy p{margin:6px 0 0;color:#5b657c;font-size:12px;line-height:1.55}
.local-egress-switch{display:inline-flex;align-items:center;gap:10px;cursor:pointer;user-select:none;flex:0 0 auto}
.local-egress-switch input{position:absolute;opacity:0;width:0;height:0}
.local-egress-track{position:relative;width:56px;height:32px;border-radius:999px;background:#c5c9d4;box-shadow:inset 0 1px 3px rgba(0,0,0,.12);transition:background .18s ease}
.local-egress-knob{position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.18);transition:transform .18s ease}
.local-egress-switch input:checked+.local-egress-track{background:linear-gradient(135deg,#7c5cff,#4aa36a)}
.local-egress-switch input:checked+.local-egress-track .local-egress-knob{transform:translateX(24px)}
.local-egress-state{min-width:1.5em;font-size:18px;font-weight:800;color:#6b7280}
.local-egress-panel.is-on .local-egress-state{color:#1f9d55}
.local-egress-tip{margin-top:10px;padding:10px 12px;border-radius:10px;background:rgba(255,255,255,.75);color:#3d4a63;font-size:12px;line-height:1.5}
.local-egress-tip b{color:#1f9d55}
.account-egress-line{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;background:#eef1f6;color:#5b6578;font-size:11px;font-weight:600}
.account-egress-line.is-local{background:#e8fff1;color:#157a45;border:1px solid #b6e6c8}
.account-egress-line b{font-weight:800}
@media(max-width:680px){.local-egress-head{flex-direction:column;align-items:stretch}.local-egress-switch{justify-content:space-between}}
.link-cdn-hint{margin:6px 0 0;color:#718096;font-size:12px;line-height:1.45}
.link-cdn-hint.warn{color:#c92a2a;font-weight:600}.link-cdn-hint.ok{color:#2b8a3e;font-weight:600}
.link-actions button[data-replace-link]{border-color:#e67700;color:#b35c00}

/* agent-contact-ui */
.top-actions .soft-button{height:38px;padding:0 14px;border:1px solid #e0e5ed;border-radius:10px;background:#fff;color:#4b5568;font-size:13px;cursor:pointer}.top-actions .soft-button:hover{border-color:#c4b5fd;color:#6d28d9;background:#faf5ff}
.header-agent-contacts{display:flex;align-items:center;gap:10px;flex-wrap:wrap;max-width:min(58vw,640px);justify-content:flex-end}
.header-agent-label{display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;padding:5px 12px 5px 8px;border-radius:999px;background:linear-gradient(135deg,#fff9e8,#ffe8a8 55%,#f6d36a);border:1px solid #e8c25a;box-shadow:0 4px 12px rgba(201,137,18,.18);color:#8a5a00}
.header-agent-label b{font-size:15px;font-weight:800;letter-spacing:.5px;line-height:1;color:#8a5200;text-shadow:0 1px 0 rgba(255,255,255,.55)}
.gold-medal-icon{width:22px;height:22px;flex:0 0 22px;display:block;filter:drop-shadow(0 1px 1px rgba(140,90,0,.25))}
.header-contact-chip{display:inline-flex;align-items:center;gap:7px;max-width:260px;height:40px;padding:0 14px;border:1px solid #efe2b8;border-radius:999px;background:linear-gradient(180deg,#fffdf7,#fff8e8);color:#334155;cursor:pointer;transition:.15s;box-shadow:0 2px 8px rgba(201,137,18,.08)}
.header-contact-chip:hover{border-color:#e0b84a;background:#fff7d9;transform:translateY(-1px)}
.header-contact-chip em{font-style:normal;font-size:13px;color:#b8860b;font-weight:800;flex:0 0 auto}
.header-contact-chip b{font-weight:650;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#1f2937}
@media(max-width:900px){.header-agent-contacts{max-width:100%;order:3;width:100%;justify-content:flex-start;margin-top:4px}.top-actions{flex-wrap:wrap}.header-agent-label b{font-size:14px}}
