:root {
  --bg: #f6f8fa; --card: #ffffff; --text: #1f2328; --muted: #656d76;
  --brand: #1f6feb; --brand-ink: #ffffff; --bot: #eef1f4; --line: #d0d7de;
  --error: #cf222e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117; --card: #161b22; --text: #e6edf3; --muted: #8b949e;
    --brand: #388bfd; --brand-ink: #ffffff; --bot: #21262d; --line: #30363d;
    --error: #f85149;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg); color: var(--text);
}
.view { min-height: 100dvh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--error); }

/* Login */
#login { align-items: center; justify-content: center; padding: 24px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px; width: 100%; max-width: 380px;
}
.card h1 { margin: 0 0 4px; font-size: 1.4rem; }
form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--muted); }
input {
  font: inherit; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg); color: var(--text);
}
input:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
button {
  font: inherit; font-weight: 600; cursor: pointer; border: none;
  background: var(--brand); color: var(--brand-ink); padding: 11px 14px; border-radius: 10px;
}
button:active { filter: brightness(.95); }
.link { background: none; color: var(--brand); padding: 6px; font-weight: 500; }

/* Chat */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  background: var(--card); border-bottom: 1px solid var(--line); font-weight: 600;
}
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 85%; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; }
.bubble.user { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.bubble.bot { align-self: flex-start; background: var(--bot); border-bottom-left-radius: 4px; }
.bubble.pending { opacity: .6; font-style: italic; }
.composer {
  display: flex; gap: 8px; padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--line); margin: 0;
}
.composer input { flex: 1; }
.composer button { padding: 0 16px; }

/* 👍/👎 visszajelzés a bot-válasz alatt */
.visszajelzes {
  margin-top: .4rem;
  display: flex;
  gap: .35rem;
  align-items: center;
  font-size: .8rem;
  color: #6b7280;
}
.vj-gomb {
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  cursor: pointer;
  font-size: .85rem;
  line-height: 1;
  padding: .2rem .45rem;
}
.vj-gomb:hover { background: #f3f4f6; }

/* US-10 riport panel */
.riport {
  border-bottom: 1px solid #e5e7eb;
  background: #fafafa;
  max-height: 45vh;
  overflow-y: auto;
  padding: .6rem .8rem;
}
.riport-fejlec { display: flex; justify-content: space-between; align-items: center; }
.riport-tartalom { font-size: .85rem; }
.riport-blokk { margin-top: .6rem; }
.riport-blokk h4 { margin: 0 0 .25rem; font-size: .85rem; }
.riport-blokk ul { margin: 0; padding-left: 1.1rem; }
.riport-blokk li { margin-bottom: .2rem; word-break: break-word; }

/* Felhasználó-kezelő űrlap */
.user-form { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0; }
.user-form input, .user-form select {
  padding: .3rem .4rem; border: 1px solid #d1d5db; border-radius: 6px; font-size: .85rem;
}
.user-form input { flex: 1 1 8rem; min-width: 6rem; }
.user-form button {
  padding: .3rem .7rem; border: 0; border-radius: 6px; background: #1f6feb; color: #fff;
  cursor: pointer; font-size: .85rem;
}

.vj-allapot { margin-left: .3rem; }

/* Nyitott fejlesztési tételek: a szöveg és a lezáró gombok egy sorban, hogy hosszú
   kérdésnél se csússzon szét a lista. */
.riport-blokk li {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  margin-bottom: .35rem;
}
.riport-blokk li > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.riport-blokk li .vj-gomb { flex: 0 0 auto; }
.riport-blokk li .vj-gomb[disabled] { opacity: .4; cursor: default; }
