:root { color-scheme: light; --bg:#f4f7fb; --panel:#fff; --ink:#142033; --muted:#667085; --brand:#1f7a4d; --brand2:#2fac6f; --line:#d9e2ec; --danger:#b42318; }
* { box-sizing: border-box; }
body { margin:0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background:var(--bg); color:var(--ink); }
header { height:76px; padding:14px 22px; background:var(--panel); border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; }
h1 { margin:2px 0 0; font-size:22px; }
.brand { color:var(--brand); font-weight:800; letter-spacing:.04em; text-transform:uppercase; font-size:13px; }
button { border:0; background:var(--brand); color:white; border-radius:12px; padding:12px 18px; font-weight:700; cursor:pointer; box-shadow: 0 6px 16px rgba(31,122,77,.18); }
button:hover { background:var(--brand2); }
button:disabled { opacity:.6; cursor:wait; }
button.secondary { background:#eef6f1; color:var(--brand); box-shadow:none; }
.chat-shell { height:calc(100vh - 76px); display:flex; flex-direction:column; max-width:1120px; margin:0 auto; }
.messages { flex:1; overflow:auto; padding:24px 18px 16px; }
.msg { margin:0 0 18px; display:flex; flex-direction:column; gap:10px; }
.msg.user { align-items:flex-end; }
.msg.assistant { align-items:flex-start; }
.bubble { max-width:min(820px, 92vw); background:var(--panel); border:1px solid var(--line); border-radius:18px; padding:15px 17px; line-height:1.48; box-shadow: 0 8px 24px rgba(20,32,51,.06); white-space:normal; }
.user .bubble { background:linear-gradient(135deg, var(--brand), var(--brand2)); color:white; border:0; }
.thinking .bubble { color:var(--muted); font-style:italic; }
.dots::after { content:''; display:inline-block; width:1.4em; text-align:left; animation:dots 1.2s steps(4,end) infinite; }
@keyframes dots { 0%{content:'';} 25%{content:'.';} 50%{content:'..';} 75%,100%{content:'...';} }
.chart-card { width:min(820px, 92vw); background:var(--panel); border:1px solid var(--line); border-radius:18px; padding:18px; box-shadow: 0 8px 24px rgba(20,32,51,.06); }
.meta { max-width:min(820px, 92vw); color:var(--muted); font-size:13px; padding:0 4px; }
.meta summary { cursor:pointer; }
.meta h4 { margin:10px 0 4px; color:var(--ink); }
.meta ul { margin:4px 0 0 20px; padding:0; }
.composer { display:flex; gap:12px; padding:16px 18px 22px; border-top:1px solid var(--line); background:rgba(244,247,251,.92); backdrop-filter: blur(8px); }
textarea, input { width:100%; border:1px solid var(--line); border-radius:14px; padding:13px 14px; font:inherit; outline:none; background:white; color:var(--ink); }
textarea:focus, input:focus { border-color:var(--brand2); box-shadow:0 0 0 3px rgba(47,172,111,.14); }
textarea { resize:none; }
.login-body { min-height:100vh; display:grid; place-items:center; padding:24px; background: radial-gradient(circle at top left, #dff5e9, transparent 35%), var(--bg); }
.login-card { width:min(420px, 100%); background:white; border:1px solid var(--line); border-radius:24px; padding:30px; box-shadow:0 18px 50px rgba(20,32,51,.12); }
.login-card h1 { font-size:28px; margin:6px 0 8px; }
.login-card p { color:var(--muted); }
.login-card form { display:flex; flex-direction:column; gap:12px; margin-top:18px; }
.error { color:var(--danger)!important; min-height:20px; }
@media (max-width: 700px) { header { height:auto; } .chat-shell { height:calc(100vh - 72px); } .composer { flex-direction:column; } button { width:100%; } }
