:root{font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:#111;background:#f4f6f8}*{box-sizing:border-box}body{margin:0;min-height:100vh}.app{min-height:100vh;display:grid;place-items:center;padding:20px}.chat-shell{width:min(900px,100%);height:min(92vh,920px);background:#fff;border:1px solid #e6e8eb;border-radius:8px;display:grid;grid-template-rows:auto 1fr auto auto auto;overflow:hidden}.header{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid #e6e8eb}.header h1{margin:0;font-size:20px;letter-spacing:0}.header p{margin:4px 0 0;color:#5c6670;font-size:13px}.status{font-size:12px;color:#0a7f3f;background:#e8f7ef;padding:4px 8px;border-radius:8px}.status.error{color:#a02121;background:#fdecec}.messages{padding:18px;overflow-y:auto;background:#f8fafc}.msg{display:flex;align-items:flex-start;gap:8px;margin-bottom:12px}.msg.user{justify-content:flex-end}.bubble{max-width:min(780px,88%);padding:12px 14px;border-radius:8px;border:1px solid #e6e8eb;line-height:1.65;font-size:14px;overflow-wrap:anywhere;background:#fff;box-shadow:0 1px 2px #00000008}.msg.user .bubble{background:#f28b02;color:#fff;border:1px solid #d97700;box-shadow:0 2px 6px #d9770033}.bot-avatar{width:28px;height:28px;min-width:28px;border-radius:999px;border:1px solid #d7b27a;background:#fff4df;color:#9a5b00;display:inline-flex;align-items:center;justify-content:center;font-size:15px;font-weight:700;line-height:1;-webkit-user-select:none;user-select:none}.bubble a{color:#0056d6;text-decoration:underline}.msg.user .bubble a{color:#fff}.answer-text p{margin:0 0 10px}.answer-text p:last-child{margin-bottom:0}.answer-text ul,.answer-text ol{margin:6px 0 10px 20px;padding:0}.answer-text h1,.answer-text h2,.answer-text h3,.answer-text h4,.answer-text h5,.answer-text h6{margin:10px 0 8px;line-height:1.3;color:#1d2935}.answer-text h3{font-size:15px}.answer-text h4,.answer-text h5,.answer-text h6{font-size:14px}.answer-text hr{border:0;border-top:1px solid #dfe6ee;margin:10px 0}.typing{color:#66707a;font-size:13px}.refs{margin-top:12px;padding-top:10px;border-top:1px solid #e6e8eb}.refs-title{font-size:12px;color:#47515c;margin-bottom:6px;font-weight:600;text-transform:uppercase;letter-spacing:.02em}.refs-list{margin:0;padding-left:0;list-style:none}.ref-item{margin:6px 0;padding:8px 10px;background:#f3f6f9;border:1px solid #e2e8ef;border-radius:8px;display:flex;align-items:center;justify-content:space-between;gap:10px}.answer-text{white-space:normal}.answer-text br+br{display:block;content:"";margin-top:4px}.ref-head{min-width:0}.ref-label{display:block;font-size:13px;color:#25313d;margin-bottom:2px}.ref-page{font-size:12px;color:#66707a}.ref-open{display:inline-flex;border:1px solid #c7d3e0;border-radius:8px;background:#fff;color:#304050;font-size:12px;text-decoration:none;padding:6px 10px;white-space:nowrap}.composer{padding:12px;border-top:1px solid #e6e8eb;display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end;background:#fff}.composer textarea{width:100%;min-height:44px;max-height:140px;resize:vertical;border:1px solid #d0d7de;border-radius:8px;padding:10px;font:inherit}.composer button{height:44px;padding:0 14px;border:1px solid #d97700;border-radius:8px;background:#f28b02;color:#fff;font-weight:600;cursor:pointer}.composer button:disabled{opacity:.5;cursor:not-allowed}.retry-bar{border-top:1px solid #ecd2d2;background:#fff4f4;color:#6b2727;padding:8px 12px;font-size:12px;display:flex;align-items:center;justify-content:space-between;gap:10px}.retry-bar button{border:1px solid #d88a8a;border-radius:8px;background:#fff;color:#6b2727;font-size:12px;padding:6px 10px;cursor:pointer}.credit{border-top:1px solid #e6e8eb;padding:10px 16px 12px;font-size:12px;color:#5f6772;text-align:center;line-height:1.5}.credit a{color:#3a4a5d;text-decoration:none}.credit a:hover{text-decoration:underline}.login-shell{width:min(400px,100%);background:#fff;border:1px solid #e6e8eb;border-radius:12px;padding:40px 32px 36px;display:flex;flex-direction:column;align-items:center;gap:8px;box-shadow:0 4px 24px #00000012}.login-logo{font-size:22px;font-weight:700;color:#f28b02;letter-spacing:-.5px;margin-bottom:4px}.login-title{margin:0;font-size:18px;color:#111}.login-sub{margin:0 0 16px;font-size:13px;color:#5c6670;text-align:center}.login-form{width:100%;display:flex;flex-direction:column;gap:10px}.login-input{width:100%;padding:11px 13px;border:1px solid #d0d7de;border-radius:8px;font:inherit;font-size:14px;outline:none;transition:border-color .15s}.login-input:focus{border-color:#f28b02}.login-input--error{border-color:#c0392b;animation:shake .3s ease}.login-error{margin:0;font-size:12px;color:#c0392b;text-align:center}.login-btn{width:100%;padding:11px;border:none;border-radius:8px;background:#f28b02;color:#fff;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s}.login-btn:hover:not(:disabled){background:#d97700}.login-btn:disabled{opacity:.45;cursor:not-allowed}.login-compliance{width:100%;margin-top:12px;padding-top:12px;border-top:1px solid #eceff3;font-size:12px;line-height:1.45;color:#5f6772;text-align:left}.login-compliance p{margin:0 0 8px}.login-compliance p:last-child{margin-bottom:0}.login-compliance a{color:#2e4052}.login-compliance a:hover{text-decoration:underline}@keyframes shake{0%,to{transform:translate(0)}25%{transform:translate(-6px)}75%{transform:translate(6px)}}@media (max-width: 700px){.app{padding:0}.chat-shell{width:100%;height:100vh;border-radius:0;border:none}.ref-item{align-items:flex-start;flex-direction:column}.bot-avatar{width:24px;height:24px;min-width:24px;font-size:13px}}
