:root { --navy: #0d2a4a; --teal: #0f7b7b; --bg: #f4f6f9; --card: #fff; --text: #1d2733; --muted: #66727f; --red: #b42318; --amber: #b54708; --green: #067647; --border: #dde3ea; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); }
header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--navy); color: #fff; }
.brand { font-weight: 700; font-size: 18px; } .brand span { font-weight: 400; opacity: .8; }
.banner { padding: 8px 16px; font-weight: 600; text-align: center; }
.banner.staging { background: #fef0c7; color: #7a2e0e; } .banner.live { background: #fee4e2; color: var(--red); }
main, #login { max-width: 1200px; margin: 0 auto; padding: 12px 16px 48px; }
nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
nav button { white-space: nowrap; background: #e8edf3; color: var(--text); }
nav button.active { background: var(--navy); color: #fff; }
button { border: 0; border-radius: 6px; padding: 8px 12px; background: var(--teal); color: #fff; font: inherit; cursor: pointer; }
button.secondary { background: #e8edf3; color: var(--text); } button.danger { background: var(--red); }
input, select, textarea { font: inherit; padding: 8px; border: 1px solid var(--border); border-radius: 6px; }
label { display: block; margin: 8px 0; } label input { display: block; width: 100%; } label.inline { display: inline-flex; gap: 6px; align-items: center; } label.inline input { width: auto; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin: 10px 0; }
.narrow { max-width: 420px; margin: 40px auto; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .error { color: var(--red); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 10px 0; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.stat b { display: block; font-size: 20px; } .stat span { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 14px; }
th { background: #eef2f6; } tr.click { cursor: pointer; } tr.click:hover { background: #f7f9fb; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #e8edf3; color: var(--text); }
.GREEN { background: #dcfae6; color: var(--green); } .AMBER { background: #fef0c7; color: var(--amber); } .RED { background: #fee4e2; color: var(--red); }
pre { white-space: pre-wrap; word-break: break-word; background: #f7f9fb; padding: 10px; border-radius: 8px; font-size: 13px; max-height: 360px; overflow: auto; }
pre.report { max-height: none; background: var(--card); border: 1px solid var(--border); }
.approval h3 { margin: 0 0 4px; } .approval .actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; } .approval textarea { width: 100%; min-height: 50px; }
.chat-log { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px; min-height: 260px; max-height: 55vh; overflow-y: auto; }
.msg { margin: 6px 0; padding: 8px 10px; border-radius: 10px; max-width: 90%; white-space: pre-wrap; }
.msg.user { background: #e0f2f1; margin-left: auto; } .msg.agent { background: #eef2f6; } .msg .who { font-size: 12px; color: var(--muted); display: block; }
.chat-form { display: flex; gap: 6px; margin-top: 8px; } .chat-form input { flex: 1; min-width: 0; }
#mic.listening { background: var(--red); }
.inline-form { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) { th:nth-child(n+5), td:nth-child(n+5) { display: none; } .chat-form select { max-width: 110px; } }
.qr svg { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 8px; }
