:root { --ink:#17332e; --green:#123c35; --mint:#dcebe3; --cream:#f5f0e5; --paper:#fffdfa; --line:#d9ddd5; --orange:#e86f3b; font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif; color:var(--ink); background:var(--cream); }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; background:radial-gradient(circle at 12% 8%,#fffaf0 0 14%,transparent 42%),linear-gradient(135deg,#f5f0e5,#e9eee6); }
button,input,textarea,select { font:inherit; }
button { cursor:pointer; }
.app-shell { width:min(1380px,100%); height:100vh; min-height:620px; margin:auto; padding:28px; display:grid; grid-template-columns:300px 1fr; gap:22px; }
.history-panel,.chat-card { background:rgba(255,253,250,.92); border:1px solid rgba(19,60,53,.12); box-shadow:0 22px 70px rgba(37,57,49,.12); }
.history-panel { border-radius:24px; padding:22px 16px 16px; min-height:0; display:flex; flex-direction:column; }
.brand { display:flex; gap:10px; align-items:center; padding:0 6px 18px; font-size:14px; font-weight:760; letter-spacing:.04em; }
.brand-mark { display:grid; place-items:center; width:31px; height:31px; border:1px solid var(--green); border-radius:50%; font-family:Georgia,serif; }
.primary-action { width:100%; padding:12px 14px; color:white; background:var(--green); border:0; border-radius:13px; text-align:left; font-weight:700; }
.history-search { display:flex; align-items:center; gap:8px; margin:14px 0 12px; padding:9px 11px; border:1px solid var(--line); background:white; border-radius:12px; }
.history-search input { min-width:0; width:100%; border:0; outline:0; background:transparent; font-size:12px; }
.history-heading { display:flex; justify-content:space-between; padding:8px 5px; color:#75857f; font-size:11px; font-weight:750; text-transform:uppercase; letter-spacing:.08em; }
.history-list { overflow-y:auto; min-height:80px; }
.history-item { width:100%; display:flex; flex-direction:column; gap:5px; padding:11px; border:0; border-radius:12px; color:var(--ink); background:transparent; text-align:left; }
.history-item:hover,.history-item.active { background:#edf3ee; }
.history-item strong,.history-item small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.history-item strong { font-size:13px; }
.history-item span { color:var(--orange); font-size:10px; }
.history-item small { color:#73827e; font-size:11px; }
.text-button,.sidebar-link { border:0; background:transparent; color:#547068; padding:9px; font-size:12px; text-align:left; }
.sidebar-bottom { margin-top:auto; padding-top:12px; border-top:1px solid var(--line); display:flex; flex-direction:column; }
.sidebar-link.danger { color:#9b5b48; }
.user-name { padding:10px 9px 2px; color:#82908c; font-size:11px; }
.chat-card { border-radius:26px; overflow:hidden; display:grid; grid-template-rows:auto 1fr auto auto; min-width:0; }
.chat-header { display:flex; align-items:center; gap:12px; padding:17px 20px; border-bottom:1px solid #e8e8e0; }
.avatar { display:grid; place-items:center; width:42px; height:42px; flex:0 0 42px; border-radius:50%; color:white; background:var(--green); font:700 14px Georgia,serif; }
.chat-title { min-width:0; display:flex; flex-direction:column; gap:3px; }
.chat-title strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.chat-title span { color:#70817c; font-size:11px; }.chat-title i { display:inline-block; width:7px; height:7px; margin-right:5px; border-radius:50%; background:#53a875; }
.icon-button { margin-left:auto; width:36px; height:36px; border:0; border-radius:10px; color:#6f817b; background:transparent; font-size:20px; }
.icon-button:hover { background:#edf3ee; }.chat-header .icon-button+.icon-button { margin-left:0; }
.messages { overflow-y:auto; padding:25px clamp(18px,4vw,55px); scroll-behavior:smooth; }
.message { display:flex; flex-wrap:wrap; margin:0 0 16px; }.message.user { justify-content:flex-end; }.message.bot { flex-direction:column; align-items:flex-start; }
.bubble { max-width:min(760px,84%); padding:13px 16px; border-radius:6px 17px 17px 17px; background:#eef3ed; line-height:1.52; font-size:14px; white-space:pre-wrap; }
.user .bubble { background:var(--green); color:white; border-radius:17px 6px 17px 17px; }.meta { display:block; margin-top:8px; color:#7f8d88; font-size:10px; }
.suggestions { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 24px; }.suggestions button { border:1px solid #cbd9d1; background:transparent; color:#345b52; border-radius:999px; padding:9px 12px; font-size:11px; }.suggestions button:hover { border-color:var(--orange); color:var(--orange); }
.feedback { max-width:min(760px,84%); display:flex; flex-wrap:wrap; align-items:center; gap:7px; padding:7px 2px; color:#788781; font-size:11px; }
.feedback button { border:1px solid #ccd8d1; border-radius:999px; background:white; color:#365a52; padding:5px 10px; font-size:10px; }.feedback button.selected { color:white; background:var(--green); }.feedback textarea { flex-basis:100%; padding:9px; border:1px solid var(--line); border-radius:10px; background:white; }.feedback .feedback-save { border-radius:9px; background:var(--orange); color:white; border:0; }
.typing .bubble { display:flex; gap:5px; padding-block:17px; }.typing i { width:6px; height:6px; border-radius:50%; background:#789088; animation:pulse 1.1s infinite; }.typing i:nth-child(2){animation-delay:.18s}.typing i:nth-child(3){animation-delay:.36s}
@keyframes pulse { 0%,70%,100%{opacity:.3;transform:translateY(0)}35%{opacity:1;transform:translateY(-4px)} }
.composer { margin:0 clamp(16px,3vw,40px); display:flex; align-items:flex-end; gap:10px; padding:10px 10px 10px 16px; border:1px solid #ced8d1; border-radius:18px; background:white; }
textarea { width:100%; resize:none; border:0; outline:0; background:transparent; color:var(--ink); font-size:14px; line-height:1.45; max-height:110px; }.send { flex:0 0 39px; height:39px; border-radius:12px; border:0; background:var(--orange); color:white; font-size:18px; }.send:disabled{opacity:.5;cursor:wait}
footer { text-align:center; color:#97a09d; font-size:10px; padding:12px; }
.analytics-dialog { width:min(1200px,calc(100% - 30px)); height:min(850px,calc(100% - 30px)); padding:22px; border:0; border-radius:22px; color:var(--ink); background:var(--paper); box-shadow:0 30px 90px #10231e55; }.analytics-dialog::backdrop{background:#10231e99}.analytics-dialog>header{display:flex;align-items:center;justify-content:space-between}.analytics-dialog h2{margin:3px 0 18px;font:600 28px Georgia,serif}.analytics-dialog header small{color:var(--orange);text-transform:uppercase;letter-spacing:.1em}.analytics-filters{display:flex;gap:10px}.analytics-filters select{padding:8px 11px;border:1px solid var(--line);border-radius:9px;background:white}.metric-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:10px;margin:18px 0}.metric-grid div{padding:14px;border-radius:13px;background:#edf3ee}.metric-grid strong,.metric-grid span{display:block}.metric-grid strong{font-size:22px}.metric-grid span{margin-top:5px;color:#72827c;font-size:10px}.analytics-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:16px}.analytics-dialog section{padding:15px;border:1px solid var(--line);border-radius:14px;margin-bottom:16px}.analytics-dialog h3{margin:0 0 14px;font-size:13px}.day-chart{height:160px;display:flex;align-items:flex-end;gap:5px}.day-chart>div{position:relative;flex:1;min-width:5px;border-radius:5px 5px 0 0;background:var(--orange)}.day-chart span{position:absolute;bottom:-18px;left:50%;transform:translateX(-50%) rotate(-45deg);font-size:8px;color:#73827e}.top-queries{margin:0;padding-left:22px;max-height:160px;overflow:auto;font-size:11px;line-height:1.7}.table-wrap{overflow:auto;max-height:280px}table{border-collapse:collapse;width:100%;font-size:11px}th,td{padding:9px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line);white-space:pre-wrap}td:nth-child(2){min-width:360px}.mobile-only{display:none}.drawer-backdrop{display:none}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:850px){.app-shell{display:block;padding:0;min-height:100vh}.chat-card{height:100vh;border-radius:0}.history-panel{position:fixed;z-index:10;inset:0 auto 0 0;width:min(330px,88vw);border-radius:0;transform:translateX(-105%);transition:transform .2s}.history-panel.open{transform:translateX(0)}.drawer-backdrop{position:fixed;z-index:9;inset:0;background:#10231e88}.drawer-backdrop.open{display:block}.mobile-only{display:block}.brand .icon-button{margin-left:auto}.metric-grid{grid-template-columns:repeat(2,1fr)}.analytics-grid{grid-template-columns:1fr}.analytics-dialog{padding:15px}.bubble,.feedback{max-width:94%}}
