:root{font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif;color:#1f2937;background:#f5f7fa;font-synthesis:none}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#f5f7fa}button,textarea{font:inherit}.app-shell{min-height:100vh;display:grid;grid-template-columns:248px 1fr}.sidebar{position:sticky;top:0;height:100vh;background:#111827;color:#d1d5db;padding:18px 14px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;font-size:17px;font-weight:700;padding:6px 10px 22px}.brand-mark,.agent-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:linear-gradient(135deg,#2563eb,#60a5fa);color:#fff;font-size:12px}.sidebar nav{display:flex;flex-direction:column;gap:4px}.sidebar nav a{color:#cbd5e1;text-decoration:none;padding:11px 13px;border-radius:6px}.sidebar nav a span{display:inline-block;width:24px}.sidebar nav a.active,.sidebar nav a:hover{background:#1f2937;color:#fff}.nav-label{font-size:11px;color:#6b7280;text-transform:uppercase;letter-spacing:.08em;padding:23px 13px 7px}.sidebar-foot{margin-top:auto;border-top:1px solid #263244;padding:16px 10px 4px;font-size:12px}.status-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#22c55e;margin-right:8px}.workspace{min-width:0}.topbar{height:64px;background:#fff;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:10}.topbar strong,.topbar small{display:block}.topbar small{font-size:11px;color:#9ca3af;margin-top:2px}.avatar{width:34px;height:34px;border:0;border-radius:50%;background:#e8efff;color:#2563eb}.chat-page{height:calc(100vh - 64px);display:grid;grid-template-rows:auto 1fr auto;max-width:1000px;margin:auto}.chat-head{display:flex;gap:14px;padding:32px 34px 20px}.chat-head h1{font-size:20px;margin:0 0 6px}.chat-head p,.page-title p{margin:0;color:#6b7280;font-size:14px}.conversation{padding:20px 34px;overflow:auto}.message{display:flex}.bubble{max-width:700px;background:#fff;border:1px solid #e5e7eb;border-radius:3px 14px 14px 14px;padding:16px 18px;box-shadow:0 2px 6px #0f172a08}.bubble p{margin:7px 0 0;color:#4b5563;line-height:1.65}.starter-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:24px}.starter-grid button{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:15px;text-align:left;cursor:pointer}.starter-grid button:hover{border-color:#93b4f7}.starter-grid strong,.starter-grid span{display:block}.starter-grid span{color:#6b7280;font-size:12px;margin-top:6px}.composer{position:relative;margin:12px 34px 26px;display:grid;grid-template-columns:auto 1fr auto;gap:8px;background:#fff;border:1px solid #d1d5db;border-radius:12px;padding:10px 10px 27px;box-shadow:0 8px 30px #0f172a12}.composer textarea{border:0;outline:0;resize:none;padding:6px;background:transparent}.composer small{position:absolute;bottom:8px;left:52px;color:#9ca3af;font-size:10px}.attach,.send,.primary{border:0;border-radius:7px;cursor:pointer}.attach{background:#f3f4f6;width:36px;height:36px;font-size:21px}.send,.primary{background:#2563eb;color:#fff;padding:0 18px}.content-page{padding:30px;max-width:1200px;margin:auto}.page-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.page-title h1{font-size:24px;margin:0 0 7px}.primary{height:38px}.card,.metric{background:#fff;border:1px solid #e5e7eb;border-radius:6px}.empty-state{text-align:center;padding:70px 24px;color:#6b7280}.empty-state h1,.empty-state h2{color:#1f2937}.empty-icon{font-size:32px;color:#93a4bc}.metric-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:18px}.metric{padding:18px 20px}.metric span,.metric strong{display:block}.metric span{font-size:12px;color:#6b7280}.metric strong{font-size:27px;margin-top:8px}.table-head,.table-row{display:grid;grid-template-columns:1fr 2fr 1fr;gap:18px;padding:14px 18px}.table-head{background:#f8fafc;border-bottom:1px solid #e5e7eb;color:#6b7280;font-size:12px}.table-row+.table-row{border-top:1px solid #eef0f3}.ok{color:#16a34a}.pending{color:#d97706}@media(max-width:800px){.app-shell{grid-template-columns:64px 1fr}.sidebar{padding-inline:8px}.brand>span:last-child,.sidebar nav a:not(.active){font-size:0}.sidebar nav a span{font-size:16px}.nav-label,.sidebar-foot{display:none}.starter-grid{grid-template-columns:1fr}.chat-head,.conversation{padding-inline:18px}.composer{margin-inline:18px}.content-page{padding:20px}.metric-grid{grid-template-columns:1fr}}

.secondary{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:7px;background:#eef2f7;color:#374151;padding:9px 14px;text-decoration:none;cursor:pointer}.upload-button{display:flex;align-items:center;cursor:pointer}.upload-button input{display:none}.notice{padding:12px 15px;border-radius:6px;margin-bottom:16px;font-size:13px}.notice-ok{background:#ecfdf5;color:#047857}.notice-error{background:#fef2f2;color:#b91c1c}.table-row span small{display:block;color:#9ca3af;margin-top:4px}.path-text{font-family:ui-monospace,SFMono-Regular,monospace;font-size:12px;color:#64748b;overflow-wrap:anywhere}.artifact-list{display:grid;gap:12px}.artifact-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:16px;padding:16px 18px}.format-badge{width:54px;height:54px;display:grid;place-items:center;border-radius:8px;background:#eff6ff;color:#2563eb;font-size:11px;font-weight:800}.artifact-info strong,.artifact-info span,.artifact-info small{display:block}.artifact-info span{font-size:12px;color:#6b7280;margin-top:6px}.artifact-actions{display:flex;gap:8px}.error-text{color:#b91c1c;margin-top:5px}@media(max-width:800px){.artifact-row{grid-template-columns:auto 1fr}.artifact-actions{grid-column:1/-1}}
.artifact-preview-stage{padding:20px 24px 8px}.artifact-preview-stage iframe{display:block;width:100%;height:min(62vh,660px);border:1px solid #dbe1ea;border-radius:9px;background:#fff;box-shadow:0 7px 24px #0f172a0d}.docx-preview-placeholder{min-height:330px;display:grid;place-items:center;align-content:center;text-align:center;padding:40px;background:#fff;border:1px solid #dbe1ea;border-radius:9px}.docx-preview-placeholder strong{margin-top:18px}.docx-preview-placeholder p{max-width:520px;margin:8px 0 0;color:#64748b;line-height:1.7;font-size:13px}.docx-sheet{width:92px;height:116px;border:1px solid #bfdbfe;border-radius:5px;background:linear-gradient(90deg,#2563eb 0 25px,#fff 25px);box-shadow:0 10px 25px #2563eb1f;display:grid;place-items:center}.docx-sheet span{margin-left:-39px;color:#fff;font-size:20px;font-weight:800}.artifact-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:14px 24px 30px}.artifact-detail-card{min-width:0;padding:18px;background:#fff;border:1px solid #e1e6ee;border-radius:9px}.detail-card-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.detail-card-title h3{margin:0;font-size:15px}.detail-card-title>span{font-size:11px;color:#64748b}.detail-empty{color:#94a3b8;font-size:13px;margin:20px 0 4px}.review-pill{padding:4px 8px;border-radius:999px;background:#f1f5f9}.review-revised,.review-passed{background:#ecfdf5;color:#047857!important}.review-warning,.review-unavailable{background:#fff7ed;color:#c2410c!important}.finding-list,.evidence-list{display:grid;gap:9px;margin-top:14px}.finding-item{padding:12px;border:1px solid #e5e7eb;border-left:3px solid #94a3b8;border-radius:6px}.finding-item.finding-unsupported{border-left-color:#f97316;background:#fffaf5}.finding-item.finding-supported{border-left-color:#22c55e}.finding-item>div{display:flex;justify-content:space-between;gap:10px}.finding-item>div span{font-size:11px;color:#64748b}.finding-item blockquote{margin:10px 0 7px;padding-left:10px;border-left:2px solid #cbd5e1;color:#334155;font-size:13px}.finding-item p{margin:0;color:#64748b;font-size:12px;line-height:1.55}.finding-item code{display:inline-block;margin-top:8px;font-size:11px}.snapshot-line{overflow-wrap:anywhere;color:#64748b;font-size:11px}.evidence-item{border:1px solid #e5e7eb;border-radius:6px;overflow:hidden}.evidence-item summary{display:flex;justify-content:space-between;gap:10px;padding:11px 12px;cursor:pointer;background:#f8fafc;font-size:12px}.evidence-item summary span{color:#2563eb}.evidence-item pre{max-height:230px;overflow:auto;margin:0;padding:12px;white-space:pre-wrap;overflow-wrap:anywhere;background:#fff;color:#475569;font:12px/1.65 ui-monospace,SFMono-Regular,monospace}.evidence-item small{display:block;padding:9px 12px;border-top:1px solid #eef2f7;color:#94a3b8;overflow-wrap:anywhere}@media(max-width:800px){.artifact-preview-stage{padding:14px 14px 6px}.artifact-preview-stage iframe{height:54vh}.artifact-detail-grid{grid-template-columns:1fr;padding:10px 14px 24px}}

.message.user{justify-content:flex-end;margin:16px 0}.message.user .bubble{background:#95ec69;border-color:#8ade60;border-radius:14px 3px 14px 14px}.message.assistant{margin:16px 0}.message-content{white-space:pre-wrap;line-height:1.7}.trace-card{margin:12px 0 18px 0;background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:8px 14px}.trace-card>div{display:flex;align-items:center;gap:8px;padding:7px 0;font-size:12px}.trace-card small{margin-left:auto;color:#6b7280}.composer .attach{display:grid;place-items:center;color:#374151;text-decoration:none}.send:disabled{opacity:.55;cursor:not-allowed}
.trace-card .trace-running .status-dot{background:#1677ff;animation:thinking-dot 1.2s infinite}.trace-card .trace-failed .status-dot{background:#ff4d4f}.trace-card .trace-completed .status-dot{background:#52c41a}

.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:18px}.settings-card{padding:20px}.settings-card h2{font-size:16px;margin:0 0 18px}.settings-card label{display:grid;gap:7px;margin:13px 0;color:#4b5563;font-size:13px}.settings-card input:not([type=checkbox]){width:100%;height:39px;border:1px solid #d1d5db;border-radius:6px;padding:0 11px;outline:none}.settings-card input:focus{border-color:#6b9cf4;box-shadow:0 0 0 3px #dbeafe}.settings-card input:disabled{background:#f3f4f6;color:#6b7280}.settings-card small{display:block;color:#9ca3af;line-height:1.6}.settings-card .switch-row{display:flex;align-items:center;gap:8px}.capability-table{margin-top:18px}@media(max-width:800px){.settings-grid{grid-template-columns:1fr}}

.account-menu{display:flex;align-items:center;gap:9px}.account-menu .avatar{display:grid;place-items:center}.account-menu>span strong,.account-menu>span small{display:block}.account-menu form{margin:0}.account-menu button{border:0;background:transparent;color:#6b7280;cursor:pointer;padding:7px}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:28px;background:radial-gradient(circle at 20% 10%,#dbeafe 0,transparent 32%),#f5f7fa}.auth-card{width:min(440px,100%);background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:30px;box-shadow:0 20px 55px #0f172a14}.auth-brand{display:flex;align-items:center;gap:11px;margin-bottom:30px}.auth-brand strong,.auth-brand small{display:block}.auth-brand small{color:#9ca3af;font-size:11px;margin-top:3px}.auth-card h1{font-size:22px;margin:0 0 8px}.auth-hint{color:#6b7280;font-size:13px;line-height:1.6;margin:0 0 22px}.auth-card form>label:not(.remember){display:grid;gap:7px;color:#4b5563;font-size:13px;margin:14px 0}.auth-card input:not([type=checkbox]){height:42px;border:1px solid #d1d5db;border-radius:7px;padding:0 12px;outline:none}.auth-card input:focus{border-color:#6b9cf4;box-shadow:0 0 0 3px #dbeafe}.remember{display:flex;align-items:center;gap:7px;color:#6b7280;font-size:12px;margin:14px 0}.auth-submit{width:100%;margin-top:8px}.auth-link{display:inline-flex;align-items:center;text-decoration:none;margin-top:8px}

.settings-card select{width:100%;height:39px;border:1px solid #d1d5db;border-radius:6px;padding:0 10px;background:#fff}.user-table .table-head,.user-table .table-row{grid-template-columns:1.4fr .8fr .7fr 1fr}.user-table .table-row{align-items:center}@media(max-width:800px){.account-menu>span:not(.avatar){display:none}.user-table{overflow:auto}.user-table .table-head,.user-table .table-row{min-width:650px}}

.access-card{max-width:720px}.access-actions{display:flex;gap:10px;margin:18px 0 12px}.access-actions .primary{padding:0 18px}

.approval-list{display:grid;gap:12px}.approval-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:16px;padding:16px 18px}.approval-effect{min-width:58px;text-align:center;border-radius:7px;background:#fff7ed;color:#c2410c;font-size:12px;font-weight:700;padding:10px}.approval-info strong,.approval-info span,.approval-info small{display:block}.approval-info span{font-size:12px;color:#6b7280;margin-top:5px}.approval-info small{font-family:ui-monospace,SFMono-Regular,monospace;color:#94a3b8;margin-top:5px}.approval-actions{display:flex;align-items:center;gap:8px}.approval-actions .primary{height:36px}.danger{color:#b91c1c;background:#fef2f2}.status-pill{font-size:12px;border-radius:999px;padding:6px 10px;background:#f3f4f6;color:#4b5563}.status-approved{background:#ecfdf5;color:#047857}.status-failed,.status-rejected{background:#fef2f2;color:#b91c1c}.status-executing{background:#eff6ff;color:#2563eb}@media(max-width:800px){.approval-row{grid-template-columns:auto 1fr}.approval-actions{grid-column:1/-1}}

.inline-approval-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;margin:12px 0 18px;background:#fff;border:1px solid #fed7aa;border-left:4px solid #f97316;border-radius:8px;padding:14px 16px}.inline-approval-info strong,.inline-approval-info span,.inline-approval-info small{display:block}.inline-approval-info span{font-size:12px;color:#4b5563;margin-top:4px}.inline-approval-info small{font-size:11px;color:#9ca3af;margin-top:5px}@media(max-width:800px){.inline-approval-card{grid-template-columns:auto 1fr}.inline-approval-card .approval-actions{grid-column:1/-1}}

.artifact-list{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}.artifact-card{min-width:0;overflow:hidden;border-radius:9px;transition:border-color .16s,box-shadow .16s}.artifact-card:hover{border-color:#c8d5e9;box-shadow:0 9px 28px #0f172a0c}.artifact-card-main{min-height:146px;display:flex;align-items:flex-start;gap:14px;padding:17px 16px 15px}.artifact-card-copy{min-width:0;flex:1}.artifact-card-copy>strong{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:15px;line-height:1.45}.artifact-card-copy p{margin:7px 0 9px;color:#64748b;font-size:11px}.artifact-card-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#94a3b8;font-size:10.5px;line-height:1.65}.artifact-status-line{display:flex;align-items:center;gap:7px;margin-bottom:7px;color:#2563eb;font-size:10.5px;font-weight:700}.artifact-status-line em{border-radius:999px;background:#eff6ff;padding:2px 6px;font-style:normal}.artifact-card-thumb{flex:0 0 58px;width:58px;height:58px;display:grid;place-items:center;border:1px solid #dbe5f3;border-radius:7px;background:linear-gradient(145deg,#f8fbff,#e8f1ff);box-shadow:inset 0 0 0 5px #fff}.artifact-card-thumb span{color:#2563eb;font-size:10px;font-weight:800}.artifact-card-footer{height:40px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 8px 0 12px;border-top:1px solid #e8edf4}.artifact-card-footer>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#64748b;font-size:10.5px}.artifact-card-footer i{display:inline-grid;place-items:center;width:17px;height:17px;margin-right:4px;border-radius:4px;background:#2563eb;color:#fff;font-size:8px;font-style:normal}.artifact-card-actions{display:flex;align-items:center;gap:3px}.feedback-action,.icon-action{width:29px;height:29px;display:inline-grid;place-items:center;border:0;border-radius:6px;background:transparent;color:#64748b;text-decoration:none;cursor:pointer;font-size:14px}.feedback-action:hover,.icon-action:hover{background:#f1f5f9}.feedback-action.active{background:#eaf2ff;color:#1d4ed8}.feedback-action.active.dislike{background:#fff1f2;color:#be123c}.feedback-action:disabled{opacity:.45;cursor:wait}.revision-suggestion{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:14px 24px 0;padding:13px 15px;border:1px solid #fed7aa;border-radius:8px;background:#fff7ed}.revision-suggestion strong,.revision-suggestion span{display:block}.revision-suggestion strong{font-size:13px;color:#9a3412}.revision-suggestion span{margin-top:3px;color:#9a5b3b;font-size:11px;line-height:1.5}.revision-suggestion .primary{white-space:nowrap}@media(max-width:800px){.artifact-list{grid-template-columns:1fr}.artifact-card-main{min-height:132px}.revision-suggestion{align-items:flex-start;margin:10px 14px 0;flex-direction:column}.revision-suggestion .primary{width:100%}}
.revision-context-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:13px;margin:0 0 18px;padding:13px 14px;border:1px solid #bfdbfe;border-left:4px solid #2563eb;border-radius:8px;background:#eff6ff}.revision-context-card strong,.revision-context-card span{display:block}.revision-context-card span{margin-top:4px;color:#64748b;font-size:11px}@media(max-width:800px){.revision-context-card{grid-template-columns:auto 1fr}.revision-context-card .secondary{grid-column:1/-1}}
.notice-warning{background:#fff7ed;color:#9a3412}
.pagination{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:16px;color:#64748b;font-size:12px}.pagination>div{display:flex;gap:7px}.pagination .secondary:disabled{opacity:.45;cursor:not-allowed}.list-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:14px}.list-toolbar input{min-width:220px;height:38px;border:1px solid #d1d5db;border-radius:7px;padding:0 11px;outline:none}@media(max-width:600px){.page-title{align-items:flex-start;flex-direction:column;gap:14px}.page-title>.primary,.page-title>.upload-button{align-self:stretch;justify-content:center}.pagination{align-items:flex-start;flex-direction:column}.list-toolbar{align-items:stretch}.list-toolbar input{min-width:0;flex:1}}
.storage-section-head{display:flex;align-items:flex-end;justify-content:space-between;margin:26px 0 12px}.storage-section-head h2{margin:0 0 5px;font-size:18px}.storage-section-head p{margin:0;color:#6b7280;font-size:12px}.backup-table .table-head,.backup-table .table-row{grid-template-columns:1.25fr 1fr .55fr 1fr;align-items:center}.backup-actions{display:flex;gap:7px;justify-content:flex-end}.backup-actions .secondary{white-space:nowrap}.compact-empty{padding:38px 24px}.storage-recovery-note{margin-top:16px;line-height:1.65}@media(max-width:800px){.backup-table{overflow:auto}.backup-table .table-head,.backup-table .table-row{min-width:760px}.storage-section-head{align-items:flex-start}.backup-actions{justify-content:flex-start}}
.admin-tabs{display:flex;gap:6px;margin:0 0 18px;padding:5px;background:#eef2f7;border-radius:12px;overflow:auto}.admin-tabs button{border:0;background:transparent;color:#64748b;padding:9px 16px;border-radius:8px;white-space:nowrap;cursor:pointer}.admin-tabs button.active{background:#fff;color:#1d4ed8;box-shadow:0 2px 8px rgba(15,23,42,.08);font-weight:700}.operations-hero{display:flex;justify-content:space-between;align-items:center;padding:22px 24px;margin-bottom:16px;border:1px solid #dbe4ef;border-left:5px solid #22c55e;border-radius:14px;background:linear-gradient(120deg,#fff,#f8fafc)}.operations-hero.health-degraded{border-left-color:#f59e0b}.operations-hero.health-unhealthy{border-left-color:#ef4444}.operations-hero h2{margin:3px 0 6px;font-size:26px}.operations-hero p,.operations-hero small{margin:0;color:#64748b}.operations-hero>div:last-child{display:grid;text-align:right}.operations-hero>div:last-child strong{font-size:30px}.operations-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.metric-panel{display:flex;flex-direction:column;gap:7px;padding:18px}.metric-panel>span,.metric-panel small{color:#64748b}.metric-panel>strong{font-size:22px}.operations-details{grid-template-columns:repeat(3,minmax(0,1fr))}.system-detail-list{display:grid;gap:0;margin:0}.system-detail-list div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #edf1f5}.system-detail-list div:last-child{border-bottom:0}.system-detail-list dt{color:#64748b}.system-detail-list dd{margin:0;text-align:right;font-weight:600}.error-text{color:#dc2626}.maintenance-card{max-width:680px;margin-bottom:16px}.maintenance-card p{color:#64748b;line-height:1.65}.inline-actions{display:flex;gap:8px;margin-top:14px}.danger{background:#dc2626!important;border-color:#dc2626!important}.cleanup-estimate{display:grid;gap:5px;margin-top:15px;padding:14px;border-radius:10px;background:#f8fafc}.cleanup-estimate span{font-size:18px}.cleanup-estimate small{color:#64748b}.audit-filter-bar{display:grid;grid-template-columns:minmax(240px,1fr) 160px 140px auto;gap:10px;margin-bottom:12px;padding:14px}.audit-filter-bar input,.audit-filter-bar select{width:100%}.audit-table .table-head,.audit-table .table-row{grid-template-columns:1.1fr 1.1fr .8fr 1.5fr}.audit-table .table-row small{overflow-wrap:anywhere}.storage-usage-grid{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:1000px){.operations-grid,.storage-usage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.operations-details{grid-template-columns:1fr}.audit-filter-bar{grid-template-columns:1fr 1fr}.audit-table{overflow:auto}.audit-table .table-head,.audit-table .table-row{min-width:850px}}@media(max-width:640px){.operations-hero{align-items:flex-start}.operations-hero>div:last-child{display:none}.operations-grid,.storage-usage-grid,.audit-filter-bar{grid-template-columns:1fr}.admin-tabs{margin-left:-4px;margin-right:-4px}}
.chat-artifact-list{display:grid;gap:10px;margin:14px 0}.chat-artifact-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:13px;max-width:760px;overflow:hidden;border:1px solid #dbe5f3;border-radius:9px;background:#fff;box-shadow:0 5px 18px #0f172a0a;padding:12px}.chat-artifact-thumb{width:52px;height:52px;display:grid;place-items:center;border:1px solid #dbe5f3;border-radius:7px;background:linear-gradient(145deg,#f8fbff,#e8f1ff);color:#2563eb;font-size:9px;font-weight:800}.chat-artifact-copy{min-width:0}.chat-artifact-copy span,.chat-artifact-copy strong,.chat-artifact-copy small{display:block}.chat-artifact-copy span{color:#2563eb;font-size:10px;font-weight:700}.chat-artifact-copy span em{margin-left:7px;padding:2px 5px;border-radius:999px;background:#eff6ff;font-style:normal}.chat-artifact-copy strong{margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.chat-artifact-copy small{margin-top:4px;color:#64748b;font-size:10.5px}.chat-artifact-actions{display:flex;align-items:center;gap:5px}.chat-artifact-actions .primary,.chat-artifact-actions .secondary{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:0 12px;font-size:11px;white-space:nowrap;text-decoration:none}@media(max-width:700px){.chat-artifact-card{grid-template-columns:auto 1fr}.chat-artifact-actions{grid-column:1/-1;justify-content:flex-end}.chat-artifact-copy strong{white-space:normal}}
.message-citations{margin-top:16px;padding-top:11px;border-top:1px solid #e5e7eb;color:#475569}.message-citations-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:6px}.message-citations-head strong{font-family:Georgia,"Times New Roman","Songti SC",serif;font-size:12px;color:#334155}.message-citations-head span{font-size:10px;color:#94a3b8}.message-citations ol{margin:0;padding-left:23px}.message-citations li{padding:3px 0;font-family:Georgia,"Times New Roman","Songti SC",serif;font-size:11.5px;line-height:1.45}.message-citations li::marker{color:#64748b}.message-citations a{display:inline;color:#315b91;text-decoration:none;border-bottom:1px dotted #9eb5cf}.message-citations a:hover{color:#1677ff;border-bottom-style:solid}.message-citations .citation-title{overflow-wrap:anywhere}.message-citations small{margin-left:7px;color:#7c8798;font-family:inherit}

.message.system{justify-content:center;margin:12px 0}.message.system .bubble{max-width:760px;border-color:#ffd591;background:#fff7e6;color:#ad4e00;border-radius:8px;box-shadow:none}.message-meta{display:flex;align-items:center;gap:4px;margin-top:9px;color:#8c8c8c;font-size:10px}.message-meta time{margin-right:3px}.message-meta button{height:24px;padding:0 6px;border:0;border-radius:4px;background:transparent;color:#8c8c8c;font-size:11px;cursor:pointer}.message-meta button:hover,.message-meta button.active{background:#e6f4ff;color:#0958d9}.message-meta button.dislike{background:#fff1f0;color:#cf1322}.markdown-content{line-height:1.72;overflow-wrap:anywhere}.markdown-content>:first-child{margin-top:0}.markdown-content>:last-child{margin-bottom:0}.markdown-content p{margin:0 0 10px}.markdown-content ul,.markdown-content ol{margin:8px 0;padding-left:22px}.markdown-content pre{overflow:auto;padding:12px;border-radius:7px;background:#f5f5f5}.markdown-content code{padding:1px 4px;border-radius:4px;background:#f5f5f5;color:#c41d7f}.markdown-content blockquote{margin:9px 0;padding:7px 12px;border-left:3px solid #91caff;background:#f0f5ff;color:#595959}.live-thinking{display:flex;align-items:center;gap:5px;width:max-content;margin:8px 0 14px;padding:10px 13px;border:1px solid #e5e7eb;border-radius:10px;background:#fff}.live-thinking>span{width:6px;height:6px;border-radius:50%;background:#1677ff;animation:thinking-dot 1.2s infinite ease-in-out}.live-thinking>span:nth-child(2){animation-delay:.15s}.live-thinking>span:nth-child(3){animation-delay:.3s}.live-thinking small{margin-left:5px;color:#8c8c8c}@keyframes thinking-dot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}.composer .stop{height:36px;padding:0 16px;border:1px solid #ffccc7;border-radius:7px;background:#fff1f0;color:#cf1322;cursor:pointer}.scroll-latest{position:sticky;left:100%;bottom:4px;padding:6px 10px;border:1px solid #d9d9d9;border-radius:999px;background:#fff;color:#595959;box-shadow:0 2px 8px #00000018;cursor:pointer}.artifact-progress{height:4px;margin-top:8px;overflow:hidden;border-radius:999px;background:#f0f0f0}.artifact-progress i{display:block;height:100%;border-radius:inherit;background:#1677ff;transition:width .3s ease}
.chat-artifact-summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 12px;border:1px solid #d9e8ff;border-radius:8px;background:#f6faff;color:#0958d9}.chat-artifact-summary strong{font-size:12px;font-weight:600}.chat-artifact-summary small{color:#64748b;font-size:10.5px;text-align:right}.chat-artifact-summary.has-failure{border-color:#ffccc7;background:#fff7f6;color:#cf1322}.chat-artifact-summary.is-published{border-color:#b7eb8f;background:#f6ffed;color:#389e0d}.chat-artifact-card.artifact-failed{border-color:#ffccc7;background:#fffafa}.chat-artifact-card.artifact-failed .chat-artifact-copy>span{color:#cf1322}.chat-artifact-card.artifact-failed .chat-artifact-thumb{border-color:#ffccc7;background:#fff1f0;color:#cf1322}.chat-artifact-card.artifact-published .chat-artifact-copy>span{color:#389e0d}@media(max-width:700px){.chat-artifact-summary{align-items:flex-start;flex-direction:column;gap:3px}.chat-artifact-summary small{text-align:left}}
.document-table .table-head,.document-table .table-row{grid-template-columns:1.1fr .75fr 1.4fr .8fr;align-items:center}.status-badge{display:inline-flex;width:max-content;border-radius:999px;padding:4px 8px;font-size:11px}.status-ready{background:#ecfdf5;color:#047857}.status-processing{background:#eff6ff;color:#1d4ed8}.status-failed{background:#fef2f2;color:#b91c1c}@media(max-width:800px){.document-table{overflow:auto}.document-table .table-head,.document-table .table-row{min-width:850px}}

/* Ant Design inspired visual system · 2026-08-24 */
:root {
    --ant-primary: #1677ff;
    --ant-primary-hover: #4096ff;
    --ant-primary-active: #0958d9;
    --ant-success: #52c41a;
    --ant-warning: #faad14;
    --ant-error: #ff4d4f;
    --ant-info: #1677ff;
    --ant-text: rgba(0, 0, 0, .88);
    --ant-text-secondary: rgba(0, 0, 0, .65);
    --ant-text-tertiary: rgba(0, 0, 0, .45);
    --ant-border: #d9d9d9;
    --ant-border-secondary: #f0f0f0;
    --ant-fill: #f5f5f5;
    --ant-fill-secondary: #fafafa;
    --ant-bg: #ffffff;
    --ant-layout-bg: #f5f5f5;
    --ant-radius: 6px;
    --ant-radius-lg: 8px;
    --ant-shadow: 0 6px 16px 0 rgba(0, 0, 0, .08), 0 3px 6px -4px rgba(0, 0, 0, .12);
    --ant-shadow-card: 0 1px 2px -2px rgba(0, 0, 0, .16), 0 3px 6px 0 rgba(0, 0, 0, .12), 0 5px 12px 4px rgba(0, 0, 0, .05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ant-text);
    background: var(--ant-layout-bg);
}

html, body {
    color: var(--ant-text);
    background: var(--ant-layout-bg);
    font-size: 14px;
    line-height: 1.5715;
    -webkit-font-smoothing: antialiased;
}

::selection { color: #fff; background: var(--ant-primary); }
a { color: var(--ant-primary); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { transition: color .2s, background-color .2s, border-color .2s, box-shadow .2s, opacity .2s; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #91caff;
    outline-offset: 2px;
}

.app-shell { grid-template-columns: 240px minmax(0, 1fr); background: var(--ant-layout-bg); transition: grid-template-columns .2s ease; }
.sidebar {
    padding: 16px 12px;
    background: #001529;
    color: rgba(255, 255, 255, .65);
    box-shadow: 2px 0 8px rgba(0, 21, 41, .2);
    z-index: 20;
}
.brand { gap: 11px; min-height: 48px; padding: 3px 12px 18px; }
.brand-logo { width: 32px; height: 32px; flex: 0 0 32px; filter: drop-shadow(0 3px 7px rgba(22, 119, 255, .28)); }
.brand-copy { display: grid; min-width: 0; line-height: 1.2; }
.brand-copy strong { color: #fff; font-size: 17px; letter-spacing: .2px; }
.brand-copy small { margin-top: 4px; color: rgba(255, 255, 255, .42); font-size: 9px; font-weight: 600; letter-spacing: .08em; }
.sidebar nav { gap: 3px; }
.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: var(--ant-radius);
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
}
.sidebar nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.sidebar nav a.active { color: #fff; background: var(--ant-primary); box-shadow: 0 2px 6px rgba(22, 119, 255, .35); }
.nav-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sidebar nav a .nav-text { display: block; width: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-label { padding: 21px 12px 7px; color: rgba(255, 255, 255, .35); font-size: 10px; font-weight: 600; letter-spacing: .12em; }
.sidebar-foot { border-color: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .55); }
.status-dot { width: 7px; height: 7px; background: var(--ant-success); box-shadow: 0 0 0 3px rgba(82, 196, 26, .12); }
.sidebar-collapse-trigger {
    display: flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: auto;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--ant-radius);
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .72);
    cursor: pointer;
}
.sidebar-collapse-trigger:hover { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1); color: #fff; }
.sidebar-collapse-trigger svg, .chat-history-collapse-toggle svg, .chat-history-toggle svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sidebar-collapse-copy { overflow: hidden; white-space: nowrap; }
.sidebar .sidebar-foot { margin-top: 8px; }
.app-shell.sidebar-collapsed { grid-template-columns: 68px minmax(0, 1fr); }
.sidebar-collapsed .sidebar { padding-inline: 8px; }
.sidebar-collapsed .brand { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .brand-copy,
.sidebar-collapsed .sidebar nav a .nav-text,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .sidebar-foot,
.sidebar-collapsed .sidebar-collapse-copy { display: none; }
.sidebar-collapsed .sidebar nav a { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .sidebar-collapse-trigger { padding-inline: 0; }

.sidebar-account { position: relative; margin-top: 8px; }
.sidebar-account-trigger {
    display: grid;
    width: 100%;
    min-height: 48px;
    grid-template-columns: 32px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--ant-radius);
    background: rgba(255, 255, 255, .045);
    color: rgba(255, 255, 255, .84);
    text-align: left;
    cursor: pointer;
}
.sidebar-account-trigger:hover,
.sidebar-account-trigger[aria-expanded="true"] { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .1); color: #fff; }
.sidebar-account-trigger .avatar { display: grid; place-items: center; }
.sidebar-account-copy { min-width: 0; }
.sidebar-account-copy strong,
.sidebar-account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account-copy strong { color: inherit; font-size: 13px; font-weight: 600; }
.sidebar-account-copy small { margin-top: 3px; color: rgba(255, 255, 255, .42); font-size: 10px; }
.sidebar-account-chevron { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-account-popover {
    position: absolute;
    z-index: 40;
    left: 0;
    bottom: calc(100% + 8px);
    width: 216px;
    padding: 6px;
    border: 1px solid var(--ant-border-secondary);
    border-radius: var(--ant-radius-lg);
    background: #fff;
    box-shadow: var(--ant-shadow-card);
}
.sidebar-account-popover form { margin: 0; }
.sidebar-account-popover button {
    display: grid;
    width: 100%;
    min-height: 42px;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--ant-radius);
    background: transparent;
    color: var(--ant-text-secondary);
    text-align: left;
    cursor: pointer;
}
.sidebar-account-popover button:hover { background: var(--ant-fill); color: var(--ant-primary); }
.sidebar-account-popover svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-account-popover strong,
.sidebar-account-popover small { display: block; }
.sidebar-account-popover strong { color: inherit; font-size: 13px; font-weight: 500; }
.sidebar-account-popover small { margin-top: 2px; color: var(--ant-text-tertiary); font-size: 10px; }
.sidebar-collapsed .sidebar-account-trigger { display: flex; justify-content: center; padding-inline: 0; }
.sidebar-collapsed .sidebar-account-copy,
.sidebar-collapsed .sidebar-account-chevron { display: none; }

.workspace { display: grid; grid-template-rows: 64px minmax(0, 1fr); min-width: 0; min-height: 100vh; }
.workspace > main, .topbar { width: 100%; min-width: 0; }
.topbar {
    height: 64px;
    padding: 0 28px;
    border-color: var(--ant-border-secondary);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 1px 4px rgba(0, 21, 41, .06);
    backdrop-filter: blur(10px);
}
.workspace-title strong { color: var(--ant-text); font-size: 15px; font-weight: 600; }
.workspace-title small { color: var(--ant-text-tertiary); font-size: 11px; }
.account-menu { gap: 10px; }
.account-menu .avatar, .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e6f4ff;
    color: var(--ant-primary);
    font-size: 13px;
    font-weight: 600;
}
.account-menu > span strong { color: var(--ant-text); font-size: 13px; font-weight: 600; }
.account-menu > span small { color: var(--ant-text-tertiary); font-size: 10px; }
.account-menu form button {
    height: 30px;
    padding: 0 9px;
    border-radius: var(--ant-radius);
    color: var(--ant-text-secondary);
}
.account-menu form button:hover { color: var(--ant-primary); background: #e6f4ff; }

.content-page { width: 100%; min-width: 0; max-width: 1320px; padding: 28px 32px 48px; }
.page-title { margin-bottom: 22px; }
.page-title h1 { margin-bottom: 4px; color: var(--ant-text); font-size: 24px; font-weight: 600; line-height: 1.35; letter-spacing: -.015em; }
.page-title h1:focus, .chat-head h1:focus { outline: none; }
.page-title p { color: var(--ant-text-secondary); font-size: 13px; }
.card, .metric {
    border: 1px solid var(--ant-border-secondary);
    border-radius: var(--ant-radius-lg);
    background: var(--ant-bg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .025);
}
.card:hover { border-color: #e5e5e5; }

.primary, .secondary, .send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 4px 15px;
    border: 1px solid transparent;
    border-radius: var(--ant-radius);
    font-weight: 400;
    line-height: 1.5715;
    white-space: nowrap;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .02);
}
.primary, .send { border-color: var(--ant-primary); background: var(--ant-primary); color: #fff; }
.primary:hover:not(:disabled), .send:hover:not(:disabled) { border-color: var(--ant-primary-hover); background: var(--ant-primary-hover); color: #fff; }
.primary:active:not(:disabled), .send:active:not(:disabled) { border-color: var(--ant-primary-active); background: var(--ant-primary-active); }
.secondary { border-color: var(--ant-border); background: #fff; color: var(--ant-text); }
.secondary:hover:not(:disabled) { border-color: var(--ant-primary-hover); color: var(--ant-primary-hover); background: #fff; }
.primary:disabled, .secondary:disabled, .send:disabled {
    border-color: var(--ant-border);
    background: rgba(0, 0, 0, .04);
    color: rgba(0, 0, 0, .25);
    box-shadow: none;
    cursor: not-allowed;
}
.secondary.danger { border-color: #ffccc7 !important; background: #fff !important; color: var(--ant-error); }
.secondary.danger:hover:not(:disabled) { border-color: var(--ant-error) !important; background: #fff1f0 !important; color: var(--ant-error); }
.primary.danger { border-color: var(--ant-error) !important; background: var(--ant-error) !important; color: #fff; }
.primary.danger:hover:not(:disabled) { border-color: #ff7875 !important; background: #ff7875 !important; }

input:not([type="checkbox"]):not([type="radio"]), select, textarea {
    border: 1px solid var(--ant-border) !important;
    border-radius: var(--ant-radius) !important;
    background: #fff;
    color: var(--ant-text);
    box-shadow: none;
}
input:not([type="checkbox"]):not([type="radio"]):hover, select:hover, textarea:hover { border-color: var(--ant-primary-hover) !important; }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus {
    border-color: var(--ant-primary-hover) !important;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(5, 145, 255, .1) !important;
}
input:disabled, select:disabled, textarea:disabled { background: rgba(0, 0, 0, .04) !important; color: rgba(0, 0, 0, .25) !important; cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ant-primary); }
input::placeholder, textarea::placeholder { color: rgba(0, 0, 0, .25); }
.settings-card { padding: 22px 24px; }
.settings-card h2 { margin-bottom: 19px; color: var(--ant-text); font-size: 16px; font-weight: 600; }
.settings-card label { color: var(--ant-text-secondary); }
.settings-card input:not([type="checkbox"]), .settings-card select { height: 36px; padding-inline: 11px; }
.settings-card small { color: var(--ant-text-tertiary); }
.switch-row { padding: 8px 0; }
.remember { color: var(--ant-text-secondary); }

.notice {
    position: relative;
    min-height: 40px;
    margin-bottom: 18px;
    padding: 9px 14px 9px 38px;
    border: 1px solid;
    border-radius: var(--ant-radius-lg);
    line-height: 20px;
}
.notice::before { position: absolute; left: 14px; top: 9px; font-size: 15px; font-weight: 700; }
.notice-ok { border-color: #b7eb8f; background: #f6ffed; color: #389e0d; }
.notice-ok::before { content: "✓"; }
.notice-error { border-color: #ffccc7; background: #fff2f0; color: #cf1322; }
.notice-error::before { content: "!"; }
.notice-warning { border-color: #ffe58f; background: #fffbe6; color: #ad6800; }
.notice-warning::before { content: "!"; }

.table { overflow: hidden; }
.table-head, .table-row { gap: 20px; padding: 13px 18px; }
.table-head {
    border-bottom: 1px solid var(--ant-border-secondary);
    background: var(--ant-fill-secondary);
    color: var(--ant-text);
    font-size: 12px;
    font-weight: 600;
}
.table-row { min-height: 54px; color: var(--ant-text-secondary); }
.table-row + .table-row { border-top: 1px solid var(--ant-border-secondary); }
.table-row:hover { background: #fafafa; }
.table-row strong { color: var(--ant-text); font-weight: 500; }
.table-row span small { color: var(--ant-text-tertiary); }
.path-text { color: var(--ant-text-tertiary); }

.metric-grid { gap: 16px; }
.metric { padding: 20px 22px; }
.metric span { color: var(--ant-text-secondary); }
.metric strong { color: var(--ant-text); font-size: 28px; font-weight: 600; }
.empty-state { padding: 64px 24px; color: var(--ant-text-secondary); }
.empty-state h1, .empty-state h2 { color: var(--ant-text); font-size: 18px; font-weight: 600; }
.empty-icon { color: #bfbfbf; font-size: 38px; }

.list-toolbar { margin-bottom: 16px; }
.list-toolbar input { height: 34px; min-width: 260px; padding: 4px 11px; }
.pagination { margin-top: 18px; color: var(--ant-text-secondary); }
.pagination .secondary { min-width: 74px; min-height: 32px; padding: 2px 12px; }
.pagination-controls { display: flex; align-items: center; gap: 8px; }
.pagination .pagination-arrow { width: 32px; min-width: 32px; padding: 0; font-size: 20px; line-height: 1; }
.pagination-page { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--ant-primary); border-radius: var(--ant-radius); background: #fff; color: var(--ant-primary); font-weight: 500; }
.pagination-pages { color: var(--ant-text-tertiary); }

.admin-tabs {
    gap: 24px;
    margin-bottom: 22px;
    padding: 0;
    border-bottom: 1px solid var(--ant-border-secondary);
    border-radius: 0;
    background: transparent;
}
.admin-tabs button {
    position: relative;
    min-height: 44px;
    padding: 0 2px;
    border-radius: 0;
    color: var(--ant-text-secondary);
}
.admin-tabs button:hover { color: var(--ant-primary); }
.admin-tabs button.active { color: var(--ant-primary); background: transparent; box-shadow: none; font-weight: 500; }
.admin-tabs button.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--ant-primary); }

.operations-hero {
    padding: 24px 26px;
    border: 1px solid #b7eb8f;
    border-left: 4px solid var(--ant-success);
    border-radius: var(--ant-radius-lg);
    background: linear-gradient(110deg, #f6ffed, #fff 68%);
    box-shadow: none;
}
.operations-hero.health-degraded { border-color: #ffe58f; border-left-color: var(--ant-warning); background: linear-gradient(110deg, #fffbe6, #fff 68%); }
.operations-hero.health-unhealthy { border-color: #ffccc7; border-left-color: var(--ant-error); background: linear-gradient(110deg, #fff2f0, #fff 68%); }
.operations-hero h2 { color: var(--ant-text); font-size: 26px; font-weight: 600; }
.operations-hero p, .operations-hero small { color: var(--ant-text-secondary); }
.operations-grid { gap: 16px; }
.metric-panel { min-height: 118px; padding: 20px; }
.metric-panel > span, .metric-panel small { color: var(--ant-text-secondary); }
.metric-panel > strong { color: var(--ant-text); font-size: 24px; font-weight: 600; }
.system-detail-list dt { color: var(--ant-text-secondary); }
.system-detail-list dd { color: var(--ant-text); }
.system-detail-list div { border-color: var(--ant-border-secondary); }
.storage-section-head h2 { color: var(--ant-text); font-weight: 600; }
.storage-section-head p { color: var(--ant-text-secondary); }
.audit-filter-bar { padding: 16px; }
.audit-filter-bar input, .audit-filter-bar select { height: 34px; padding: 4px 11px; }
.cleanup-estimate { border: 1px solid var(--ant-border-secondary); border-radius: var(--ant-radius); background: var(--ant-fill-secondary); }
.embedding-rebuild-card { max-width: none; margin-top: 14px; }
.rebuild-job-summary { display: grid; grid-template-columns: .7fr .8fr 1.5fr; gap: 12px; margin-top: 14px; }
.rebuild-job-summary > div { display: grid; gap: 5px; min-width: 0; padding: 12px; border: 1px solid var(--ant-border-secondary); border-radius: var(--ant-radius); background: var(--ant-fill-secondary); }
.rebuild-job-summary span { color: var(--ant-text-tertiary); font-size: 12px; }
.rebuild-progress { width: 100%; height: 10px; margin-top: 14px; accent-color: var(--ant-primary); }
.danger-text { color: var(--ant-error); }
@media(max-width:800px){.rebuild-job-summary{grid-template-columns:1fr}}

.status-badge, .status-pill, .review-pill {
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 2px 8px;
    line-height: 20px;
}
.status-ready, .status-approved, .review-revised, .review-passed { border-color: #b7eb8f; background: #f6ffed; color: #389e0d !important; }
.status-processing, .status-executing { border-color: #91caff; background: #e6f4ff; color: #0958d9; }
.status-failed, .status-rejected { border-color: #ffccc7; background: #fff2f0; color: #cf1322; }
.review-warning, .review-unavailable { border-color: #ffe58f; background: #fffbe6; color: #ad6800 !important; }
.ok { color: #389e0d; }
.pending { color: #d48806; }
.error-text { color: #cf1322; }

.chat-workspace { height: calc(100vh - 64px); display: grid; grid-template-columns: 236px minmax(0, 1fr); max-width: 1320px; margin: auto; transition: grid-template-columns .2s ease; }
.chat-page { width: 100%; min-width: 0; max-width: 1080px; background: transparent; }
.chat-history { display: grid; min-width: 0; grid-template-rows: auto minmax(0, 1fr) auto; margin: 18px 0 18px 18px; overflow: hidden; border: 1px solid var(--ant-border-secondary); border-radius: var(--ant-radius-lg); background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .025); transition: margin .2s ease, opacity .14s ease, visibility .14s ease; }
.chat-history-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 14px 11px; border-bottom: 1px solid var(--ant-border-secondary); }
.chat-history-head strong { color: var(--ant-text); font-size: 14px; }
.chat-history-head button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 1px solid var(--ant-border); border-radius: 6px; background: #fff; color: var(--ant-text-secondary); cursor: pointer; }
.chat-history-head button:hover { border-color: var(--ant-primary-hover); color: var(--ant-primary); }
.chat-history-list { min-height: 0; padding: 6px; overflow: auto; }
.chat-history-row { position: relative; margin: 2px 0; }
.chat-history-item { display: grid; width: 100%; gap: 4px; margin: 0; padding: 10px 38px 10px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; }
.chat-history-item:hover { background: var(--ant-fill-secondary); }
.chat-history-item.active { border-color: #91caff; background: #e6f4ff; }
.chat-history-item strong, .chat-history-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-history-item strong { color: var(--ant-text); font-size: 13px; font-weight: 500; }
.chat-history-item span, .chat-history-item small { color: var(--ant-text-tertiary); font-size: 10px; }
.chat-history-archive { position: absolute; z-index: 1; top: 8px; right: 7px; display: grid; width: 26px; height: 26px; padding: 0; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--ant-text-tertiary); cursor: pointer; opacity: .72; transition: opacity .15s ease, background .15s ease, color .15s ease; }
.chat-history-archive:hover, .chat-history-archive:focus-visible { background: var(--ant-fill); color: var(--ant-primary); opacity: 1; }
.chat-history-archive svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.chat-history-empty { padding: 28px 12px; color: var(--ant-text-tertiary); font-size: 12px; text-align: center; }
.chat-history-sentinel { display: flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px; padding: 9px 6px; color: var(--ant-text-tertiary); font-size: 11px; text-align: center; }
.chat-history-sentinel button { height: 25px; padding: 0 8px; border: 1px solid var(--ant-border); border-radius: 5px; background: #fff; color: var(--ant-primary); cursor: pointer; }
.history-loading-dot { width: 12px; height: 12px; border: 2px solid #bae0ff; border-top-color: var(--ant-primary); border-radius: 50%; animation: history-spin .75s linear infinite; }
@keyframes history-spin { to { transform: rotate(360deg); } }
.chat-head-copy { flex: 1; min-width: 0; }
.chat-history-collapse-toggle, .chat-history-toggle { height: 32px; align-items: center; justify-content: center; border: 1px solid var(--ant-border); border-radius: 6px; background: #fff; color: var(--ant-text-secondary); cursor: pointer; }
.chat-history-collapse-toggle { display: grid; width: 32px; flex: 0 0 32px; padding: 0; }
.chat-history-toggle { display: none; gap: 6px; padding: 0 10px; }
.chat-history-collapse-toggle:hover, .chat-history-toggle:hover { border-color: var(--ant-primary-hover); color: var(--ant-primary); }
@media (min-width: 801px) {
    .chat-workspace.history-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
    .chat-workspace.history-collapsed .chat-history { margin-left: 0; border-width: 0; opacity: 0; visibility: hidden; pointer-events: none; }
}
.chat-head { gap: 12px; padding: 30px 34px 18px; }
.agent-icon, .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: var(--ant-radius-lg);
    background: linear-gradient(135deg, #4096ff, #0958d9);
    box-shadow: 0 4px 12px rgba(22, 119, 255, .22);
}
.chat-head h1 { color: var(--ant-text); font-size: 20px; font-weight: 600; }
.chat-head p { color: var(--ant-text-secondary); }
.conversation { padding: 18px 34px 24px; }
.bubble {
    border-color: var(--ant-border-secondary);
    border-radius: 4px 12px 12px 12px;
    color: var(--ant-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .045);
}
.bubble p { color: var(--ant-text-secondary); }
.message.user .bubble { border-color: #91caff; border-radius: 12px 4px 12px 12px; background: #e6f4ff; color: var(--ant-text); }
.starter-grid { gap: 14px; }
.starter-grid button {
    min-height: 82px;
    padding: 16px 18px;
    border-color: var(--ant-border-secondary);
    border-radius: var(--ant-radius-lg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .025);
}
.starter-grid button:hover { border-color: var(--ant-primary-hover); background: #f0f7ff; box-shadow: 0 4px 12px rgba(22, 119, 255, .08); transform: translateY(-1px); }
.starter-grid strong { color: var(--ant-text); font-weight: 600; }
.starter-grid span { color: var(--ant-text-secondary); }
.composer {
    min-height: 92px;
    margin: 12px 34px 24px;
    padding: 11px 11px 27px;
    border-color: var(--ant-border);
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .08);
}
.composer:focus-within { border-color: var(--ant-primary-hover); box-shadow: 0 0 0 2px rgba(5, 145, 255, .1), 0 8px 26px rgba(0, 0, 0, .08); }
.composer textarea { border: 0 !important; box-shadow: none !important; }
.composer small { color: var(--ant-text-tertiary); }
.attach { width: 36px; height: 36px; border: 1px solid var(--ant-border-secondary); border-radius: var(--ant-radius); background: var(--ant-fill-secondary); color: var(--ant-text-secondary); }
.attach:hover { border-color: var(--ant-primary-hover); background: #e6f4ff; color: var(--ant-primary); }
.image-file-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.message-images{display:grid;grid-template-columns:repeat(2,minmax(0,180px));gap:8px;margin-bottom:10px}.message-images button{padding:0;border:0;border-radius:8px;overflow:hidden;background:#f0f0f0;cursor:zoom-in}.message-images img{display:block;width:100%;height:132px;object-fit:cover}.composer-images{grid-column:1/-1;display:flex;gap:8px;padding:0 2px 3px}.composer-images>div{position:relative;width:68px;height:68px}.composer-images img{width:100%;height:100%;object-fit:cover;border:1px solid var(--ant-border-secondary);border-radius:7px}.composer-images button{position:absolute;right:-5px;top:-6px;width:20px;height:20px;padding:0;border:0;border-radius:50%;background:#1f1f1f;color:#fff;cursor:pointer}.image-lightbox{position:fixed;z-index:1000;inset:0;display:grid;place-items:center;padding:42px;background:#000c}.image-lightbox img{max-width:min(94vw,1400px);max-height:90vh;border-radius:8px;box-shadow:0 18px 70px #0008}.image-lightbox-close{position:fixed;right:24px;top:18px;width:40px;height:40px;border:0;border-radius:50%;background:#fff2;color:#fff;font-size:28px;cursor:pointer}.compact-notice{margin-top:14px;padding:10px 12px;font-size:12px}
.usage-filter-bar{display:grid;grid-template-columns:minmax(230px,1fr) 170px 170px auto;gap:12px;align-items:end;padding:16px;margin-bottom:16px}.usage-filter-bar label{display:grid;gap:6px;color:var(--ant-text-secondary);font-size:12px}.usage-filter-bar input{height:38px}.usage-presets{display:flex;gap:6px}.usage-presets button{height:38px;padding:0 14px;border:1px solid var(--ant-border);border-radius:6px;background:#fff;color:var(--ant-text-secondary);cursor:pointer}.usage-presets button.active{border-color:var(--ant-primary);background:var(--ant-primary-bg);color:var(--ant-primary)}.usage-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.usage-metrics .metric-panel strong{font-size:21px}.usage-trend-card{padding:20px;margin-bottom:24px}.usage-section-head{display:flex;align-items:flex-end;justify-content:space-between;margin:0 0 12px}.usage-section-head h2{margin:0 0 5px;font-size:18px}.usage-section-head p{margin:0;color:var(--ant-text-secondary);font-size:12px}.usage-chart-toggle{display:flex;padding:3px;border:1px solid var(--ant-border);border-radius:7px;background:#fafafa}.usage-chart-toggle button{height:30px;padding:0 13px;border:0;border-radius:5px;background:transparent;color:var(--ant-text-secondary);cursor:pointer}.usage-chart-toggle button.active{background:#fff;color:var(--ant-primary);box-shadow:0 1px 4px #00000014}.usage-column-chart{display:flex;align-items:stretch;gap:8px;height:260px;margin-top:20px;padding:10px 4px 0;overflow-x:auto;border-bottom:1px solid var(--ant-border-secondary)}.usage-column{display:grid;grid-template-rows:22px 1fr 30px;flex:1 0 44px;min-width:44px;max-width:72px;height:100%;text-align:center}.usage-column>strong{overflow:hidden;color:var(--ant-text-secondary);font-size:10px;font-weight:500;text-overflow:ellipsis}.usage-column-track{display:flex;align-items:flex-end;justify-content:center;min-height:0}.usage-column-track i{display:block;width:min(30px,72%);min-height:2px;border-radius:5px 5px 0 0;background:linear-gradient(180deg,#69b1ff,#1677ff);transition:height .2s ease}.usage-column time{padding-top:7px;color:var(--ant-text-secondary);font-size:10px;white-space:nowrap}.usage-empty{padding:28px 0;color:var(--ant-text-secondary);text-align:center}.usage-table .table-head,.usage-table .table-row{grid-template-columns:1.45fr .9fr .9fr .9fr .65fr;align-items:center}.usage-table .table-row small{display:block;margin-top:4px;color:var(--ant-text-secondary)}.usage-table a{color:var(--ant-primary);text-decoration:none}@media(max-width:1000px){.usage-filter-bar{grid-template-columns:1fr 1fr}.usage-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.usage-table{overflow:auto}.usage-table .table-head,.usage-table .table-row{min-width:900px}}@media(max-width:640px){.usage-filter-bar,.usage-metrics{grid-template-columns:1fr}.usage-section-head{align-items:flex-start;gap:12px}.usage-column-chart{height:230px}}
.send { min-width: 68px; height: 42px; align-self: center; }
.trace-card { border-color: var(--ant-border-secondary); border-radius: var(--ant-radius-lg); box-shadow: none; }
.inline-approval-card { border-color: #ffe58f; border-left-color: var(--ant-warning); border-radius: var(--ant-radius-lg); background: #fffbe6; }
.approval-effect { border: 1px solid #ffe58f; background: #fff7e6; color: #d46b08; }
.revision-context-card { border-color: #91caff; border-left-color: var(--ant-primary); border-radius: var(--ant-radius-lg); background: #e6f4ff; }

.approval-row { padding: 18px 20px; }
.approval-row:hover { border-color: #d6e4ff; box-shadow: 0 3px 10px rgba(0, 0, 0, .04); }
.artifact-list { gap: 18px; }
.artifact-card { border-radius: var(--ant-radius-lg); }
.artifact-card:hover { border-color: #91caff; box-shadow: var(--ant-shadow-card); transform: translateY(-1px); }
.artifact-card-thumb, .chat-artifact-thumb { border-color: #bae0ff; background: #e6f4ff; color: #0958d9; box-shadow: inset 0 0 0 4px #fff; }
.artifact-status-line, .chat-artifact-copy span { color: var(--ant-primary); }
.artifact-status-line em, .chat-artifact-copy span em { border: 1px solid #91caff; border-radius: 4px; background: #e6f4ff; }
.artifact-card-footer { border-color: var(--ant-border-secondary); background: var(--ant-fill-secondary); }
.artifact-list-page-hidden { display: none; }
.artifact-detail-page { max-width: 1400px; }
.artifact-detail-surface { overflow: hidden; border: 1px solid var(--ant-border-secondary); border-radius: var(--ant-radius-lg); background: var(--ant-layout-bg); box-shadow: 0 1px 2px rgba(0, 0, 0, .025); }
.artifact-detail-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 26px 18px; border-bottom: 1px solid var(--ant-border-secondary); background: #fff; }
.artifact-detail-head h2 { margin: 5px 0 6px; color: var(--ant-text); font-size: 20px; font-weight: 600; }
.artifact-detail-head p { margin: 0; color: var(--ant-text-tertiary); font-size: 12px; }
.detail-kicker { color: var(--ant-primary); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.artifact-detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--ant-border-secondary); background: #fff; }
.artifact-detail-actions { display: flex; align-items: center; gap: 4px; }
.artifact-detail-actions .secondary, .detail-download { min-height: 34px; white-space: nowrap; }
.feedback-action, .icon-action { border-radius: var(--ant-radius); color: var(--ant-text-secondary); }
.action-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.action-icon-dislike { transform: rotate(180deg); }
.feedback-action:hover, .icon-action:hover { background: #e6f4ff; color: var(--ant-primary); }
.feedback-action.active { background: #e6f4ff; color: var(--ant-primary); }
.feedback-action.active.dislike { background: #fff2f0; color: var(--ant-error); }
.chat-artifact-card { border-color: var(--ant-border-secondary); border-radius: var(--ant-radius-lg); box-shadow: 0 2px 8px rgba(0, 0, 0, .045); }
.drawer-close { border: 1px solid transparent; border-radius: var(--ant-radius); background: transparent; color: var(--ant-text-secondary); }
.drawer-close:hover { border-color: var(--ant-border); background: var(--ant-fill); color: var(--ant-text); }
.artifact-preview-stage iframe, .artifact-detail-card, .docx-preview-placeholder { border-color: var(--ant-border-secondary); border-radius: var(--ant-radius-lg); }
.artifact-detail-card { box-shadow: 0 1px 2px rgba(0, 0, 0, .025); }
.finding-item, .evidence-item { border-color: var(--ant-border-secondary); border-radius: var(--ant-radius); }
.evidence-item summary { background: var(--ant-fill-secondary); }
.revision-suggestion { border-color: #ffe58f; border-radius: var(--ant-radius-lg); background: #fffbe6; }

.auth-shell { background: radial-gradient(circle at 20% 12%, #e6f4ff 0, transparent 34%), linear-gradient(145deg, #f5f5f5, #fafafa); }
.auth-card { border-color: var(--ant-border-secondary); border-radius: 12px; box-shadow: var(--ant-shadow-card); }
.auth-brand { padding-bottom: 18px; border-bottom: 1px solid var(--ant-border-secondary); }
.auth-card h1 { color: var(--ant-text); font-size: 22px; font-weight: 600; }
.auth-hint { color: var(--ant-text-secondary); }
.auth-card input:not([type="checkbox"]) { height: 40px; }
.auth-submit { min-height: 40px; }

@media (max-width: 1000px) {
    .content-page { padding-inline: 24px; }
    .settings-grid { gap: 14px; }
}

@media (max-width: 800px) {
    .app-shell, .app-shell.sidebar-collapsed { grid-template-columns: 68px minmax(0, 1fr); }
    .sidebar { padding-inline: 8px; }
    .brand { justify-content: center; padding-inline: 0; }
    .brand-copy, .sidebar nav a .nav-text, .nav-label, .sidebar-foot { display: none; }
    .sidebar-collapse-trigger { display: none; }
    .sidebar nav a, .sidebar nav a:not(.active) { justify-content: center; padding: 0; font-size: inherit; }
    .nav-icon { width: 18px; height: 18px; flex-basis: 18px; }
    .topbar { padding-inline: 18px; }
    .content-page { padding: 22px 18px 36px; }
    .chat-head, .conversation { padding-inline: 20px; }
    .composer { margin-inline: 20px; }
    .chat-workspace { grid-template-columns: minmax(0, 1fr); }
    .chat-history { display: none; position: fixed; z-index: 90; top: 66px; bottom: 10px; left: 72px; width: min(280px, calc(100vw - 92px)); margin: 0; box-shadow: var(--ant-shadow-card); }
    .chat-history.open { display: grid; }
    .chat-history-collapse-toggle { display: none; }
    .chat-history-toggle { display: inline-flex; align-items: center; }
    .settings-card { padding: 19px; }
    .artifact-detail-toolbar { align-items: flex-start; flex-direction: column; }
    .artifact-detail-actions { width: 100%; justify-content: flex-end; }
}

@media (max-width: 600px) {
    .app-shell, .app-shell.sidebar-collapsed { grid-template-columns: 58px minmax(0, 1fr); }
    .sidebar { padding-inline: 6px; }
    .brand-logo { width: 30px; height: 30px; }
    .topbar { height: 58px; padding-inline: 14px; }
    .workspace { grid-template-rows: 58px minmax(0, 1fr); }
    .workspace-title small, .account-menu > span:not(.avatar) { display: none; }
    .account-menu { gap: 2px; }
    .chat-page { height: calc(100vh - 58px); }
    .chat-workspace { height: calc(100vh - 58px); }
    .chat-history { top: 60px; left: 62px; width: min(270px, calc(100vw - 72px)); }
    .chat-head { padding: 22px 14px 12px; }
    .conversation { padding: 12px 14px 18px; }
    .composer { margin: 9px 12px 14px; }
    .content-page { padding: 18px 14px 30px; }
    .page-title h1 { font-size: 21px; }
    .page-title > .primary, .page-title > .secondary, .page-title > .upload-button { width: 100%; }
    .admin-tabs { gap: 18px; }
    .operations-hero { padding: 20px; }
    .operations-hero h2 { font-size: 23px; }
    .artifact-detail-head { padding: 18px; }
    .artifact-detail-toolbar { padding: 12px 18px; }
    .artifact-detail-actions { flex-wrap: wrap; }
}

.page-actions, .table-actions { display: flex; align-items: center; gap: 8px; }
.table-actions { flex-wrap: wrap; }
.table-actions .secondary { min-height: 30px; padding: 2px 10px; font-size: 12px; }
.summary-card { display: flex; min-height: 126px; flex-direction: column; justify-content: center; }
.summary-card > span { color: var(--ant-text-secondary); font-size: 12px; }
.summary-card > strong { display: block; margin: 8px 0 5px; overflow: hidden; color: var(--ant-text); font-size: 20px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.summary-card > small { overflow: hidden; color: var(--ant-text-tertiary); text-overflow: ellipsis; white-space: nowrap; }
.form-drawer-layer { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: flex-end; }
.form-drawer-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(0, 0, 0, .45); cursor: default; animation: drawer-fade-in .2s ease-out; }
.form-drawer { position: relative; display: grid; width: min(520px, calc(100vw - 72px)); height: 100vh; grid-template-rows: auto minmax(0, 1fr) auto; background: #fff; box-shadow: -6px 0 16px rgba(0, 0, 0, .12); animation: drawer-slide-in .22s ease-out; }
.form-drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 24px 18px; border-bottom: 1px solid var(--ant-border-secondary); }
.form-drawer-header h2 { margin: 0; color: var(--ant-text); font-size: 18px; font-weight: 600; line-height: 1.45; }
.form-drawer-header p { margin: 6px 0 0; color: var(--ant-text-secondary); font-size: 12px; line-height: 1.65; }
.form-drawer-body { min-height: 0; overflow: auto; padding: 22px 24px 30px; }
.form-drawer-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 64px; padding: 12px 24px; border-top: 1px solid var(--ant-border-secondary); background: #fff; }
.drawer-form { display: grid; gap: 17px; }
.drawer-form label { display: grid; gap: 7px; color: var(--ant-text-secondary); font-size: 13px; }
.drawer-form input:not([type="checkbox"]), .drawer-form select { width: 100%; height: 38px; padding: 4px 11px; }
.drawer-form .switch-row { display: flex; align-items: center; gap: 8px; }
.drawer-help { padding: 11px 13px; border: 1px solid #d6e4ff; border-radius: var(--ant-radius); background: #f0f5ff; color: #2f54eb; font-size: 12px; line-height: 1.65; }
.drawer-form-sections { gap: 28px; }
.drawer-form-sections section + section { padding-top: 25px; border-top: 1px solid var(--ant-border-secondary); }
.drawer-form-sections h3 { margin: 0 0 17px; color: var(--ant-text); font-size: 15px; font-weight: 600; }
.drawer-form-sections section { display: grid; gap: 17px; }
.profile-loading { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 12px; color: var(--ant-text-secondary); }
.profile-loading p { margin: 0; font-size: 13px; }
.loading-spinner { width: 24px; height: 24px; border: 3px solid #bae0ff; border-top-color: var(--ant-primary); border-radius: 50%; animation: history-spin .75s linear infinite; }
.profile-empty { display: grid; min-height: 280px; place-items: center; align-content: center; padding: 30px 18px; text-align: center; }
.profile-empty-icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; background: #e6f4ff; color: var(--ant-primary); }
.profile-empty-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.profile-empty h3 { margin: 17px 0 7px; color: var(--ant-text); font-size: 16px; font-weight: 600; }
.profile-empty p { max-width: 350px; margin: 0; color: var(--ant-text-secondary); font-size: 13px; line-height: 1.7; }
.collaboration-profile { display: grid; gap: 16px; }
.profile-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ant-text-tertiary); font-size: 12px; }
.profile-field-list { display: grid; gap: 10px; }
.profile-field-list article { padding: 15px 16px; border: 1px solid var(--ant-border-secondary); border-radius: var(--ant-radius-lg); background: #fafafa; }
.profile-field-list article > span { color: var(--ant-text-tertiary); font-size: 11px; }
.profile-field-list article > p { margin: 6px 0 0; color: var(--ant-text); font-size: 13px; line-height: 1.7; }
.profile-updated { color: var(--ant-text-tertiary); font-size: 11px; text-align: right; }
.profile-privacy-tip { margin-top: 20px; }
@keyframes drawer-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawer-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }

@media (max-width: 600px) {
    .page-actions { width: 100%; flex-wrap: wrap; }
    .page-actions > button { flex: 1; }
    .form-drawer { width: calc(100vw - 58px); }
    .form-drawer-header, .form-drawer-body, .form-drawer-footer { padding-inline: 18px; }
    .form-drawer-footer { flex-wrap: wrap; }
}

/* Document library · role/audience experience */
.documents-page { max-width: 1320px; }
.document-upload-panel { margin-bottom: 18px; padding: 22px; }
.document-upload-panel.is-collapsed { padding-block: 18px; }
.document-upload-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.document-upload-panel.is-collapsed .document-upload-head { margin-bottom: 0; }
.document-upload-head h2 { margin: 0; color: var(--ant-text); font-size: 17px; font-weight: 600; }
.document-upload-head p { margin: 5px 0 0; color: var(--ant-text-secondary); font-size: 12px; }
.document-upload-controls { display: flex; align-items: flex-end; gap: 10px; }
.document-audience-field { display: grid; min-width: 170px; gap: 5px; color: var(--ant-text-secondary); font-size: 11px; }
.document-audience-field > span { padding-left: 1px; }
.document-upload-head select, .document-row-actions select { height: 34px; padding: 4px 28px 4px 10px; }
.document-collapse-button { height: 34px; padding-inline: 11px; background: var(--ant-fill-secondary); }
.document-collapse-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.document-collapse-button[aria-expanded="false"] svg { transform: rotate(180deg); }
.document-drop-zone { position: relative; display: flex; min-height: 146px; align-items: center; justify-content: center; flex-direction: column; gap: 8px; border: 1px dashed #91caff; border-radius: var(--ant-radius-lg); background: #fafcff; color: var(--ant-text-secondary); cursor: pointer; transition: border-color .2s, background .2s; }
.document-drop-zone:hover { border-color: var(--ant-primary); background: #f0f7ff; }
.document-drop-zone.is-busy { opacity: .66; cursor: wait; }
.document-drop-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: inherit; }
.document-drop-zone svg { width: 36px; height: 36px; fill: none; stroke: var(--ant-primary); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.document-drop-zone strong { color: var(--ant-text); font-size: 14px; font-weight: 500; }
.document-drop-zone span { max-width: 680px; padding-inline: 18px; text-align: center; font-size: 12px; }
.document-upload-queue { display: grid; margin-top: 16px; border: 1px solid var(--ant-border-secondary); border-radius: var(--ant-radius); }
.document-queue-item { display: grid; min-width: 0; grid-template-columns: 42px minmax(0, 1fr) minmax(110px, auto) 30px; align-items: center; gap: 12px; padding: 10px 13px; }
.document-queue-item + .document-queue-item { border-top: 1px solid var(--ant-border-secondary); }
.document-file-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 7px; background: #e6f4ff; color: var(--ant-primary); font-size: 9px; font-weight: 700; letter-spacing: .2px; }
.document-queue-info { min-width: 0; }
.document-queue-info strong, .document-queue-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-queue-info strong { color: var(--ant-text); font-size: 13px; font-weight: 500; }
.document-queue-info small { margin-top: 3px; color: var(--ant-text-tertiary); font-size: 11px; }
.document-queue-state { max-width: 300px; overflow: hidden; color: var(--ant-text-secondary); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.document-queue-state.processing { color: var(--ant-primary); }
.document-queue-state.ready { color: var(--ant-success); }
.document-queue-state.failed { color: var(--ant-error); }
.document-upload-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.document-upload-actions > span { margin-left: auto; color: var(--ant-text-tertiary); font-size: 12px; }
.document-toolbar { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--ant-border-secondary); border-radius: var(--ant-radius-lg); background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .025); }
.document-search-field { position: relative; min-width: 220px; max-width: 440px; flex: 1 1 340px; }
.document-search-field > svg { position: absolute; z-index: 1; top: 50%; left: 11px; width: 16px; height: 16px; fill: none; stroke: var(--ant-text-tertiary); stroke-width: 1.7; stroke-linecap: round; transform: translateY(-50%); pointer-events: none; }
.document-search-field input { width: 100%; height: 36px; padding: 4px 32px 4px 35px; }
.document-search-field:focus-within > svg { stroke: var(--ant-primary); }
.document-sort { display: flex; height: 36px; align-items: center; overflow: hidden; border: 1px solid var(--ant-border); border-radius: var(--ant-radius); background: #fff; white-space: nowrap; }
.document-sort:focus-within { border-color: var(--ant-primary-hover); box-shadow: 0 0 0 2px rgba(5, 145, 255, .1); }
.document-sort-prefix { display: inline-flex; align-items: center; gap: 6px; padding: 0 9px 0 10px; border-right: 1px solid var(--ant-border-secondary); color: var(--ant-text-tertiary); font-size: 11px; }
.document-sort-prefix svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.document-sort select { height: 34px; min-width: 165px; padding: 4px 28px 4px 10px; border: 0 !important; border-radius: 0 !important; background: transparent; color: var(--ant-text-secondary); outline: 0; box-shadow: none !important; }
.document-sort select:focus { border: 0 !important; box-shadow: none !important; }
.document-search-button { height: 36px; padding-inline: 16px; }
.document-search-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.document-clear-button { min-height: 34px; padding: 4px 7px; white-space: nowrap; }
.link-button { border: 0; background: transparent; color: var(--ant-primary); cursor: pointer; }
.document-delete-confirm { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.document-delete-confirm > span:last-child { display: flex; gap: 8px; }
.document-library-table { min-width: 0; max-width: 100%; }
.document-library-table .table-head, .document-library-table .table-row { grid-template-columns: minmax(190px, 1.35fr) minmax(145px, .8fr) minmax(145px, .9fr) minmax(125px, .65fr) minmax(245px, 1.25fr); }
.document-file-cell { display: flex; min-width: 0; align-items: center; gap: 11px; }
.document-file-cell > span:last-child { min-width: 0; }
.document-file-cell strong, .document-file-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-status-cell { min-width: 0; }
.document-status-head { display: flex; width: min(150px, 100%); align-items: center; justify-content: space-between; gap: 8px; }
.document-status-head em { color: var(--ant-text-tertiary); font-size: 10px; font-style: normal; font-variant-numeric: tabular-nums; }
.document-status-cell > small { display: block; margin-top: 6px; }
.document-stage { display: block; width: min(130px, 100%); height: 3px; margin-top: 7px; overflow: hidden; border-radius: 3px; background: #f0f0f0; }
.document-stage i { display: block; height: 100%; border-radius: inherit; background: var(--ant-primary); }
.document-stage.is-indeterminate i { animation: document-progress-indeterminate 1.25s ease-in-out infinite; }
@keyframes document-progress-indeterminate {
    0% { transform: translateX(-115%); }
    55% { transform: translateX(115%); }
    100% { transform: translateX(315%); }
}
.status-failed + .document-stage i { background: var(--ant-error); }
.status-ready + .document-stage i { background: var(--ant-success); }
.audience-badge { display: inline-flex; width: max-content; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.audience-private { background: #f5f5f5; color: #595959; }
.audience-internal { background: #fff7e6; color: #ad6800; }
.audience-all_users { background: #e6f4ff; color: #0958d9; }
.document-row-actions { align-items: center; flex-wrap: wrap; }
.document-row-actions select { max-width: 82px; font-size: 12px; }
.document-row-actions .secondary { white-space: nowrap; }
.icon-action { display: inline-grid; width: 28px; height: 28px; padding: 0; place-items: center; border: 0; border-radius: var(--ant-radius); background: transparent; color: var(--ant-text-tertiary); cursor: pointer; }
.icon-action:hover { background: var(--ant-fill); }
.icon-action.danger:hover { background: #fff1f0; color: var(--ant-error); }

@media (max-width: 1000px) {
    .document-library-table { overflow: visible; border: 0; background: transparent; box-shadow: none; }
    .document-library-table .table-head { display: none; }
    .document-library-table .table-row {
        min-width: 0;
        grid-template-columns: minmax(0, 1.5fr) minmax(190px, .75fr);
        grid-template-areas:
            "file status"
            "audience meta"
            "actions actions";
        gap: 14px 22px;
        margin-bottom: 12px;
        padding: 16px 18px;
        border: 1px solid var(--ant-border-secondary);
        border-radius: var(--ant-radius-lg);
        background: #fff;
        box-shadow: var(--ant-shadow-sm);
    }
    .document-library-table .table-row + .table-row { border-top: 1px solid var(--ant-border-secondary); }
    .document-file-cell { grid-area: file; }
    .document-status-cell { grid-area: status; }
    .document-audience-cell { grid-area: audience; }
    .document-meta-cell { grid-area: meta; text-align: right; }
    .document-row-actions { grid-area: actions; padding-top: 12px; border-top: 1px solid var(--ant-border-secondary); }
    .document-row-actions select { max-width: 180px; }
    .document-audience-cell::before, .document-meta-cell::before {
        display: block;
        margin-bottom: 5px;
        color: var(--ant-text-tertiary);
        font-size: 10px;
    }
    .document-audience-cell::before { content: "可见范围 / 所有者"; }
    .document-meta-cell::before { content: "大小 / 导入时间"; }
}

@media (max-width: 600px) {
    .document-upload-panel { padding: 16px; }
    .document-upload-panel.is-collapsed { padding-block: 15px; }
    .document-upload-head { align-items: stretch; flex-direction: column; gap: 14px; }
    .document-upload-controls { width: 100%; }
    .document-audience-field { min-width: 0; flex: 1 1 auto; }
    .document-collapse-button { flex: 0 0 auto; }
    .document-drop-zone { min-height: 132px; }
    .document-queue-item { grid-template-columns: 38px minmax(0, 1fr) 28px; }
    .document-queue-state { grid-column: 2 / 3; }
    .document-upload-actions { align-items: stretch; flex-direction: column; }
    .document-upload-actions > span { margin-left: 0; }
    .document-delete-confirm { align-items: stretch; flex-direction: column; }
    .document-toolbar { align-items: stretch; flex-wrap: wrap; padding: 10px; }
    .document-search-field { width: 100%; min-width: 0; max-width: none; flex: 1 1 100%; }
    .document-sort { min-width: 0; flex: 1 1 100%; }
    .document-sort select { min-width: 0; flex: 1; }
    .document-search-button { flex: 1 1 auto; }
    .document-library-table .table-row {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "file" "status" "audience" "meta" "actions";
        gap: 13px;
        padding: 16px;
    }
    .document-library-table .table-row > span { min-width: 0; }
    .document-meta-cell { text-align: left; }
    .document-row-actions select { max-width: none; flex: 1 1 100%; }
}

/* Conversation actions and model work trace · aligned with ThingX Flutter Web */
.message-meta { gap: 2px; }
.message-meta time { margin-right: 5px; }
.message-meta .message-action {
    display: inline-grid;
    width: 24px;
    height: 24px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ant-text-tertiary);
}
.message-meta .message-action svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.message-meta .message-action:hover,
.message-meta .message-action.active,
.message-meta .message-action.dislike {
    background: var(--ant-fill-secondary);
    color: var(--ant-primary);
}
.message-meta .message-action[aria-pressed="false"] { background: transparent; color: var(--ant-text-tertiary); }
.message-meta .message-action .thumb-icon.filled { fill: currentColor; stroke: currentColor; }
.message-meta .message-action .thumb-down { transform: rotate(180deg); transform-origin: center; }
.message-action-divider { width: 1px; height: 14px; margin: 0 4px; background: var(--ant-border-secondary); }

.thinking-panel {
    width: min(520px, calc(100% - 42px));
    margin: 10px 0 18px;
    overflow: hidden;
    border: 1px solid var(--ant-border-secondary);
    border-radius: 12px 12px 12px 4px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .02);
}
.thinking-panel-head {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border: 0;
    background: transparent;
    color: var(--ant-text);
    text-align: left;
    cursor: pointer;
}
.thinking-panel-head:hover { background: #fafafa; }
.thinking-activity {
    position: relative;
    display: grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    place-items: center;
    border-radius: 50%;
    color: var(--ant-primary);
}
.thinking-activity i {
    width: 14px;
    height: 14px;
    border: 2px solid #bae0ff;
    border-top-color: var(--ant-primary);
    border-radius: 50%;
    animation: thinking-spin .85s linear infinite;
}
.thinking-activity svg,
.thinking-step-marker svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.thinking-panel.is-complete .thinking-activity { color: var(--ant-text-tertiary); }
.thinking-panel-copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.thinking-panel-copy strong { overflow: hidden; font-size: 13.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.thinking-panel-copy small { overflow: hidden; color: var(--ant-text-secondary); font-size: 12px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.thinking-chevron {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: var(--ant-text-tertiary);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
}
.thinking-chevron.is-expanded { transform: rotate(180deg); }
.thinking-trace { position: relative; padding: 2px 14px 12px 41px; border-top: 1px solid var(--ant-border-secondary); }
.thinking-step { position: relative; display: flex; min-height: 42px; align-items: flex-start; gap: 9px; padding: 10px 0 5px; }
.thinking-step:not(:last-child)::after { position: absolute; top: 27px; bottom: -10px; left: 7px; width: 1px; background: var(--ant-border-secondary); content: ""; }
.thinking-step-marker { z-index: 1; display: grid; width: 15px; height: 15px; flex: 0 0 15px; place-items: center; border: 2px solid #91caff; border-radius: 50%; background: #fff; color: var(--ant-primary); }
.thinking-step.trace-running .thinking-step-marker { border-width: 0; background: var(--ant-primary); box-shadow: 0 0 0 4px #e6f4ff; animation: thinking-pulse 1.25s ease-in-out infinite; }
.thinking-step.trace-completed .thinking-step-marker { border: 0; color: var(--ant-success); }
.thinking-step.trace-failed .thinking-step-marker { border-color: var(--ant-error); background: #fff1f0; }
.thinking-step-copy { display: grid; min-width: 0; gap: 2px; }
.thinking-step-copy strong { color: var(--ant-text); font-size: 12.5px; font-weight: 500; line-height: 1.35; }
.thinking-step-copy small { color: var(--ant-text-tertiary); font-size: 11.5px; line-height: 1.4; }
@keyframes thinking-spin { to { transform: rotate(360deg); } }
@keyframes thinking-pulse { 50% { opacity: .55; transform: scale(.86); } }

@media (max-width: 600px) {
    .thinking-panel { width: calc(100% - 10px); }
    .thinking-panel-copy small { white-space: normal; }
}

/* One assistant turn: process, answer, citations, approvals and artifacts */
.message.assistant .turn-bubble {
    width: min(820px, 100%);
    max-width: 820px;
    padding: 18px 20px;
    border-radius: 4px 14px 14px 14px;
}
.turn-supplement-before:empty,
.turn-supplement-after:empty { display: none; }
.turn-supplement-before .thinking-panel {
    width: 100%;
    margin: 0 0 17px;
    border-color: #e6f0ff;
    background: #fafcff;
    box-shadow: none;
}
.turn-supplement-after .chat-artifact-list { margin: 16px 0 0; }
.turn-supplement-after .chat-artifact-card {
    width: 100%;
    max-width: none;
    background: #fafcff;
    box-shadow: none;
}
.chat-artifact-actions > .primary,
.chat-artifact-actions > .secondary {
    height: 32px;
    min-height: 32px;
    padding: 0 12px;
    font-size: 11px;
    white-space: nowrap;
    text-decoration: none;
}
.turn-supplement-after .inline-approval-card { margin: 16px 0 0; }
.docx-sheet.xlsx-sheet { background: #f0fdf4; color: #15803d; }

/* Model endpoints · one enabled endpoint with manual switching */
.active-model-card { display: flex; min-height: 118px; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding: 22px 24px; border-color: #91caff; background: linear-gradient(120deg, #fff, #f0f7ff); }
.active-model-card.active-model-empty { border-color: var(--ant-border-secondary); background: #fff; }
.active-model-main { display: flex; min-width: 0; align-items: center; gap: 16px; }
.active-model-icon { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border-radius: 12px; background: linear-gradient(135deg, #1677ff, #69b1ff); color: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 7px 18px #1677ff2b; }
.active-model-empty .active-model-icon { background: var(--ant-fill); color: var(--ant-text-tertiary); box-shadow: none; }
.active-model-main small { color: var(--ant-text-tertiary); font-size: 11px; }
.active-model-main h2 { margin: 4px 0 5px; color: var(--ant-text); font-size: 20px; font-weight: 600; }
.active-model-main p { margin: 0; color: var(--ant-text-secondary); font-size: 12px; }
.active-model-meta { display: grid; min-width: 220px; justify-items: end; gap: 9px; }
.active-model-meta small { max-width: 360px; overflow: hidden; color: var(--ant-text-tertiary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.status-pill.success { border: 1px solid #b7eb8f; background: #f6ffed; color: #389e0d; }
.model-endpoint-section { overflow: hidden; margin-bottom: 18px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 19px 20px 16px; border-bottom: 1px solid var(--ant-border-secondary); }
.section-heading h2 { margin: 0 0 5px; color: var(--ant-text); font-size: 17px; font-weight: 600; }
.section-heading p { margin: 0; color: var(--ant-text-secondary); font-size: 12px; line-height: 1.6; }
.section-heading > span { flex: 0 0 auto; color: var(--ant-text-tertiary); font-size: 12px; }
.model-endpoint-table { overflow-x: auto; }
.model-endpoint-table .table-head, .model-endpoint-table .table-row { min-width: 1050px; grid-template-columns: minmax(180px,1.35fr) minmax(150px,1fr) minmax(110px,.7fr) 70px 108px minmax(290px,1.8fr); align-items: center; }
.model-endpoint-table .table-row { position: relative; }
.model-endpoint-table .table-row:hover { background: #fafcff; }
.model-endpoint-table .model-row-enabled { background: #f6ffed; }
.model-endpoint-table .model-row-enabled::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--ant-success); content: ""; }
.model-endpoint-table .table-row > span { min-width: 0; }
.model-endpoint-table .table-row > span > strong { display: block; overflow: hidden; color: var(--ant-text); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.model-endpoint-table .table-row > span > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.capability-tag { display: inline-flex; padding: 2px 7px; border: 1px solid #d6e4ff; border-radius: 999px; background: #f0f5ff; color: #2f54eb; font-size: 11px; }
.model-actions { justify-content: flex-end; flex-wrap: nowrap; }
.model-actions .secondary, .model-actions .primary { min-height: 30px; height: 30px; padding: 0 10px; font-size: 12px; white-space: nowrap; }
.danger-text { color: var(--ant-error); }
.table-empty { display: grid; justify-items: center; gap: 7px; padding: 52px 20px; color: var(--ant-text-secondary); text-align: center; }
.table-empty strong { color: var(--ant-text); font-size: 14px; }
.table-empty span { font-size: 12px; }
.model-endpoint-section .pagination { padding: 0 18px 16px; }
.agent-runtime-settings-card { margin-bottom: 18px; padding: 0 0 20px; }
.agent-runtime-budget-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 6px 20px 0; }
.agent-instructions-field { display: grid; gap: 7px; margin: 16px 20px 0; color: var(--ant-text-secondary); font-size: 12px; }
.agent-instructions-field textarea { width: 100%; min-height: 112px; resize: vertical; border: 1px solid var(--ant-border); border-radius: 6px; padding: 10px 12px; background: #fff; color: var(--ant-text); font: inherit; line-height: 1.65; outline: none; transition: border-color .2s, box-shadow .2s; }
.agent-instructions-field textarea:focus { border-color: var(--ant-primary); box-shadow: 0 0 0 2px #1677ff1a; }
.agent-instructions-field small, .settings-version { color: var(--ant-text-tertiary); font-size: 11px; }
.agent-runtime-settings-card > .drawer-help { margin: 14px 20px 0; }
.embedding-settings-card { margin-bottom: 18px; padding: 0; }
.embedding-settings-card .section-heading { margin-bottom: 0; }
.embedding-runtime-note { margin: 0 20px 18px; padding: 11px 13px; border: 1px solid #bae0ff; border-radius: 7px; background: #f0f8ff; color: var(--ant-text-secondary); font-size: 12px; line-height: 1.7; }
.embedding-runtime-note strong { color: var(--ant-primary); }
.embedding-fixed-summary { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1px; margin: 20px 20px 0; overflow: hidden; border: 1px solid var(--ant-border-secondary); border-radius: 10px; background: var(--ant-border-secondary); }
.embedding-fixed-summary > div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 14px 16px; background: #fafcff; }
.embedding-fixed-summary small { grid-column: 1 / -1; color: var(--ant-text-tertiary); font-size: 11px; }
.embedding-fixed-summary strong { overflow: hidden; color: var(--ant-text); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.embedding-fixed-summary span { color: var(--ant-text-secondary); font-size: 11px; }
.embedding-recommendation { margin: 14px 20px 0; padding: 10px 13px; border: 1px solid #bae0ff; border-radius: 7px; background: #e6f4ff; color: #0958d9; font-size: 12px; line-height: 1.65; }
.embedding-basic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 4px 20px 12px; }
.embedding-basic-grid .switch-card { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 16px; align-self: end; padding: 11px 13px; border: 1px solid var(--ant-border); border-radius: 7px; background: #fafafa; }
.embedding-basic-grid .switch-card span { display: grid; gap: 4px; }
.embedding-basic-grid .switch-card strong { color: var(--ant-text); font-size: 13px; font-weight: 500; }
.embedding-basic-grid .switch-card input { width: 16px; height: 16px; flex: 0 0 auto; }
.advanced-settings { margin: 0 20px 20px; border: 1px solid var(--ant-border-secondary); border-radius: 9px; background: #fafafa; }
.advanced-settings > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 15px; color: var(--ant-text); cursor: pointer; list-style: none; }
.advanced-settings > summary::-webkit-details-marker { display: none; }
.advanced-settings > summary::after { width: 7px; height: 7px; flex: 0 0 7px; border-right: 1.5px solid var(--ant-text-tertiary); border-bottom: 1.5px solid var(--ant-text-tertiary); content: ""; transform: rotate(45deg); transition: transform .18s ease; }
.advanced-settings[open] > summary::after { transform: rotate(225deg); }
.advanced-settings > summary span { font-size: 13px; font-weight: 600; }
.advanced-settings > summary small { flex: 1; color: var(--ant-text-tertiary); font-size: 11px; text-align: right; }
.advanced-settings[open] > summary { border-bottom: 1px solid var(--ant-border-secondary); }
.advanced-settings .embedding-form-grid { padding: 5px 15px 8px; }
.advanced-settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 15px 14px; }
.advanced-settings-actions span { overflow: hidden; color: var(--ant-text-tertiary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.advanced-settings-actions button { flex: 0 0 auto; }
.embedding-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 6px 20px 20px; }

@media (max-width: 900px) {
    .active-model-card, .section-heading { align-items: flex-start; flex-direction: column; }
    .active-model-meta { min-width: 0; justify-items: start; }
    .active-model-meta small { max-width: calc(100vw - 150px); }
    .embedding-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .embedding-basic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .embedding-fixed-summary { grid-template-columns: 1fr 1fr; }
    .embedding-fixed-summary > div:first-child { grid-column: 1 / -1; }
    .agent-runtime-budget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .active-model-card { padding: 18px; }
    .active-model-main { align-items: flex-start; }
    .active-model-main h2 { font-size: 17px; }
    .section-heading { gap: 13px; padding: 17px; }
    .section-heading .page-actions { width: 100%; }
    .embedding-form-grid { grid-template-columns: 1fr; padding-inline: 17px; }
    .embedding-basic-grid { grid-template-columns: 1fr; padding-inline: 17px; }
    .embedding-fixed-summary { grid-template-columns: 1fr; margin-inline: 17px; }
    .embedding-fixed-summary > div:first-child { grid-column: auto; }
    .embedding-recommendation { margin-inline: 17px; }
    .advanced-settings { margin-inline: 17px; }
    .advanced-settings > summary { align-items: flex-start; flex-wrap: wrap; }
    .advanced-settings > summary small { order: 3; flex-basis: 100%; text-align: left; }
    .advanced-settings .embedding-form-grid { padding-inline: 14px; }
    .advanced-settings-actions { align-items: flex-start; flex-direction: column; }
    .advanced-settings-actions button { width: 100%; }
    .agent-runtime-budget-grid { grid-template-columns: 1fr; padding-inline: 17px; }
    .agent-instructions-field { margin-inline: 17px; }
    .agent-runtime-settings-card > .drawer-help { margin-inline: 17px; }
}

@media (max-width: 600px) {
    .message.assistant .turn-bubble { padding: 15px; }
    .turn-supplement-before .thinking-panel { width: 100%; }
}
