:root {
  --bg: #f2efe8;
  --panel: rgba(255, 252, 246, 0.88);
  --panel-border: rgba(70, 52, 32, 0.12);
  --ink: #1e1b16;
  --muted: #6b6257;
  --accent: #0f7a6c;
  --accent-strong: #0a5f54;
  --shadow: 0 18px 50px rgba(58, 38, 20, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 122, 108, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(214, 148, 63, 0.12), transparent 24%),
    linear-gradient(180deg, #f8f4ed 0%, #ece3d5 100%);
}

.layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  margin: 18px 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--accent-strong);
  font-weight: 700;
}

h1, h2, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1;
  max-width: 12ch;
}

h2 {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.lede {
  max-width: 64ch;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.user-list,
.responses-list {
  display: grid;
  gap: 12px;
}

.user-card,
.response-card {
  border: 1px solid rgba(70, 52, 32, 0.1);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 14px;
}

.user-card {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.user-card:hover,
.user-card.selected {
  transform: translateY(-2px);
  border-color: rgba(15, 122, 108, 0.45);
  box-shadow: 0 10px 28px rgba(15, 122, 108, 0.12);
}

.user-card-header,
.response-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.user-meta,
.response-meta {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(15, 122, 108, 0.12);
  color: var(--accent-strong);
}

.status-pill.muted {
  background: rgba(30, 27, 22, 0.08);
  color: var(--muted);
}

.user-presence.online {
  background: rgba(47, 139, 84, 0.12);
  color: #1e6b3a;
}

.user-presence.idle {
  background: rgba(221, 143, 34, 0.14);
  color: #8e5d05;
}

.user-presence.offline {
  background: rgba(183, 61, 61, 0.12);
  color: #8c2525;
}

.user-presence.unknown {
  background: rgba(32, 108, 171, 0.12);
  color: #185784;
}

.presence-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.presence-dot.online {
  background: #27b05c;
}

.presence-dot.idle {
  background: #ef9b18;
}

.presence-dot.offline {
  background: #d34b4b;
}

.presence-dot.unknown {
  background: #4f98d8;
}

.form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

textarea,
select,
input {
  width: 100%;
  border: 1px solid rgba(70, 52, 32, 0.16);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 132px;
}

small {
  color: var(--muted);
  font-weight: 400;
}

button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  background: var(--accent);
  color: white;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border: 1px solid rgba(70, 52, 32, 0.12);
}

.result-box {
  margin: 16px 0 0;
  white-space: pre-wrap;
  background: #16130f;
  color: #efe7dc;
  border-radius: 18px;
  padding: 14px;
  min-height: 88px;
  overflow: auto;
}

.response-value,
.response-question {
  margin: 10px 0 0;
  line-height: 1.45;
}

.response-question {
  color: var(--muted);
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
  border: 1px dashed rgba(70, 52, 32, 0.16);
}

@media (max-width: 860px) {
  .layout {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

  .hero,
  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}
