:root{
  --brand:#2563eb; --brand-700:#1d4ed8;
  --bg:#f6f8fb; --card:#ffffff; --text:#0f172a; --muted:#64748b; --border:#e2e8f0;
  --shadow:0 20px 40px rgba(2,6,23,.08); --radius:16px;
}
*{box-sizing:border-box} html,body{height:100%}
body{margin:0;font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial;background:var(--bg);color:var(--text)}
.bar{position:sticky;top:0;display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:rgba(255,255,255,.85);backdrop-filter:blur(10px);border-bottom:1px solid var(--border);z-index:100}
.brand{font-weight:800}.auth{display:flex;gap:10px;align-items:center}
.auth input{padding:8px 10px;border:1px solid var(--border);border-radius:10px;background:#fff}
.muted{color:var(--muted);font-size:12px}
.grid{display:grid;grid-template-columns:340px 1fr;gap:16px;padding:16px;height:calc(100vh - 56px)}
.panel{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);display:flex;flex-direction:column;min-height:0;animation:pop .3s ease}
@keyframes pop{from{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}
.panel-title{padding:14px 16px;border-bottom:1px solid var(--border);font-weight:700}
.list{overflow:auto;padding:8px}
.item{padding:12px;border:1px solid var(--border);border-radius:12px;margin:8px 0;cursor:pointer;background:#fff;display:flex;justify-content:space-between;align-items:center;transition:all .2s ease}
.item:hover{transform:translateY(-2px);box-shadow:0 10px 20px rgba(2,6,23,.06)}
.small{color:var(--muted);font-size:12px}
.messages{flex:1;overflow:auto;padding:16px;background:linear-gradient(180deg,#fff 0%, #f8fafc 100%)}
.msg{max-width:70%;padding:10px 12px;border-radius:14px;margin:8px 0;border:1px solid var(--border);background:#fff;box-shadow:0 8px 20px rgba(2,6,23,.05)}
.msg.u{margin-right:auto}
.msg.a{margin-left:auto;background:var(--brand);color:#fff;border-color:transparent}
.msg img{max-width:280px;border-radius:12px;display:block}
.composer{display:flex;gap:10px;padding:12px;border-top:1px solid var(--border);background:#fff;border-bottom-left-radius:var(--radius);border-bottom-right-radius:var(--radius)}
.composer input{flex:1;padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:#fff}
.btn{background:var(--brand);color:#fff;border:none;border-radius:12px;padding:10px 14px;cursor:pointer;transition:all .2s ease}
.btn:hover{background:var(--brand-700);transform:translateY(-1px)}
@media (max-width:980px){.grid{grid-template-columns:1fr}}
