:root {
  color-scheme: dark;
  --bg: #071018;
  --card: #101920;
  --line: #243140;
  --text: #e8eef6;
  --muted: #93a4b8;
  --accent: #f97316;
  --ok: #2dd4bf;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.5 "Segoe UI", sans-serif;
  background: radial-gradient(1200px 400px at 10% -10%, #1a2c3d, transparent), var(--bg);
  color: var(--text);
}
a { color: #fdba74; }
.top, main { width: min(1080px, calc(100% - 28px)); margin: 0 auto; }
.top { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 22px 0 8px; }
.brand { color: white; font-weight: 800; text-decoration: none; letter-spacing: .01em; }
.who { margin: 0; color: var(--muted); font-size: 14px; }
.who a { color: var(--accent, #7dd3fc); font-weight: 700; }
.grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; padding: 12px 0 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
h1, h2 { margin: 0 0 8px; line-height: 1.2; }
h1 { font-size: 28px; }
h2 { font-size: 18px; }
p.lead { color: var(--muted); margin-top: 0; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0b141c;
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
}
textarea { min-height: 120px; resize: vertical; }
button, .btn {
  border: 0;
  background: var(--accent);
  color: #1a0d04;
  font-weight: 800;
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.ghost, .btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.drop {
  margin-top: 12px;
  border: 1.5px dashed #3d5166;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: #0b141c;
}
.drop.over { border-color: var(--accent); color: white; }
.files { margin: 8px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.chat-log { height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #0b141c; }
.bubble { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; }
.bubble.user { background: #1d3344; }
.bubble.bot { background: #14261c; }
.ticket { border-top: 1px solid var(--line); padding: 12px 0; }
.ticket h3 { margin: 0; font-size: 16px; }
.meta { color: var(--muted); font-size: 13px; }
.status { color: var(--ok); font-weight: 700; }
.note { color: #fecaca; }
.desk { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.desk select, .desk input { width: auto; min-width: 160px; }
.error { color: #fecaca; }
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
}
