body { margin:0; min-height:100vh; background:var(--bg); font-family:var(--font-sans); color:var(--foreground); }
.page { max-width:900px; margin:0 auto; padding:20px 20px 60px; }

/* Header */
.page-hdr { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.page-hdr h1 { font-size:20px; font-weight:700; margin:0; }
.page-hdr p { font-size:13px; color:var(--muted-fg); margin:2px 0 0; }

/* Filter Bar */
.filter-bar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; padding:14px 16px; background:var(--card); border:1px solid var(--border); border-radius:10px; margin-bottom:14px; }
.filter-bar label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted-fg); }
.filter-bar input[type="text"], .filter-bar input[type="date"] {
    padding:8px 12px; border:1px solid var(--border); border-radius:8px; font:inherit; font-size:13px; background:var(--card); color:var(--foreground); outline:none;
}
.filter-bar input:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(59,89,152,0.08); }
.filter-bar .input-key { flex:1; min-width:200px; }
.filter-actions { display:flex; gap:6px; }

/* Stats */
.stats-bar { display:flex; gap:16px; padding:8px 0; font-size:12px; color:var(--muted-fg); margin-bottom:10px; }
.stats-bar .stat { display:flex; align-items:center; gap:4px; }
.stats-bar .stat i { font-size:11px; }

/* Chat */
.chat-panel { background:var(--card); border:1px solid var(--border); border-radius:10px; display:flex; flex-direction:column; min-height:50vh; max-height:72vh; }
.chat-scroll { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; }
.chat-empty { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; color:var(--muted-fg); text-align:center; gap:8px; }
.chat-empty i { font-size:40px; opacity:.2; }
.chat-empty p { font-size:13px; }

/* Messages */
.msg { display:flex; flex-direction:column; max-width:82%; }
.msg.user { align-self:flex-end; align-items:flex-end; }
.msg.bot { align-self:flex-start; align-items:flex-start; }
.msg-sender { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted-fg); margin:0 6px 3px; }
.msg-bubble { padding:12px 16px; border-radius:16px; line-height:1.6; font-size:13.5px; word-wrap:break-word; white-space: pre-wrap; }
.msg.user .msg-bubble { background:var(--foreground); color:white; border-bottom-right-radius:4px; }
.msg.bot .msg-bubble { background:var(--bg); border:1px solid var(--border); border-bottom-left-radius:4px; }
.msg-time { font-size:10px; color:var(--muted-fg); margin:3px 6px 0; display:flex; gap:8px; align-items:center; }
.msg-time .raw-toggle { cursor:pointer; text-decoration:underline; color:var(--primary); }
.msg-time .raw-toggle:hover { opacity:.7; }
.msg-raw { background:#1e1e2e; color:#cdd6f4; font-family:var(--font-mono,monospace); font-size:11px; padding:10px 12px; border-radius:8px; margin-top:6px; white-space:pre-wrap; word-break:break-all; display:none; max-height:200px; overflow-y:auto; }
.msg-raw.open { display:block; }

/* Product Cards */
.product-row { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.product-card { display:flex; gap:8px; padding:8px 10px; background:var(--card); border:1px solid var(--border); border-radius:8px; max-width:280px; min-width:200px; transition:box-shadow .15s; }
.product-card:hover { box-shadow:0 2px 8px rgba(0,0,0,0.06); }
.product-card img { width:48px; height:48px; border-radius:6px; object-fit:cover; flex-shrink:0; background:var(--muted); }
.product-info { flex:1; min-width:0; }
.product-name { font-size:12px; font-weight:600; line-height:1.3; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.product-price { font-size:11px; margin-top:2px; }
.product-price .sale { color:var(--error,#dc2626); font-weight:700; }
.product-price .original { color:var(--muted-fg); text-decoration:line-through; margin-left:4px; font-size:10px; }
.product-price .normal { color:var(--foreground); font-weight:600; }
.product-link { font-size:10px; color:var(--primary); margin-top:2px; display:block; text-decoration:none; }
.product-link:hover { text-decoration:underline; }

/* Load more */
.load-more { width:100%; padding:10px; background:var(--bg); border:1px dashed var(--border); border-radius:8px; cursor:pointer; font:inherit; font-size:12px; font-weight:600; color:var(--muted-fg); text-align:center; display:none; }
.load-more:hover { border-color:var(--primary); color:var(--primary); }
.load-more.visible { display:block; }