:root { --bg: #0f1115; --panel: #171a21; --line: #272c36; --text: #e8eaf0; --muted: #9aa3b2; --accent: #6ea8fe; --ok: #5ec27f; --warn: #e0b04a; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, Segoe UI, sans-serif; }
header { padding: 12px 20px; border-bottom: 1px solid var(--line); }
.muted { color: var(--muted); }
.narrow { max-width: 460px; margin: 8vh auto; padding: 0 20px; }
h1 { font-size: 24px; } h2 { font-size: 16px; margin: 0 0 8px; } h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 6px; }
label { display: block; margin: 12px 0; color: var(--muted); font-size: 13px; }
label.check { display: flex; gap: 10px; align-items: flex-start; }
input { width: 100%; margin-top: 4px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font: inherit; }
input[type=checkbox] { width: auto; margin-top: 4px; }
button { padding: 10px 16px; background: var(--accent); color: #0b1020; border: 0; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
.error { color: #ff7b7b; }
.grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 16px; padding: 16px; height: calc(100vh - 54px); }
.chat, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow: auto; }
.chat { display: flex; flex-direction: column; }
.log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: #25324d; }
.msg.assistant { align-self: flex-start; background: #20242d; }
#send, #link { display: flex; gap: 8px; margin-top: 8px; } #send input, #link input { margin: 0; }
.bar { height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; } #bar-fill { height: 100%; width: 0; background: var(--ok); transition: width .5s; }
.field { padding: 6px 0; border-bottom: 1px solid var(--line); } .field .k { color: var(--muted); font-size: 12px; } .field .v { overflow-wrap: anywhere; }
.badge { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 10px; background: var(--line); color: var(--muted); font-size: 11px; }
.low { color: var(--warn); }
.chips, .plain { list-style: none; padding: 0; margin: 0; } .chips { display: flex; flex-wrap: wrap; gap: 6px; } .chips li { background: var(--line); padding: 3px 9px; border-radius: 12px; font-size: 12px; color: var(--muted); }
.plain li { font-size: 13px; color: var(--muted); } .plain li b { color: var(--text); font-weight: 600; }
@media (max-width: 800px) { .grid { grid-template-columns: 1fr; height: auto; } }
