:root{--bg:#f5f7fa;--panel:#fff;--muted:#7b8794;--accent:#2563eb;--radius:10px}
*{box-sizing:border-box}body{font-family:Inter,Arial,sans-serif;background:var(--bg);margin:0;color:#111827;font-size:13px}
.app.three-col{display:grid;grid-template-columns:220px 1fr 320px;gap:12px;max-width:1400px;margin:18px auto;padding:8px;transition: grid-template-columns 240ms ease}
.app.left-collapsed.three-col{grid-template-columns:64px 1.28fr 0.72fr}
.app.right-collapsed.three-col{grid-template-columns:220px 1fr 64px}
.app.left-collapsed.right-collapsed.three-col{grid-template-columns:64px 1fr 64px}
.sidebar{background:var(--panel);border-radius:var(--radius);padding:12px;box-shadow:0 6px 20px rgba(12,15,25,0.06);height:calc(100vh - 40px);overflow:auto;position:relative}
.left{min-width:56px}.right{min-width:56px}.center{min-height:calc(100vh - 40px)}
.brand{display:flex;align-items:center;gap:10px;padding:6px 6px 12px 6px}.logo{width:44px;height:44px;border-radius:9px;background:linear-gradient(135deg,var(--accent),#7c3aed);color:white;display:flex;align-items:center;justify-content:center;font-weight:700}
.user-chip{display:flex;align-items:center;gap:10px;padding:8px 6px;border-radius:8px;background:linear-gradient(180deg,rgba(0,0,0,0.02),transparent)}.avatar{width:36px;height:36px;border-radius:8px;background:#f3f4f6;display:flex;align-items:center;justify-content:center;font-weight:700}
.conv-list{margin:6px 0;padding:6px 2px;overflow:auto;flex:1}.conv-item{list-style:none;padding:8px 10px;border-radius:8px;margin-bottom:6px;cursor:pointer}.conv-item:hover{background:#f8fafc}
.workspace{min-height:calc(100vh - 40px)}.workspace-head{display:flex;align-items:center;justify-content:space-between;padding:6px 10px;margin-bottom:8px;font-weight:700}
.chat-area{background:var(--panel);border-radius:var(--radius);padding:12px;box-shadow:0 6px 20px rgba(12,15,25,0.06);height:calc(100vh - 200px);display:flex;flex-direction:column}
.messages{flex:1;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:8px}.msg{max-width:78%;padding:10px 12px;border-radius:12px;line-height:1.45}.msg.user{align-self:flex-end;background:linear-gradient(180deg,#e6f0ff,#fff)}.msg.assistant{align-self:flex-start;background:#f6f8fb}
.composer{display:flex;gap:8px;align-items:flex-end;padding-top:8px}.composer textarea{flex:1;resize:none;padding:10px;border-radius:10px;border:1px solid #e6edf3;min-height:42px}
.btn{border:0;padding:8px 12px;border-radius:8px;background:#f3f4f6;cursor:pointer}.btn.primary{background:var(--accent);color:white}
.notes-list .note-row{padding:8px;border-radius:8px;border:1px solid #f1f5f9;margin-bottom:8px;cursor:pointer;position:relative;padding-right:64px}
.notes-editor{margin-top:10px}.notes-editor input{width:100%;padding:8px;margin-bottom:6px;border-radius:6px;border:1px solid #eef2f6}.notes-editor textarea{width:100%;padding:8px;border-radius:6px;border:1px solid #eef2f6}
.conv-menu{background:#fff;border:1px solid #e6edf3;border-radius:8px;padding:6px;box-shadow:0 6px 20px rgba(12,15,25,0.08);z-index:100000}
.conv-menu .menu-item{padding:10px 12px;font-size:13px;cursor:pointer}
.conv-menu .menu-item:hover{background:#f8fafc}
.small-muted{font-size:12px;color:#6b7280}
.collapse-btn{position:absolute;right:-18px;top:12px;background:#fff;border-radius:50%;width:34px;height:34px;border:1px solid #eef2f6;cursor:pointer}
.sidebar.collapsed{width:64px;padding-left:8px;padding-right:8px}
.controls{display:flex;gap:8px;align-items:center}
.controls .icon-btn{width:40px;height:40px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;background:#ffffff;border:1px solid #eef2f6;box-shadow:0 6px 18px rgba(12,15,25,0.04);cursor:pointer;font-size:18px;transition: transform 120ms ease, box-shadow 120ms ease}
.controls .icon-btn:hover{transform: translateY(-2px);box-shadow:0 10px 30px rgba(12,15,25,0.08)}
.controls .icon-btn.primary-icon{background:linear-gradient(90deg,#2563eb,#7c3aed);color:white;border:none;font-weight:700}
.note-actions{position:absolute;right:8px;top:8px;display:flex;gap:6px}
.note-actions .icon{width:30px;height:30px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;background:#f7fafc;border:1px solid #eef2f6;cursor:pointer}
.modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(16,18,22,0.45);z-index:20000}
.modal.hidden{display:none}
.modal-panel{width:520px;max-width:94%;background:#fff;border-radius:12px;padding:14px;box-shadow:0 12px 40px rgba(12,15,25,0.16)}
.modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.modal-close{background:transparent;border:0;font-size:18px;cursor:pointer}
.modal-body .field{margin-bottom:10px}
#profile_masked{padding:8px;background:#f8fafc;border-radius:8px;border:1px solid #eef2f6}
@media (max-width:1000px){.app.three-col{grid-template-columns:64px 1fr 64px}}
