
:root{--accent:#6c5ce7;--accent-light:#f0edff;--ink:#25283d;--muted:#9295a6;--line:#ececf3;--bg:#f7f8fc;--green:#24a884;--red:#df5969;--radius:15px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;color:var(--ink);font-size:14px}*{box-sizing:border-box}body{margin:0;background:var(--bg)}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button,a{cursor:pointer}button{border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink);padding:9px 14px;transition:.15s}button:hover{border-color:#c5bdfb;background:#faf9ff}button:disabled{opacity:.55;cursor:wait}a{color:var(--accent);text-decoration:none}input,textarea,select{border:1px solid #e2e3ed;border-radius:8px;padding:11px 12px;background:#fff;color:var(--ink);outline:none;width:100%}input:focus,textarea:focus,select:focus{border-color:var(--accent);box-shadow:0 0 0 3px #6c5ce710}textarea{resize:vertical;line-height:1.65}label{display:block;font-size:13px;color:#62657c;margin-bottom:18px}label input,label textarea,label select{display:block;margin-top:9px}h1,h2,h3,p{margin-top:0}h2{font-size:20px}h3{font-size:15px;font-weight:650}small{font-size:12px}.hidden{display:none!important}.muted{color:var(--muted);line-height:1.7}.error{color:var(--red);font-size:13px}.primary{background:var(--accent);color:white;border-color:var(--accent);box-shadow:0 4px 10px #6c5ce71c}.primary:hover{background:#5e4dd7;color:white;border-color:#5e4dd7}.wide{width:100%}.text-button{border:0;background:transparent;color:var(--muted);padding:6px}.danger{color:var(--red)}.eyebrow{font-size:10px;font-weight:650;letter-spacing:2px;color:#a3a5b5}.brand-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:var(--accent);color:white;font-size:28px;box-shadow:0 5px 16px #6c5ce72b}.shell{display:flex;min-height:100vh}.sidebar{width:88px;background:white;border-right:1px solid var(--line);position:fixed;inset:0 auto 0 0;display:flex;align-items:center;flex-direction:column;z-index:10}.brand{padding:28px 0 30px}.sidebar nav{width:100%;display:flex;flex-direction:column;gap:9px;padding:0 10px}.nav-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;height:65px;color:#9597a9;font-size:11px;border-radius:12px}.nav-item svg{width:22px;height:22px;stroke-width:1.65}.nav-item:hover{color:var(--accent);background:#f8f6ff}.nav-item.active{background:var(--accent-light);color:var(--accent);font-weight:650}.sidebar-bottom{margin-top:auto;padding:22px 0;display:flex;gap:5px;align-items:center;font-size:10px;color:#a2a5b4}.local-dot{width:5px;height:5px;border-radius:50%;background:var(--green)}.workspace{margin-left:88px;flex:1;min-width:0}.topbar{height:98px;display:flex;justify-content:space-between;align-items:center;padding:0 36px;background:#ffffffb0;border-bottom:1px solid var(--line)}.topbar h1{font-size:21px;line-height:1;margin:7px 0 0;font-weight:650}.header-actions{display:flex;gap:13px;align-items:center;font-size:12px}.status-pill{border:1px solid #ddf0e9;background:#f2fbf7;border-radius:20px;color:#48957b;padding:6px 10px;font-size:11px;display:inline-flex;align-items:center;gap:6px}.status-pill i{width:5px;height:5px;background:var(--green);border-radius:50%}.icon-button{border:0;padding:8px;color:#83879d;font-size:19px;background:transparent}.divider{height:24px;width:1px;background:var(--line);margin:0 3px}.avatar{display:grid;place-items:center;flex-shrink:0;width:42px;height:42px;border-radius:13px;background:var(--accent-light);color:var(--accent);font-weight:650}.small-avatar{width:30px;height:30px;font-size:12px;border-radius:50%}main{padding:30px 36px;min-height:calc(100vh - 145px)}.footer{padding:12px 36px 18px;display:flex;justify-content:space-between;color:#b0b2c0;font-size:10px}.page-intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}.page-intro h2{margin-bottom:8px;font-size:20px}.page-intro p{margin:0;font-size:12px;color:var(--muted)}.subtle-chip{font-size:11px;background:white;border:1px solid var(--line);padding:8px 12px;border-radius:7px;color:#9295a8}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:22px}.stat-card{border:1px solid var(--line);background:white;border-radius:var(--radius);padding:22px 23px;position:relative}.stat-label{color:#878b9e;font-size:12px;margin-bottom:15px}.stat-value{font-size:32px;letter-spacing:-1px;font-weight:650}.stat-foot{font-size:10px;color:#b0b2c0;margin-top:9px}.stat-icon{position:absolute;right:20px;top:19px;background:#f6f4ff;color:#a59bdd;padding:9px;border-radius:10px}.stat-icon svg{width:18px;height:18px}.card{background:white;border:1px solid var(--line);border-radius:var(--radius);padding:24px;margin-bottom:20px}.card-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.card-header h3{margin:0}.two-col{display:grid;grid-template-columns:1.65fr 1fr;gap:22px}.chart{height:210px;display:flex;gap:16px;align-items:flex-end;padding:10px 10px 25px;border-bottom:1px solid var(--line)}.chart-day{flex:1;display:flex;justify-content:center;align-items:flex-end;gap:5px;height:100%;position:relative}.chart-bar{width:17px;border-radius:4px 4px 0 0;background:var(--accent);min-height:2px;opacity:.75}.chart-bar.out{background:#c8c0f8}.chart-day small{position:absolute;bottom:-22px;white-space:nowrap;font-size:10px;color:#aaaebf}.legend{display:flex;gap:14px;font-size:10px;color:var(--muted)}.legend span:before{content:'';display:inline-block;width:7px;height:7px;margin-right:5px;border-radius:2px;background:var(--accent)}.legend span+span:before{background:#c8c0f8}.empty{min-height:220px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:28px;color:var(--muted)}.empty-symbol{width:62px;height:62px;background:#f5f3ff;border:1px solid #ede8ff;display:grid;place-items:center;border-radius:20px;color:#b2a8ea;margin-bottom:18px}.empty-symbol svg{width:29px;height:29px}.empty h3{font-size:15px;color:#6b6e86;margin-bottom:9px}.empty p{font-size:12px;max-width:310px;line-height:1.8;margin-bottom:18px}.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.quick-tile{padding:17px;border:1px solid var(--line);border-radius:11px}.quick-tile strong{font-size:12px;display:block;margin:7px 0}.quick-tile span{font-size:10px;color:var(--muted)}.quick-tile svg{width:19px;height:19px}.activity{display:flex;gap:12px;align-items:center;padding:13px 0;border-bottom:1px solid #f4f4f8;font-size:12px}.activity small{margin-left:auto;color:var(--muted);white-space:nowrap}.chat-layout{display:grid;grid-template-columns:290px minmax(0,1fr);height:calc(100vh - 190px);min-height:520px;background:white;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.chat-list{border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0}.list-head{padding:22px 20px 15px}.list-head h3{display:flex;justify-content:space-between;align-items:center}.list-head input{background:#f8f8fc;border:0;font-size:12px;margin-top:3px}.tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);padding:0 20px}.tab{border:0;border-radius:0;padding:13px 0;background:transparent;font-size:12px;color:var(--muted);border-bottom:2px solid transparent}.tab.active{color:var(--accent);border-bottom-color:var(--accent)}.list-body{overflow-y:auto;flex:1;padding:6px}.session-row{display:flex;gap:12px;padding:15px 12px;border-radius:9px;cursor:pointer}.session-row:hover{background:#faf9ff}.session-row.active{background:#f3f0ff}.session-copy{flex:1;min-width:0}.session-title{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin-bottom:8px}.session-title small{font-size:9px;color:#aaaabd}.session-preview{display:flex;font-size:11px;color:#9b9eae;gap:7px}.truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.unread{margin-left:auto;background:var(--accent);color:white;font-size:9px;min-width:16px;height:16px;border-radius:8px;display:grid;place-items:center}.chat-pane{display:flex;flex-direction:column;min-width:0;min-height:0;background:#fdfdff}.chat-pane>.empty{flex:1}.chat-header{height:77px;border-bottom:1px solid var(--line);padding:15px 24px;display:flex;align-items:center;gap:12px;background:white}.chat-header h3{margin:0 0 6px}.chat-header small{color:var(--muted);font-size:10px}.chat-tools{margin-left:auto;display:flex;gap:8px}.chat-tools select{font-size:11px;padding:8px;width:110px}.chat-tools button{font-size:11px}.messages{flex:1;overflow-y:auto;padding:25px;display:flex;flex-direction:column;gap:22px}.message{max-width:76%;display:flex;gap:10px;align-self:flex-start}.message.out{align-self:flex-end;flex-direction:row-reverse}.message .avatar{width:30px;height:30px;border-radius:10px;font-size:11px}.bubble{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;background:white;border:1px solid #eaeaf2;padding:11px 15px;border-radius:0 12px 12px 12px;font-size:13px;min-width:55px}.message.out .bubble{background:var(--accent);color:white;border-color:var(--accent);border-radius:12px 0 12px 12px}.message-meta{font-size:9px;color:#aaaebe;margin-top:6px}.message.out .message-meta{text-align:right}.message-error{color:var(--red);font-size:10px;max-width:260px;margin-top:5px}.bubble img{display:block;max-width:220px;max-height:220px;border-radius:6px}.bubble video{max-width:250px;max-height:200px}.bubble a{color:inherit;text-decoration:underline}.composer{border-top:1px solid var(--line);background:white;padding:14px 23px 18px}.composer-tools{display:flex;gap:10px;align-items:center;margin-bottom:9px}.composer-tools button{font-size:11px;padding:5px 9px;border:0;background:#f8f7fc;color:#89849e}.composer textarea{border:0;box-shadow:none;padding:4px 0;resize:none;height:73px;font-size:13px}.composer-footer{display:flex;align-items:center;justify-content:space-between}.composer-footer small{font-size:10px;color:#b0b2c0}.composer-footer button{padding:8px 21px;font-size:12px}.quick-replies{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.quick-replies button{font-size:11px;padding:5px 9px}.qr-grid{display:grid;grid-template-columns:350px minmax(0,1fr);gap:24px}.qr-card{text-align:center;padding:28px}.qr-card h3{margin-bottom:8px}.qr-box{width:250px;height:250px;margin:24px auto 18px;border:1px solid var(--line);border-radius:12px;display:flex;align-items:center;justify-content:center;background:#fff;overflow:hidden}.qr-box img{width:100%;height:100%;object-fit:contain}.qr-box .empty{min-height:0;padding:20px}.qr-status{font-size:12px;color:#9699ab;margin-bottom:18px;min-height:20px}.segmented{background:#f0f0f7;border-radius:10px;padding:4px;display:flex;gap:3px;margin-bottom:22px;max-width:350px}.segmented button{flex:1;border:0;background:transparent;color:#9494a9;font-size:12px}.segmented button.active{background:white;color:var(--accent);box-shadow:0 2px 5px #23213b0a}.notice{padding:12px 14px;border-radius:9px;background:#f6f4ff;color:#8171b5;line-height:1.8;font-size:11px}.notice.warn{background:#fff8ed;color:#af8849}.binding{padding:16px 0;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px}.binding-info{flex:1;min-width:0;font-size:12px}.binding-info small{display:block;font-size:10px;color:var(--muted);margin-top:6px;overflow-wrap:anywhere}.badge{padding:3px 7px;border-radius:5px;background:#f2f0ff;color:var(--accent);font-size:10px}.badge.green{color:#259c79;background:#eaf8f2}.badge.warn{color:#b9924a;background:#fff7e8}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;align-items:start}.form-row{display:flex;gap:18px}.form-row>*{flex:1}.form-help{color:var(--muted);font-size:11px;line-height:1.8}.rule-row{border-bottom:1px solid var(--line);padding:18px 0;display:flex;gap:16px;align-items:center}.rule-row .rule-text{flex:1;min-width:0}.rule-row p{margin:8px 0 0;font-size:12px;white-space:pre-wrap;line-height:1.7}.switch-label{display:flex;align-items:center;gap:8px;margin:0;font-size:11px}.switch-label input{width:16px;margin:0;accent-color:var(--accent)}.data-table{width:100%;border-collapse:collapse;font-size:12px}.table-wrap{overflow-x:auto}.data-table th{font-size:11px;font-weight:500;color:#9a9daf;text-align:left;padding:13px 16px;background:#fafafe;white-space:nowrap}.data-table td{padding:17px 16px;border-bottom:1px solid var(--line);max-width:220px}.data-table button{font-size:11px;padding:6px 9px}.login-layout{min-height:100vh;display:grid;grid-template-columns:1fr 1fr;background:white}.login-intro{background:#f0edff;padding:12vh 12%;display:flex;flex-direction:column;position:relative;overflow:hidden}.login-intro h1{font-size:36px;font-weight:600;line-height:1.65;letter-spacing:1px;margin:25px 0 20px;color:#4e437c}.login-intro p{color:#9488b7;line-height:2.2;font-size:13px}.login-intro>small{color:#aaa0c4;margin-top:auto;padding-top:50px;font-size:11px}.intro-art{padding:35px 0}.art-bubble{padding:20px 25px;background:white;border-radius:16px 16px 16px 0;box-shadow:0 15px 45px #67589812;color:#82769f;font-size:14px;max-width:320px}.art-bubble span{color:#baa4fc;margin-left:15px}.art-bubble.small{margin:20px 0 0 50px;background:#7867c4;color:white;border-radius:16px 16px 0 16px;max-width:250px}.login-card{align-self:center;max-width:350px;width:calc(100% - 70px);justify-self:center}.login-card h2{font-size:24px;margin:28px 0 12px}.login-card>.muted{font-size:12px;margin-bottom:34px}.login-card label{font-size:12px;margin-bottom:22px}.login-card input{padding:14px;background:#fcfcfe}.login-card button{padding:13px;display:flex;justify-content:space-between}.login-hint{font-size:11px;color:#a8a8b6;text-align:center;line-height:1.9;margin-top:25px}.toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:#303044;color:white;border-radius:10px;padding:13px 22px;box-shadow:0 8px 35px #0002;z-index:200;font-size:12px;max-width:90vw}.modal-overlay{position:fixed;inset:0;background:#27213955;backdrop-filter:blur(3px);display:grid;place-items:center;z-index:100;padding:24px}.modal{background:white;max-width:530px;width:100%;padding:28px;border-radius:18px;max-height:90vh;overflow:auto;box-shadow:0 25px 80px #32295c30}.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:22px}.loading{padding:60px;text-align:center;color:#aaa}.public-page{min-height:100vh;display:grid;place-items:center;padding:20px;background:linear-gradient(150deg,#f2f0ff,#f8fafc)}.public-card{width:100%;max-width:420px;background:white;padding:35px 28px;text-align:center;border-radius:22px;box-shadow:0 18px 60px #5446790d}.public-card .brand-mark{margin:0 auto 20px}.public-card h1{font-size:22px}.public-card p{font-size:12px;color:var(--muted);line-height:1.8}.public-card .notice{margin-top:20px;text-align:left}.verify-form{margin:12px 0;display:flex;gap:8px}.verify-form input{min-width:0}
@media(min-width:1500px){main{max-width:1500px;margin:0 auto}.topbar{padding-right:48px}}
@media(max-width:1000px){.stats-grid{grid-template-columns:repeat(2,1fr)}.two-col,.settings-grid{grid-template-columns:1fr}.qr-grid{grid-template-columns:310px 1fr}main{padding:24px}.chat-layout{grid-template-columns:250px 1fr}.header-actions .status-pill{display:none}.qr-box{width:220px;height:220px}}
@media(max-width:700px){.sidebar{inset:auto 0 0;width:100%;height:65px;flex-direction:row;border-top:1px solid var(--line)}.brand,.sidebar-bottom{display:none}.sidebar nav{flex-direction:row;gap:0;justify-content:space-around;padding:0}.nav-item{height:60px;flex:1;font-size:9px;gap:3px;border-radius:0}.nav-item svg{width:19px;height:19px}.workspace{margin:0 0 65px}.topbar{height:76px;padding:0 18px}.topbar h1{font-size:18px}.header-actions{gap:8px}.header-actions .divider,.header-actions #user-name{display:none}main{padding:20px 14px;min-height:calc(100vh - 180px)}.footer{padding:10px 18px}.stats-grid{gap:10px}.stat-card{padding:18px 15px}.stat-value{font-size:27px}.stat-icon{right:12px;top:14px;padding:6px}.qr-grid{grid-template-columns:1fr}.qr-card{padding:22px}.qr-box{width:250px;height:250px}.page-intro{gap:12px}.page-intro h2{font-size:17px}.page-intro .subtle-chip{display:none}.card{padding:20px}.chat-layout{display:flex;height:calc(100vh - 195px);min-height:480px}.chat-list{width:100%}.chat-pane{display:none}.chat-layout.has-selection .chat-list{display:none}.chat-layout.has-selection .chat-pane{display:flex;width:100%}.chat-tools{gap:3px}.chat-tools button{padding:7px}.chat-tools select{width:91px;padding:6px}.chat-header{padding:12px 15px}.messages{padding:17px}.message{max-width:90%}.login-layout{grid-template-columns:1fr}.login-intro{display:none}.login-card{max-width:350px;padding:40px 0}.form-row{flex-direction:column;gap:0}.header-actions .small-avatar{display:none}}

/* Keep narrow in-app panels and mobile layouts inside their viewport. */
.two-col>*,.settings-grid>*,.qr-grid>*{min-width:0}.chart{gap:12px}.chart-day{min-width:0}.chart-bar{width:40%;max-width:17px;flex-shrink:1}.qr-box{width:min(250px,100%);height:auto;aspect-ratio:1}.page-intro>div{min-width:0}.rule-row{flex-wrap:wrap}.rule-row .rule-text{min-width:130px}
