main#app { padding-top:28px; padding-bottom:60px; }
.tabs { display:flex; gap:6px; border-bottom:1px solid var(--line); margin-bottom:22px; flex-wrap:wrap; }
.tabs button { border:0; background:none; padding:10px 18px; font:inherit; color:var(--muted); cursor:pointer; border-bottom:3px solid transparent; }
.tabs button.on { color:var(--brand); border-bottom-color:var(--brand); font-weight:600; }
form.form { display:grid; gap:12px; max-width:520px; margin:0 0 26px; }
form.form.wide { max-width:none; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); align-items:end; }
form.form h2, form.form h3 { margin:0; grid-column:1 / -1; }
label { display:grid; gap:4px; font-size:14px; color:var(--muted); }
input, select, textarea { font:inherit; padding:8px 10px; border:1px solid #cdd5dc; border-radius:6px; color:var(--ink); background:#fff; }
textarea { min-height:90px; resize:vertical; }
button.btn { border:0; cursor:pointer; font:inherit; font-weight:600; }
button.small { padding:4px 12px; font-size:13px; border:1px solid #cdd5dc; background:#fff; border-radius:6px; cursor:pointer; margin-right:6px; }
button.small.danger { color:#b3261e; border-color:#e4b4b0; }
.hint { font-size:13px; color:var(--muted); margin:0; }
.row-actions { white-space:nowrap; }
#toast { position:fixed; right:22px; bottom:22px; max-width:420px; padding:12px 18px; border-radius:8px; color:#fff; z-index:20; }
#toast.ok { background:#12805c; } #toast.err { background:#b3261e; }
.chatbox { border:1px solid var(--line); border-radius:10px; padding:14px; min-height:160px; background:#fff; white-space:pre-wrap; word-break:break-word; }
.msg { margin-bottom:12px; } .msg b { display:block; font-size:13px; color:var(--muted); }
.meta { font-size:13px; color:var(--muted); margin-top:8px; }
.presets { display:flex; gap:8px; align-items:center; flex-wrap:wrap; grid-column:1 / -1; }
.perms { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:4px 12px; margin:8px 0; }
.chk { display:flex; align-items:center; gap:4px; font-size:13px; }
.btn.small { padding:4px 10px; font-size:13px; margin-right:6px; }
.panel-body { margin-bottom:16px; }
.row-form { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:8px 0; }
.pre { white-space:pre-wrap; word-break:break-word; background:#f6f7f9; border:1px solid var(--line); border-radius:8px; padding:10px; font-size:13px; margin:6px 0; max-height:360px; overflow:auto; }
.err-text { color:#b4232a; }
