:root {
  --red: #e2332b;
  --red-dark: #c02820;
  --ink: #1d1d1f;
  --muted: #6b6b70;
  --line: #e3e3e6;
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --radius: 10px;
  --focus: 0 0 0 3px rgba(226, 51, 43, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* Hlavička formulára */
.form-head { margin-bottom: 28px; }
.form-head .dept {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.form-head h1 {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.25;
}
.form-head .subtitle { color: var(--muted); font-size: 17px; margin: 0 0 8px; }
.form-head .legal { color: var(--muted); font-size: 13px; margin: 0; }
.form-head .pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}
.form-head .pdf-link:hover { border-color: var(--red); color: var(--red); }

/* Sekcie */
fieldset.section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 8px;
  margin: 0 0 20px;
}
fieldset.section legend {
  font-weight: 700;
  font-size: 15px;
  padding: 0 8px;
  margin-left: -8px;
}

.grid { display: flex; flex-wrap: wrap; gap: 0 16px; }
.field { flex: 1 1 100%; margin-bottom: 16px; min-width: 0; }
.field.half { flex: 1 1 calc(50% - 8px); min-width: 220px; }

.field > label.lbl {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.req { color: var(--red); }

input[type="text"], input[type="email"], input[type="tel"],
input[type="date"], input[type="number"], textarea, select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--red); box-shadow: var(--focus); }
textarea { resize: vertical; min-height: 90px; }

.help { font-size: 13px; color: var(--muted); margin-top: 5px; }
.static-text { font-size: 14px; color: var(--muted); }

/* Radio a checkbox */
.choice { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0; }
.choice input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); flex: none; }
.choice label { font-size: 15px; }
.choice-row { display: flex; gap: 18px; flex-wrap: wrap; }
.choice-row .choice { margin: 2px 0; }

/* Tabuľky (opakovateľné riadky) */
.tbl { width: 100%; }
.tbl .tbl-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 14px 2px;
  margin-bottom: 10px;
  position: relative;
  background: var(--bg-soft);
}
.tbl .tbl-row .grid { gap: 0 12px; }
.tbl .tbl-row .field { margin-bottom: 12px; }
.tbl .row-del {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}
.tbl .row-del:hover { color: var(--red); }
.tbl-add {
  border: 1px dashed var(--line);
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}
.tbl-add:hover { border-color: var(--red); color: var(--red); }

/* Poučenie */
.notice {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 13px;
  color: var(--muted);
  margin: 24px 0;
}
.notice h2 { font-size: 13px; margin: 0 0 8px; color: var(--ink); }
.notice p { margin: 0 0 8px; }
.notice p:last-child { margin-bottom: 0; }

/* Odoslanie */
.submit-bar { margin-top: 8px; }
button.submit {
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 999px;
  padding: 13px 34px;
  cursor: pointer;
}
button.submit:hover { background: var(--red-dark); }
button.submit[disabled] { opacity: 0.6; cursor: default; }

.msg { border-radius: var(--radius); padding: 16px 18px; margin: 20px 0; font-size: 15px; }
.msg.ok { background: #eef7ee; color: #1e5c24; }
.msg.err { background: #fdeeee; color: #93251f; }

.hp { position: absolute; left: -9999px; top: -9999px; }

/* Index (prehľad formulárov) */
.idx h1 { font-size: 26px; margin: 0 0 4px; }
.idx .lead { color: var(--muted); margin: 0 0 28px; }
.idx h2 { font-size: 17px; margin: 30px 0 10px; color: var(--red); }
.idx ul { list-style: none; margin: 0; padding: 0; }
.idx li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.idx li a.name { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.idx li a.name:hover { color: var(--red); }
.idx .acts { display: flex; gap: 8px; }
.idx .acts button, .idx .acts a {
  font: inherit;
  font-size: 13px;
  border: 1px solid var(--line);
  background: none;
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
}
.idx .acts button:hover, .idx .acts a:hover { border-color: var(--red); color: var(--red); }
