:root {
  --bg: #11100d;
  --panel: rgba(255, 250, 239, 0.08);
  --panel-strong: rgba(255, 250, 239, 0.13);
  --text: #fff8e8;
  --muted: #b9ad94;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #ffb000;
  --accent-2: #53e0c2;
  --danger: #ff6b6b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Avenir Next, Trebuchet MS, Verdana, sans-serif;
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 176, 0, 0.27), transparent 28rem),
    radial-gradient(circle at 86% 18%, rgba(83, 224, 194, 0.2), transparent 24rem),
    linear-gradient(135deg, #17130d 0%, #0b1115 55%, #1a120e 100%);
}

button, input, textarea, select { font: inherit; }

button {
  border: 0;
  border-radius: 16px;
  padding: 12px 18px;
  color: #17130d;
  background: linear-gradient(135deg, var(--accent), #ffd36a);
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(255, 176, 0, 0.18);
}

button:disabled { opacity: 0.55; cursor: not-allowed; }
button.ghost { color: var(--text); background: var(--panel-strong); box-shadow: none; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px 14px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.25);
  outline: none;
}

textarea { resize: vertical; }
select option { background: #15120f; color: var(--text); }

.shell { width: min(1280px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0; }
.hero { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-bottom: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px; font-weight: 900; }
h1 { margin: 0; font-size: clamp(36px, 7vw, 82px); line-height: 0.9; letter-spacing: -0.06em; max-width: 760px; }
.subtitle { max-width: 680px; color: var(--muted); font-size: 18px; line-height: 1.55; }

.status-card, .panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.status-card { display: flex; gap: 12px; align-items: center; min-width: 230px; padding: 16px; border-radius: 24px; }
.status-card small { color: var(--muted); display: block; margin-top: 3px; }
.dot { width: 13px; height: 13px; border-radius: 999px; background: var(--danger); box-shadow: 0 0 22px var(--danger); }
.dot.ok { background: var(--accent-2); box-shadow: 0 0 22px var(--accent-2); }

.panel { border-radius: 28px; padding: 22px; }
.grid { display: grid; grid-template-columns: 390px 1fr; gap: 22px; align-items: start; }
.section-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
h2 { margin: 0; font-size: 18px; letter-spacing: -0.02em; }
.divider { height: 1px; background: var(--line); margin: 22px 0; }
.checkline { display: flex; gap: 10px; align-items: center; margin: 14px 0; color: var(--muted); }
.checkline input { width: auto; }
.field-label { display: block; margin: 12px 0 8px; color: var(--muted); }
.timer-row, .row { display: flex; align-items: center; gap: 10px; }
.timer-row input { max-width: 120px; }
.code-block { overflow: auto; white-space: pre-wrap; color: #ffe1a0; background: rgba(0, 0, 0, 0.3); border-radius: 18px; padding: 14px; border: 1px solid var(--line); }

.chat-panel { min-height: 660px; display: flex; flex-direction: column; }
.messages { flex: 1; overflow: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 14px; }
.message { max-width: 78%; padding: 15px 16px; border-radius: 22px; border: 1px solid var(--line); animation: rise 260ms ease-out; }
.message.user { align-self: flex-end; background: rgba(255, 176, 0, 0.15); }
.message.assistant { align-self: flex-start; background: rgba(83, 224, 194, 0.12); }
.message-meta { color: var(--muted); font-size: 12px; margin-bottom: 7px; display: flex; gap: 8px; }
.message p { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.message audio { width: 100%; margin-top: 12px; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 18px; align-items: end; }

.tasks-panel { margin-top: 22px; }
.tasks { display: grid; gap: 10px; }
.task { display: grid; grid-template-columns: 160px 1fr 100px; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(0, 0, 0, 0.18); }
.task small { color: var(--muted); }
.badge { justify-self: end; padding: 6px 10px; border-radius: 999px; background: var(--panel-strong); color: var(--accent-2); font-size: 12px; font-weight: 800; }
.hidden { display: none; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 920px) {
  .hero { align-items: stretch; flex-direction: column; }
  .grid { grid-template-columns: 1fr; }
  .composer { grid-template-columns: 1fr; }
  .message { max-width: 100%; }
  .task { grid-template-columns: 1fr; }
  .badge { justify-self: start; }
}
