*{margin:0;padding:0;box-sizing:border-box}:root{--bg:#101014;--sidebar:#19191f;--surface:#24242c;--text:#f4f4f5;--muted:#a1a1aa;--border:#34343e;--accent:#7c3aed}body.light{--bg:#fff;--sidebar:#f3f3f7;--surface:#eaeaf0;--text:#171717;--muted:#62626d;--border:#d4d4dc}body{background:var(--bg);color:var(--text);font-family:Arial,sans-serif}button,textarea,input{font:inherit}button{cursor:pointer;transition:.2s}button:disabled{opacity:.5;cursor:wait}[hidden]{display:none!important}.app{display:flex;height:100dvh;overflow:hidden}#sidebar{width:260px;flex-shrink:0;background:var(--sidebar);border-right:1px solid var(--border);padding:20px;display:flex;flex-direction:column;overflow-y:auto}#sidebar.hidden{display:none}.logo{font-size:25px;font-weight:bold;letter-spacing:1px;margin-bottom:30px}.logo span{color:#a78bfa;font-size:12px}.new-chat{background:var(--accent);color:white;border:0;border-radius:10px;padding:14px;text-align:left}.section-title{color:var(--muted);font-size:11px;letter-spacing:1px;margin:25px 0 12px}nav button,.history-item{display:block;width:100%;background:transparent;color:var(--text);border:0;padding:12px;text-align:left;border-radius:8px}nav button:hover,nav button.active,.history-item:hover,.history-item.active{background:var(--surface)}.history-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}#search{width:100%;padding:9px;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:8px;margin-bottom:8px}#history{flex:1;min-height:70px;overflow-y:auto}.sidebar-footer{color:var(--muted);font-size:12px;padding-top:18px;border-top:1px solid var(--border)}.developer-profile{display:flex;align-items:center;gap:12px;margin:15px 0}.developer-avatar{width:42px;height:42px;flex-shrink:0;background:linear-gradient(135deg,#7c3aed,#a78bfa);border-radius:50%;display:grid;place-items:center;color:white;font-weight:bold}.developer-profile strong{font-size:14px;color:var(--text)}.developer-profile p{font-size:11px;margin-top:5px}.main{flex:1;min-width:0;display:flex;flex-direction:column}.topbar{display:flex;align-items:center;justify-content:space-between;padding:15px 25px;border-bottom:1px solid var(--border)}.topbar-left,.actions{display:flex;align-items:center;gap:12px}.icon-btn{background:var(--surface);color:var(--text);border:0;border-radius:8px;width:36px;height:36px}.icon-btn:hover{color:#a78bfa}#chat{flex:1;min-height:0;overflow-y:auto;padding:30px 20px}#welcome{max-width:750px;margin:8vh auto 0;text-align:center}.welcome-logo{color:#a78bfa;font-size:65px;margin-bottom:20px}#welcome h1{font-size:36px;margin-bottom:15px}#welcome p{color:var(--muted)}.suggestions{display:grid;grid-template-columns:repeat(2,1fr);gap:15px;margin-top:35px}.suggestions button{background:var(--surface);color:var(--text);border:1px solid var(--border);padding:20px;border-radius:14px;text-align:left}.suggestions button:hover{border-color:#a78bfa}#messages{max-width:800px;margin:auto}.message{margin-bottom:25px;line-height:1.8;overflow-wrap:anywhere}.message-text{white-space:pre-wrap}.message.user{background:var(--surface);padding:15px 20px;border-radius:18px;width:fit-content;max-width:85%;margin-left:auto}.message.assistant{padding:10px}.message-label{font-size:13px;font-weight:bold;color:#a78bfa;margin-bottom:8px}.message-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.copy-btn{background:transparent;color:var(--muted);border:1px solid var(--border);border-radius:6px;padding:5px 10px;font-size:12px}.formatted{white-space:normal}.formatted p,.formatted ul,.formatted ol,.formatted h2,.formatted h3,.formatted h4{margin:8px 0}.formatted ul,.formatted ol{padding-left:25px}.formatted pre{white-space:pre;overflow:auto;background:var(--surface);padding:14px;border-radius:10px;margin:10px 0}.formatted code{font-family:monospace;background:var(--surface);border-radius:4px}.table-wrap{overflow:auto}.formatted table{border-collapse:collapse;width:100%;margin:10px 0}.formatted td,.formatted th{border:1px solid var(--border);padding:8px;text-align:left}.formatted th{background:var(--surface)}.composer-area{padding:15px 20px}.composer{display:flex;align-items:flex-end;max-width:800px;margin:auto;background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:12px;gap:10px}.composer:focus-within{border-color:#a78bfa}textarea{flex:1;min-width:0;background:transparent;color:var(--text);border:0;outline:0;padding:8px;resize:none;font-size:16px}#sendBtn{width:42px;height:42px;border:0;border-radius:12px;background:var(--accent);color:white;font-size:25px;flex-shrink:0}.attach-btn{background:transparent;color:var(--text);border:0;width:38px;height:42px;font-size:22px;border-radius:10px;flex-shrink:0}.attach-btn:hover{background:var(--bg)}#mic.recording{background:#b91c1c;color:white}#attachmentPreview{max-width:800px;margin:0 auto 10px;padding:12px;background:var(--surface);border:1px solid var(--border);border-radius:12px;display:flex;align-items:center;gap:12px}#attachmentName{flex:1;overflow-wrap:anywhere;font-size:13px}#attachmentPreview button{background:transparent;color:var(--text);border:0;font-size:18px}#previewImage{width:76px;height:76px;object-fit:contain;border-radius:8px}.sent-image{display:block;max-width:100%;max-height:240px;border-radius:10px;margin-top:8px}.disclaimer{text-align:center;color:var(--muted);font-size:11px;margin-top:12px}@media(max-width:700px){#sidebar{position:fixed;top:0;left:0;height:100dvh;z-index:10;box-shadow:10px 0 40px #0005}.topbar{padding:12px}.topbar-left,.actions{gap:6px}#welcome h1{font-size:25px}.suggestions{grid-template-columns:1fr}#chat{padding:15px}.composer-area{padding:10px}.composer{gap:4px;padding:8px}}

[hidden]{display:none!important}.auth-gate{min-height:100dvh;display:grid;place-items:center;padding:20px}.auth-card{width:min(100%,400px);display:grid;gap:14px;background:var(--sidebar);border:1px solid var(--border);padding:28px;border-radius:20px}.auth-card h1{color:#a78bfa}.auth-card input,.auth-card button{padding:12px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit}.auth-card button[type=submit]{background:var(--accent);color:white}.auth-card p{overflow-wrap:anywhere;color:var(--muted)}
[hidden]{display:none!important}dialog{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:16px;padding:24px;margin:auto;min-width:260px}dialog p,dialog input,dialog button{margin-top:12px}dialog input{padding:10px;max-width:100%}dialog::backdrop{background:#0009}@media print{#sidebar,.topbar,.composer-area,.message-actions,#welcome{display:none!important}.app,.main,#chat{display:block!important;height:auto!important;overflow:visible!important;background:white;color:black}.message{color:black;background:white!important;break-inside:avoid}}
#memoryBtn{font-weight:bold}dialog{max-width:min(560px,94vw);max-height:85vh;overflow:auto}dialog textarea{display:block;width:100%;min-height:80px;border:1px solid var(--border);margin-top:12px}dialog .copy-btn{margin-right:8px}

#folderFilter{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:8px;margin-bottom:8px}#webBtn[aria-pressed=true]{background:var(--accent);color:white}.actions{flex-wrap:wrap}dialog label{display:block;margin:12px 0}

/* VISORA brand */
.brand-icon{display:inline-block;object-fit:contain;border-radius:22%;flex-shrink:0;width:36px;height:36px}.logo,.auth-brand,.message-label{display:flex;align-items:center;gap:10px}.logo{letter-spacing:.5px}.auth-brand{justify-content:center}.auth-brand .brand-icon{width:48px;height:48px}.welcome-logo .brand-icon{width:88px;height:88px}.message-label .brand-icon{width:26px;height:26px}
