*{box-sizing:border-box}html,body,#app{height:100%}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:#0b0d12;color:#e8ebf0}
.app-header{min-height:56px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 16px;border-bottom:1px solid #1b2030;background:#0e1118;position:sticky;top:0;z-index:10}
.brand{display:flex;align-items:center;gap:10px}
.logo{width:28px;height:28px;border-radius:8px;background:linear-gradient(135deg,#5eead4,#22d3ee);display:flex;align-items:center;justify-content:center;color:#0b0d12;font-weight:700}
.title{font-weight:700}
.header-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex:1}
.header-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.header-note{opacity:.75;font-size:12px}
.switch{position:relative;display:inline-block;width:42px;height:22px}
.switch input{opacity:0;width:0;height:0}
.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#394150;border-radius:22px;transition:.2s}
.slider:before{position:absolute;content:"";height:18px;width:18px;left:2px;bottom:2px;background:white;border-radius:50%;transition:.2s}
input:checked+.slider{background:#22c55e}
input:checked+.slider:before{transform:translateX(20px)}
.switch-label{opacity:.8}
.home{max-width:920px;margin:48px auto;padding:0 16px;display:flex;flex-direction:column;gap:16px}
.hero h1{margin:0 0 6px 0;font-size:28px}
.hero p{margin:0;opacity:.8}
.home-card{background:#0f1421;border:1px solid #1b2030;border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:12px}
.landing-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:10px}
.landing-card{border:1px solid #1b2030;background:#0c101a;border-radius:12px;padding:12px}
.landing-card-title{font-weight:700;margin-bottom:6px}
.landing-card-text{opacity:.85;line-height:1.6;font-size:13px}
.landing-section{margin-top:10px;padding-top:10px;border-top:1px solid #1b2030}
.landing-section-title{font-weight:700;margin-bottom:8px}
.landing-bullets{display:grid;grid-template-columns:repeat(2,1fr);gap:6px 12px;opacity:.9;font-size:13px;line-height:1.6}
.landing-flow{opacity:.9;line-height:1.6}
.hint{font-size:13px}
.modal-body .hint{font-size:13px}
.modal-body a{color:#93c5fd}
.modal-body a:hover{text-decoration:underline}
.modal-content .row{width:100%}
.modal-content input,.modal-content textarea,.modal-content select{width:100%}
@media (max-width:820px){
  .landing-grid{grid-template-columns:1fr}
  .landing-bullets{grid-template-columns:1fr}
}
.input{width:100%;height:42px;border-radius:10px;background:#0c101a;border:1px solid #1b2030;color:#e8ebf0;padding:0 12px;font-size:16px}
textarea.input{height:auto;min-height:56px;padding:10px 12px;line-height:1.6}
.input.small{width:120px}
.row{display:flex;gap:12px;align-items:center}
.btn{height:40px;padding:0 14px;border-radius:10px;border:1px solid #273046;background:#141a2a;color:#e8ebf0;cursor:pointer}
.btn.primary{background:#2563eb;border-color:#2563eb}
.btn.ghost{background:transparent;border-color:#273046}
.btn:disabled{opacity:.6;cursor:not-allowed}
.chip{height:32px;padding:0 12px;border-radius:16px;border:1px solid #273046;background:#0f1421;color:#e8ebf0;margin-right:8px;cursor:pointer}
.meeting{height:calc(100vh - 56px);display:flex;flex-direction:column}
.meeting-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:12px 16px;border-bottom:1px solid #1b2030}
.meeting-topbar .topic{font-weight:600;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.meeting-topbar .actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end;flex:0 0 auto}
.meeting-body{flex:1;display:flex;min-height:0}
.roles-panel{width:300px;border-right:1px solid #1b2030;padding:12px;overflow:auto}
.roles-list{display:grid;grid-template-columns:1fr;gap:10px}
.role-card{display:flex;gap:10px;align-items:flex-start;border:1px solid #1b2030;background:#0f1421;border-radius:10px;padding:10px}
.avatar{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#0b0d12}
.role-meta{display:flex;flex-direction:column;gap:4px}
.role-name{font-weight:700}
.role-tags{opacity:.8;font-size:12px}
.role-actions{margin-left:auto;display:flex;gap:6px}
.chat-history-panel{width:260px;border-right:1px solid #e5e7eb;background:#fff;color:#111827;display:flex;flex-direction:column}
.chat-history-top{padding:12px;border-bottom:1px solid #e5e7eb}
.chat-history-list{flex:1;overflow:auto;padding:10px;display:flex;flex-direction:column;gap:8px}
.chat-history-item{width:100%;text-align:left;border:1px solid #e5e7eb;background:#fff;border-radius:12px;padding:10px 10px;cursor:pointer}
.chat-history-item:hover{background:#f9fafb}
.chat-history-item.active{border-color:#93c5fd;background:#eff6ff}
.chat-history-title{font-weight:600;font-size:13px;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-history-sub{margin-top:4px;font-size:12px;color:#6b7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-panel{flex:1;display:flex;flex-direction:column;background:#fff;color:#111827}
.messages{flex:1;padding:20px;overflow:auto;display:flex;flex-direction:column;gap:12px;background:#fff;color:#111827}
.msg{display:flex;gap:12px;align-items:flex-start}
.msg .bubble{max-width:860px;flex:1;padding:0;border-radius:14px;background:transparent;border:none;box-shadow:none}
.msg .meta{display:flex;gap:10px;align-items:center;font-size:12px;color:#6b7280;margin:0 0 6px}
.msg .meta .time{margin-left:auto}
.msg .text{white-space:normal;line-height:1.85;font-size:15px;color:#111827;word-break:break-word;overflow-x:auto}
.msg .text p{margin:6px 0}
.msg .text h1{font-size:18px;margin:10px 0 6px}
.msg .text h2{font-size:16px;margin:10px 0 6px}
.msg .text h3{font-size:15px;margin:10px 0 6px}
.msg .text h4{font-size:14px;margin:10px 0 6px}
.msg .text ul,.msg .text ol{margin:6px 0 8px 22px;padding:0}
.msg .text li{margin:3px 0}
.msg .text blockquote{margin:8px 0;padding:8px 12px;border-left:4px solid #d1d5db;background:#f9fafb;color:#374151;border-radius:8px}
.msg .text code{background:#f3f4f6;padding:2px 4px;border-radius:4px;font-family:Consolas,monospace;font-size:13px}
.msg .text pre.md-code{margin:8px 0;padding:12px;border-radius:10px;background:#0b1020;color:#e5e7eb;overflow:auto}
.msg .text pre.md-code code{background:transparent;padding:0;color:inherit;font-size:13px}
.msg .text table{width:100%;border-collapse:collapse;margin:12px 0;font-size:14px}
.msg .text th,.msg .text td{border:1px solid #e5e5e5;padding:8px 10px;vertical-align:top}
.msg .text thead th{background:#f7f7f8;color:#111827;font-weight:600}
.msg .text tbody tr:nth-child(even){background:#fafafa}
.msg .text td code,.msg .text th code{background:#eef2ff}
.msg.user{justify-content:flex-end}
.msg.user .avatar{display:none}
.msg.user .bubble{max-width:75%;padding:12px 14px;background:#eef2ff;border:1px solid #c7d2fe;border-radius:16px}
.msg.user .meta{display:none}
.msg.system{justify-content:center}
.msg.system .avatar{display:none}
.msg.system .bubble{flex:0 1 auto;max-width:92%;padding:8px 12px;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:999px}
.msg.system .meta{display:none}
.msg.system .text{font-size:13px;color:#374151}
.composer{border-top:1px solid #e5e7eb;padding:12px;display:flex;gap:8px;align-items:center;background:#fff}
.chat-panel .input{background:#fff;border:1px solid #e5e7eb;color:#111827}
.chat-panel .btn{background:#f3f4f6;border-color:#e5e7eb;color:#111827}
.chat-panel .btn.ghost{background:transparent}
.chat-panel .btn.primary{background:#2563eb;border-color:#2563eb;color:#fff}
.composer .flex{flex:1}
.composer-actions{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.btn.mini{height:32px;padding:0 10px;font-size:13px}
.btn.loading{opacity:.8;pointer-events:none}
.role-card.thinking{background:#1f2a48;border-color:#3b6cff;box-shadow:0 0 0 2px rgba(59,108,255,.25)}
.role-card.thinking .role-name{color:#cfe1ff}
.summary{max-width:960px;margin:0 auto;height:calc(100vh - 56px);display:flex;flex-direction:column}
.summary-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:12px 0;border-bottom:1px solid #1b2030;margin:0 16px}
.summary-topbar .topic{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.summary-topbar .actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end;flex:0 0 auto}
.summary-body{flex:1;overflow:auto;padding:16px}
.summary-content{white-space:normal;background:#0f1421;border:1px solid #1b2030;border-radius:10px;padding:16px}
.summary-content h2{font-size:18px;margin:12px 0 6px;color:#e8ebf0}
.summary-content p{margin:4px 0;line-height:1.6}
.summary-content ul{margin:4px 0 8px 18px;padding:0}
.summary-content li{margin:2px 0;list-style:disc}
.modal{position:fixed;inset:0;z-index:220;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.5)}
.modal.hidden{display:none}
.modal-content{width:520px;max-width:90vw;background:#0f1421;border:1px solid #1b2030;border-radius:12px;padding:16px}
.modal-title{font-weight:700;margin-bottom:10px}
.modal-body{max-height:60vh;overflow:auto}
.drawer{position:fixed;inset:0;z-index:120}
.drawer.hidden{display:none}
.drawer-overlay{position:absolute;inset:0;background:rgba(0,0,0,.45)}
.drawer-panel{position:absolute;top:0;right:0;height:100%;width:520px;max-width:92vw;background:#0f1421;border-left:1px solid #1b2030;display:flex;flex-direction:column}
.drawer-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 14px;border-bottom:1px solid #1b2030}
.drawer-title{font-weight:700}
.drawer-close{width:40px;height:40px;border-radius:10px;border:1px solid #273046;background:transparent;color:#e8ebf0;cursor:pointer;font-size:22px;line-height:1}
.drawer-body{flex:1;overflow:auto;padding:14px}
.source-picker-top{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.source-picker-top .input{height:40px;font-size:14px}
.source-picker-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end;margin-top:10px}
.source-picker-list{margin-top:12px;border-top:1px solid #1b2030}
.source-item{display:flex;gap:10px;align-items:flex-start;padding:10px 2px;border-bottom:1px solid #1b2030}
.source-item:hover{background:rgba(255,255,255,.03)}
.source-check{margin-top:4px;width:auto;height:auto;flex:0 0 auto}
.source-main{min-width:0;flex:1}
.source-name{font-weight:700;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.source-meta{margin-top:4px;opacity:.8;font-size:12px;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-top{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:10px}
.history-top .btn{height:40px}
.history-list{margin-top:12px;border-top:1px solid #1b2030}
.history-item{display:flex;gap:10px;align-items:flex-start;padding:10px 2px;border-bottom:1px solid #1b2030}
.history-item:hover{background:rgba(255,255,255,.03)}
.history-main{min-width:0;flex:1}
.history-title{font-weight:700;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-sub{margin-top:4px;opacity:.8;font-size:12px;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;flex:0 0 auto}
.toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#141a2a;border:1px solid #1b2030;border-radius:10px;padding:10px 12px}
.toast.hidden{display:none}
.chat-shell{height:calc(100vh - 56px);display:flex;background:#fff;color:#343541}
.chat-sidebar{width:260px;background:#202123;color:#fff;display:flex;flex-direction:column;padding:10px;overflow:hidden}
.chat-sidebar-top{padding:0 0 12px 0}
.chat-new-btn{width:100%;height:40px;border-radius:8px;border:1px solid rgba(255,255,255,.2);background:transparent;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:flex-start;padding:0 12px;gap:8px;font-size:14px}
.chat-new-btn:hover{background:rgba(255,255,255,.1)}
.chat-main{flex:1;display:flex;flex-direction:column;min-width:0}
.chat-topbar{height:52px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;border-bottom:1px solid #e5e5e5;background:#fff}
.chat-topbar-left{display:flex;align-items:center;gap:8px;min-width:0}
.chat-title{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-title-hint{font-weight:700;color:#dc2626;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:52vw}
.chat-icon-btn{width:40px;height:40px;border:none;background:transparent;font-size:20px;cursor:pointer;color:#343541;border-radius:8px}
.chat-icon-btn:hover{background:#f3f4f6}
.chat-topbar-actions{display:flex;gap:8px;align-items:center}
.chat-shell .btn{background:#f3f4f6;border-color:#e5e7eb;color:#111827}
.chat-shell .btn.primary{background:#10a37f;border-color:#10a37f;color:#fff}
.chat-shell .btn:hover{background:#e5e7eb}
.chat-shell .btn.primary:hover{background:#1a7f64;border-color:#1a7f64}
.chat-history-list{flex:1;overflow:auto;display:flex;flex-direction:column;gap:2px;padding:0}
.chat-shell .chat-history-item{border:none;background:transparent;border-radius:8px;padding:8px 12px;cursor:pointer;position:relative}
.chat-shell .chat-history-item:hover{background:#2A2B32}
.chat-shell .chat-history-item.active{background:#343541}
.chat-shell .chat-history-title{font-weight:500;font-size:14px;color:#ececf1}
.chat-shell .chat-history-sub{margin-top:2px;font-size:12px;color:#a1a1aa}
.chat-history-row{display:flex;align-items:center;gap:8px}
.chat-history-main{min-width:0;flex:1}
.chat-history-del-btn{width:28px;height:28px;border-radius:8px;border:none;background:rgba(255,255,255,.08);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex:0 0 auto;font-size:18px;line-height:1;opacity:0;pointer-events:none;transition:opacity .12s ease}
.chat-shell .chat-history-item:hover .chat-history-del-btn,.chat-shell .chat-history-item:focus-within .chat-history-del-btn{opacity:.9;pointer-events:auto}
.chat-shell .chat-history-item.active:hover .chat-history-del-btn,.chat-shell .chat-history-item.active:focus-within .chat-history-del-btn{opacity:1}
.chat-history-del-btn:hover{background:rgba(255,255,255,.08);color:#ff4d4f;opacity:1}
.chat-messages{flex:1;overflow:auto;background:#fff}
.chat-shell .msg{padding:24px 16px;display:flex;gap:16px;align-items:flex-start;border-bottom:1px solid rgba(0,0,0,0.08);justify-content:flex-start}
.chat-shell .msg .meta{display:none}
.chat-shell .msg .bubble{max-width:760px;flex:1;padding:0;border-radius:0;background:transparent;border:none;box-shadow:none}
.chat-shell .avatar{width:28px;height:28px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:13px;color:#fff;margin-top:2px}
.chat-shell .msg.user{justify-content:flex-start}
.chat-shell .msg.user .avatar{display:flex}
.chat-shell .msg.user .bubble{max-width:760px;padding:0;background:transparent;border:none;border-radius:0}
.admin{max-width:980px;margin:24px auto;padding:0 16px;display:flex;flex-direction:column;gap:12px}
.admin-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px}
.admin-title{font-weight:700;font-size:18px}
.admin-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.admin-card{background:#0f1421;border:1px solid #1b2030;border-radius:12px;padding:14px}
.admin-section-title{font-weight:700;margin-bottom:10px}
.admin-table-wrap{overflow:auto}
.admin-table{width:100%;border-collapse:collapse;font-size:13px}
.admin-table th,.admin-table td{border-bottom:1px solid #1b2030;padding:8px 8px;text-align:left;white-space:nowrap}
.admin-table th{opacity:.85;font-weight:700}
.admin-table td.actions{display:flex;gap:6px;align-items:center}
.tag{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;border:1px solid #273046;background:#0c101a;font-size:12px}
.tag.ok{border-color:rgba(34,197,94,.35);background:rgba(34,197,94,.1);color:#bbf7d0}
.tag.bad{border-color:rgba(239,68,68,.35);background:rgba(239,68,68,.1);color:#fecaca}
.tag.dim{border-color:rgba(59,130,246,.35);background:rgba(59,130,246,.1);color:#bfdbfe}
.admin-kv{display:flex;gap:8px;align-items:center;padding:6px 10px;border:1px solid #1b2030;border-radius:10px;background:#0c101a}
.admin-kv span:first-child{opacity:.75}
.admin-daily{display:flex;flex-wrap:wrap;gap:8px;opacity:.9}
.admin-daily .chip{margin-right:0}
.chat-shell .msg.user .meta{display:none}
.chat-shell .msg .text{white-space:normal;line-height:1.75;font-size:16px;color:#374151;word-break:break-word;overflow-x:auto}
.chat-shell .msg .text p{margin:.8em 0}
.chat-shell .msg .text ul,.chat-shell .msg .text ol{margin:.8em 0;padding-left:24px;line-height:1.7}
.chat-shell .msg .text li{margin:.3em 0}
.chat-shell .msg .text h1,.chat-shell .msg .text h2,.chat-shell .msg .text h3,.chat-shell .msg .text h4,.chat-shell .msg .text h5,.chat-shell .msg .text h6{margin:1.2em 0 .6em 0;font-weight:600;line-height:1.4;color:#111827}
.chat-shell .msg .text h1{font-size:1.5em;margin-top:1.5em}
.chat-shell .msg .text h2{font-size:1.3em;margin-top:1.3em}
.chat-shell .msg .text h3{font-size:1.15em}
.chat-shell .msg .text h4{font-size:1.05em}
.chat-shell .msg .text blockquote{margin:.8em 0;padding:12px 16px;border-left:4px solid #10a37f;background:#f7f7f8;color:#374151;border-radius:8px}
.chat-shell .msg .text code{background:#f3f4f6;padding:2px 4px;border-radius:4px;font-family:Consolas,monospace;font-size:13px}
.chat-shell .msg .text pre.md-code{margin:.8em 0;padding:14px;border-radius:10px;background:#0b1020;color:#e5e7eb;overflow:auto}
.chat-shell .msg .text pre.md-code code{background:transparent;padding:0;color:inherit;font-size:13px}
.chat-composer{border-top:1px solid #e5e5e5;padding:12px;display:flex;gap:10px;align-items:flex-end;background:#fff}
.chat-input{flex:1;min-height:44px;max-height:220px;border:1px solid #e5e5e5;border-radius:10px;background:#fff;color:#111827;padding:10px 12px;font-size:15px;line-height:1.5;resize:none;outline:none}
.chat-send-btn{height:44px;padding:0 16px;border-radius:10px;border:1px solid #10a37f;background:#10a37f;color:#fff;cursor:pointer}
.chat-send-btn:hover{background:#1a7f64;border-color:#1a7f64}
.chat-overlay{display:none}
@media (max-width: 768px){
  .chat-sidebar{position:fixed;top:56px;left:0;height:calc(100vh - 56px);transform:translateX(-100%);transition:transform .2s ease;z-index:100}
  .chat-sidebar.open{transform:translateX(0)}
  .chat-overlay{display:none;position:fixed;top:56px;left:0;right:0;bottom:0;background:rgba(0,0,0,.5);z-index:90}
  .chat-overlay.open{display:block}
}
