/* Ankieta na kawalerski — style */

:root {
  --bg: #0f1020;
  --bg2: #161734;
  --card: #1b1d3e;
  --card-soft: #23264f;
  --accent: #ff5d73;
  --accent2: #ffb454;
  --accent3: #5ee0c4;
  --text: #f2f3ff;
  --muted: #a6a8c8;
  --line: #2c2f5c;
  --ok: #5ee0c4;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255,93,115,.25), transparent 60%),
    radial-gradient(1000px 500px at -10% 10%, rgba(94,224,196,.20), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 18px 80px;
}
.wrap.admin { max-width: 920px; }

/* Hero / nagłówek */
.hero { padding: 18px 4px 10px; }
.hero h1 {
  font-size: 2.1rem;
  margin: 0 0 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lead { color: var(--muted); margin: 0 0 10px; }
.req { color: var(--accent); font-weight: 700; }
.req-note { color: var(--muted); font-size: .85rem; margin-top: 14px; }

/* Karty */
.card {
  background: linear-gradient(180deg, var(--card), var(--bg2));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 8px;
  margin: 18px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.section-title {
  font-size: 1.15rem;
  margin: 0 0 6px;
  color: var(--accent2);
  letter-spacing: .3px;
}

/* Pytania */
.question { padding: 14px 0 18px; border-bottom: 1px dashed var(--line); }
.question:last-child { border-bottom: none; }
.qlabel { display: block; font-weight: 600; margin-bottom: 6px; }
.qnum { color: var(--accent); font-weight: 800; margin-right: 4px; }
.help { color: var(--muted); font-size: .85rem; margin: 0 0 10px; }

input[type="text"], textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,93,115,.18);
}
textarea { resize: vertical; }
.other-input { margin-top: 10px; }

/* Opcje radio / checkbox */
.opts { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.opt {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.opt:hover { border-color: var(--accent); }
.opt input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.opt span { flex: 1; }

/* Przycisk wyślij */
.submit-bar { margin: 26px 0 10px; text-align: center; }
button[type="submit"] {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #1a1030;
  font-weight: 800;
  font-size: 1.05rem;
  border: none;
  border-radius: 12px;
  padding: 14px 34px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255,93,115,.35);
  transition: transform .1s, box-shadow .15s;
}
button[type="submit"]:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(255,93,115,.45); }
button[type="submit"]:active { transform: translateY(0); }

.foot { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 24px; }

/* Strona "dzięki" */
.thanks { text-align: center; padding: 40px 22px; }
.big-emoji { font-size: 4rem; }
.thanks h1 { margin: 6px 0 10px; }
.btn-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--text);
  text-decoration: none;
  background: var(--card-soft);
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 10px;
  transition: border-color .15s;
}
.btn-link:hover { border-color: var(--accent); }
.btn-link.ghost { background: transparent; }

/* ---------------- Panel admina ---------------- */
.admin-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.admin-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge {
  background: var(--accent3);
  color: #06251f;
  font-weight: 800;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: .9rem;
}
.hint { color: var(--muted); font-size: .85rem; margin: 0 0 12px; }

/* Słupki podsumowania */
.sum-block { padding: 12px 0 16px; border-bottom: 1px dashed var(--line); }
.sum-block:last-child { border-bottom: none; }
.sum-block h3 { font-size: 1rem; margin: 0 0 12px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 36%) 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 7px;
  font-size: .92rem;
}
.bar-label { color: var(--text); }
.bar-track { background: var(--bg); border-radius: 999px; height: 16px; overflow: hidden; border: 1px solid var(--line); }
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px;
  min-width: 2px;
  transition: width .4s;
}
.bar-count { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Odpowiedzi pojedyncze */
.resp {
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.resp summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.resp summary::-webkit-details-marker { display: none; }
.resp summary::before { content: "▸"; color: var(--accent); font-weight: 800; }
.resp[open] summary::before { content: "▾"; }
.resp-name { font-weight: 700; }
.resp-meta { color: var(--muted); font-size: .85rem; flex: 1; }
.del-form { margin: 0; }
.del-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--accent);
  border-radius: 8px;
  padding: 4px 9px;
  cursor: pointer;
  font-size: .95rem;
}
.del-btn:hover { border-color: var(--accent); background: rgba(255,93,115,.12); }

.ans-list { padding: 4px 16px 14px; }
.ans-row {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.ans-q { color: var(--muted); font-size: .9rem; }
.ans-v { font-size: .95rem; word-break: break-word; }
.empty { color: #5b5e85; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--accent3);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .82rem;
}

/* ---------------- Kreator instalacyjny ---------------- */
.req-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}
.req-row:last-child { border-bottom: none; }
.req-icon { font-size: 1.1rem; }
.req-name { flex: 1; min-width: 180px; }
.req-info { font-size: .85rem; color: var(--muted); }
.req-info.ok { color: var(--accent3); }
.req-info.bad { color: var(--accent); }
button[type="submit"][disabled] {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}
input[type="password"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 1rem;
  font-family: inherit;
}
input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,93,115,.18);
}
code {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: .9em;
}

@media (max-width: 560px) {
  .hero h1 { font-size: 1.7rem; }
  .bar-row { grid-template-columns: 1fr; gap: 4px; }
  .bar-count { justify-self: start; }
  .ans-row { grid-template-columns: 1fr; gap: 3px; }
}
