:root { --brand: #1f3a5f; --accent: #e07a5f; --bg: #f5f6f8; --fg: #1d2330; --muted: #6b7280; --card: #fff; --line: #e3e6eb; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, "Segoe UI", Tahoma, Arial, sans-serif; background: var(--bg); color: var(--fg); }
header { background: var(--brand); color: #fff; padding: 14px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
header h1 { font-size: 18px; margin: 0; }
header small { opacity: .8; }
header .spacer { flex: 1; }
header a, header select { color: #fff; }
header select { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.4); border-radius: 4px; padding: 3px 6px; }
header select option { color: #000; }
main { max-width: 980px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 14px; }
button { background: var(--brand); color: #fff; border: 0; border-radius: 6px; padding: 8px 14px; font: inherit; cursor: pointer; }
button.secondary { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
button.danger { background: #b42318; }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.status { font-size: 13px; padding: 4px 8px; border-radius: 4px; background: #eef; display: inline-block; }
.status.ok { background: #e6f4ea; } .status.warn { background: #fff4e5; } .status.err { background: #fdecea; }
.transcript { height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: #fafbfc; border: 1px solid var(--line); border-radius: 6px; }
.msg { max-width: 75%; padding: 7px 11px; border-radius: 12px; white-space: pre-wrap; unicode-bidi: plaintext; }
.msg.user { align-self: flex-end; background: var(--brand); color: #fff; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); }
.msg.sys { align-self: center; background: transparent; color: var(--muted); font-size: 13px; font-style: italic; }
.msg[dir=rtl] { text-align: right; }
.kv { font: 12px/1.4 ui-monospace, Consolas, monospace; background: #f3f4f6; padding: 6px 8px; border-radius: 4px; white-space: pre-wrap; word-break: break-all; }
.muted { color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ring { animation: ring 1s infinite; border: 2px solid var(--accent); }
@keyframes ring { 50% { box-shadow: 0 0 0 8px rgba(224,122,95,.25); } }
.keypad { display: grid; grid-template-columns: repeat(3, 48px); gap: 6px; }
.keypad button { padding: 8px 0; }
.meter { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; width: 160px; }
.meter > div { height: 100%; background: var(--accent); width: 0; }
.badge { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 10px; background: #eef; margin-left: 6px; }
