:root { --bg: #f5f4f0; --card: #fff; --text: #25241f; --muted: #77746b; --line: #e3e0d7; --accent: #2f5d8a;
        --ok: #2f7a3b; --err: #b3372f; --warn: #a76a12; font-family: "Segoe UI", system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; }
.hidden { display: none !important; }
h1, h2, h3 { margin: 0 0 12px; }
h2 { font-size: 22px; } h3 { font-size: 17px; }
.muted { color: var(--muted); }
.error { color: var(--err); }
header { display: flex; align-items: center; gap: 20px; padding: 10px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
header nav { display: flex; gap: 4px; flex: 1; }
header nav button { border: none; background: none; padding: 8px 14px; border-radius: 8px; }
header nav button.active { background: var(--bg); font-weight: 600; }
main { max-width: 1150px; margin: 24px auto; padding: 0 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
button, .button { font: inherit; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger, .link.danger { color: var(--err); }
button.link { border: none; background: none; padding: 0 4px; color: var(--accent); }
label { display: block; margin-bottom: 10px; font-size: 14px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin: 8px 0 10px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eee; color: var(--muted); white-space: nowrap; }
.badge.ok { background: #e3f1e5; color: var(--ok); }
.badge.error { background: #f7e1df; color: var(--err); }
.badge.running, .badge.queued { background: #f6ecd9; color: var(--warn); }
pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; margin: 6px 0; }
.error-box { background: #fbefed; color: var(--err); padding: 8px 10px; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; background: var(--card); font-size: 13px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.runs table { margin-top: 10px; }
.auth { max-width: 380px; margin: 12vh auto; text-align: center; }
.auth form { text-align: left; }
.tabs-inline { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs-inline button.active { background: var(--bg); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.person { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); gap: 8px; }
form.inline { display: flex; gap: 8px; margin-top: 12px; }
form.inline select { margin: 0; }
#messages { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.msg { padding: 10px 14px; border-radius: 12px; max-width: 85%; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: var(--card); border: 1px solid var(--line); }
.msg.assistant p:first-child { margin-top: 0; } .msg.assistant p:last-child { margin-bottom: 0; }
.msg table { margin: 8px 0; }
.tools { margin-top: 8px; font-size: 12px; color: var(--muted); }
.chat-input { display: flex; gap: 8px; position: sticky; bottom: 12px; }
.chat-input textarea { margin: 0; resize: vertical; }
.details { background: var(--bg); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-size: 14px; }
.details summary { cursor: pointer; font-weight: 600; }
.md table { margin: 8px 0; font-size: 13px; }
.md pre, .md code { background: #fff; border-radius: 6px; }
.md pre { padding: 8px; }
label.consent { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
label.consent input { width: auto; margin-top: 3px; }
#agent-panel pre { background: var(--bg); padding: 8px 10px; border-radius: 8px; user-select: all; }
pre.token { font-size: 14px; font-weight: 600; }
a.button { display: inline-block; text-decoration: none; color: inherit; }
a.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
ol.steps li { margin-bottom: 10px; }
.auth a.sso { display: block; text-align: center; padding: 10px; }
