:root {
  --ink: #14213d;
  --deep: #00264f;
  --blue: #004899;
  --blue-soft: #eaf1f8;
  --yellow: #ffdc00;
  --green: #9ccb8f;
  --paper: #f7f4ec;
  --white: #ffffff;
  --muted: #5b6472;
  --line: #d8dee8;
  --error: #b42318;
  --shadow: 0 18px 50px rgba(0, 38, 79, 0.08);
}

* { box-sizing: border-box; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(156, 203, 143, 0.18), transparent 28%),
    radial-gradient(circle at 92% 6%, rgba(255, 220, 0, 0.14), transparent 24%),
    var(--paper);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 6vw;
  background: rgba(247, 244, 236, 0.88);
  border-bottom: 1px solid rgba(0, 72, 153, 0.08);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--deep);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.brand-logo {
  display: block;
  height: 38px;
  width: auto;
}

.brand strong { color: var(--blue); }

.topbar-note {
  color: var(--muted);
  font-size: 13px;
}

.page {
  width: min(940px, 92vw);
  margin: 0 auto;
  padding: 44px 0 60px;
}

.hero { margin-bottom: 28px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 14px;
  color: var(--deep);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lead {
  margin: 0;
  max-width: 760px;
  color: #33415c;
  font-size: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid rgba(0, 72, 153, 0.14);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(0, 72, 153, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #2f7ad1);
  border-radius: inherit;
  transition: width 180ms ease;
}

#progress-label {
  min-width: 52px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.card {
  margin: 0 0 22px;
  background: var(--white);
  border: 1px solid rgba(0, 72, 153, 0.1);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section-head {
  padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(0, 72, 153, 0.08);
}

.section-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0;
  color: var(--deep);
  font-size: 24px;
  letter-spacing: -0.01em;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 22px 28px 26px;
}

.field label,
.other-wrap label {
  display: block;
  margin-bottom: 7px;
  color: var(--deep);
  font-size: 13px;
  font-weight: 700;
}

.req { color: var(--error); }

input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 13px 15px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

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

input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 72, 153, 0.1);
}

.question {
  border-top: 1px solid rgba(0, 72, 153, 0.08);
}

.question:first-of-type { border-top: 0; }

.q-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 22px 28px 16px;
  background: var(--blue-soft);
  border-left: 6px solid var(--blue);
}

.q-num {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.q-head h3 {
  margin: 0 0 4px;
  color: var(--deep);
  font-size: 19px;
  line-height: 1.25;
}

.hint {
  margin: 0;
  color: #4f5d75;
  font-size: 13.5px;
}

.q-body { padding: 18px 28px 24px; }

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.choice:hover { border-color: rgba(0, 72, 153, 0.45); }

.choice input {
  margin: 3px 0 0;
  accent-color: var(--blue);
  flex: 0 0 auto;
}

.choice span { font-size: 14.5px; }

.choice:has(input:checked) {
  border-color: var(--blue);
  background: #f3f8ff;
}

.other-wrap {
  display: none;
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px dashed rgba(0, 72, 153, 0.28);
}

.other-wrap.show { display: block; }

.consent {
  padding: 20px 28px 24px;
  border-top: 1px solid rgba(0, 72, 153, 0.08);
}

.consent-choice {
  border: 0;
  padding: 0;
  background: transparent;
}

.consent-choice:hover { border-color: transparent; }

.error {
  margin: 7px 0 0;
  color: var(--error);
  font-size: 13px;
  font-weight: 600;
}

.has-error input,
.has-error textarea,
.has-error .choice-grid {
  border-color: var(--error);
}

.submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 8px 0 26px;
  padding: 20px 24px;
  border-radius: 18px;
  background: var(--deep);
  color: #fff;
  box-shadow: 0 18px 40px rgba(0, 38, 79, 0.2);
}

.submit-bar strong { display: block; font-size: 15px; }
.submit-bar span { display: block; color: rgba(255, 255, 255, 0.72); font-size: 13px; }

.btn {
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--deep);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  padding: 14px 20px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(255, 220, 0, 0.25); }
.btn:active { transform: translateY(0); }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.thanks {
  max-width: 720px;
  margin: 8vh auto;
  padding: 40px;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
  text-align: center;
}

.thanks .check {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: var(--green);
  color: var(--deep);
  font-size: 30px;
  font-weight: 800;
}

.thanks h1 { font-size: clamp(28px, 4vw, 42px); }

.thanks p { color: #33415c; }

.thanks .btn { display: inline-block; margin-top: 14px; text-decoration: none; }

/* Admin */
.admin-page { width: min(1200px, 94vw); margin: 0 auto; padding: 40px 0; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; }
.admin-head h1 { font-size: 32px; margin: 0; }
.admin-actions { display: flex; gap: 10px; }
.admin-actions a { color: var(--blue); font-weight: 700; text-decoration: none; font-size: 14px; }
.table-wrap { overflow-x: auto; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #eef1f6; vertical-align: top; }
th { background: var(--blue-soft); color: var(--deep); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
tr:hover td { background: #fbfdff; }
a { color: var(--blue); }
.detail-grid { display: grid; grid-template-columns: 220px 1fr; gap: 0; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.detail-grid dt, .detail-grid dd { margin: 0; padding: 14px 18px; border-bottom: 1px solid #eef1f6; }
.detail-grid dt { background: var(--blue-soft); font-weight: 700; color: var(--deep); }
.detail-grid dd { white-space: pre-wrap; }
.empty { padding: 30px; color: var(--muted); }

@media (max-width: 720px) {
  .topbar { padding: 14px 5vw; }
  .topbar-note { display: none; }
  .page { width: min(100% - 28px, 940px); padding-top: 28px; }
  .grid-2, .choice-grid { grid-template-columns: 1fr; }
  .section-head, .q-head, .q-body, .consent { padding-left: 18px; padding-right: 18px; }
  .q-head { gap: 10px; }
  .q-num { flex-basis: 30px; width: 30px; height: 30px; font-size: 13px; }
  .q-head h3 { font-size: 17px; }
  .submit-bar { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .footer { flex-direction: column; gap: 4px; }
  .detail-grid { grid-template-columns: 1fr; }
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.delete-form { display: inline; margin: 0; }

.btn-delete {
  border: 1px solid rgba(180, 35, 24, 0.35);
  background: #fff;
  color: #b42318;
  border-radius: 8px;
  padding: 5px 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-delete:hover {
  background: #fff2f0;
  border-color: #b42318;
}

.alert-success {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #eaf7ee;
  border: 1px solid #b7e1c1;
  color: #1e6b35;
  font-size: 14px;
  font-weight: 600;
}

/* Administration Hostinger — actions secondaires */
.admin-actions form { margin: 0; }
.btn-secondary {
  background: #fff;
  border: 1px solid var(--blue);
  color: var(--blue);
  padding: 7px 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.btn-secondary:hover { background: #eef2ff; }
