:root {
  --bg-top: #e8ecef;
  --bg-bottom: #f6f3ee;
  --card: #ffffff;
  --line: #d4d8dc;
  --text: #1d2630;
  --muted: #5a6675;
  --brand: #0e6f66;
  --brand-soft: #d8ece9;
  --cta: #113c62;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 8%, #d9e9f9 0%, transparent 35%),
    radial-gradient(circle at 15% 85%, #e8f2ea 0%, transparent 40%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(36, 59, 79, 0.09);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

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

h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.2;
}

h2, h3 {
  margin-top: 0;
}

.subtext,
.step-description,
.help,
small,
.privacy-note p {
  color: var(--muted);
}

.hero-note {
  min-width: 210px;
  display: grid;
  gap: 10px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #f9fcff 0%, #f4f7fa 100%);
}

.metric span {
  display: block;
  font-size: 19px;
  font-weight: 700;
}

.progress-bar {
  height: 9px;
  border-radius: 999px;
  background: #dfe5ea;
  overflow: hidden;
  margin-bottom: 20px;
}

#progressFill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand), #31a594);
}

.field {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  border: 1px solid #c6cdd5;
  border-radius: 11px;
  padding: 12px;
  font-size: 15px;
  color: var(--text);
  background: #fff;
}

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

.option-list {
  display: grid;
  gap: 10px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
  background: #fff;
}

.option input[type="checkbox"],
.option input[type="radio"] {
  margin-top: 2px;
}

.privacy-note {
  margin: 4px 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #f7fafc;
}

.privacy-note h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

button {
  border: none;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: var(--cta);
  color: #fff;
}

button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hidden {
  display: none;
}

pre {
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #f8fafb;
  line-height: 1.45;
}

.result-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 16px 0;
}

.result-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.pdf-link {
  display: inline-block;
  margin: 2px 0 14px;
  text-decoration: none;
  color: #0b4b8a;
  font-weight: 600;
}

.pdf-link:hover {
  text-decoration: underline;
}

.legal h2 {
  margin-top: 18px;
  font-size: 20px;
}

.legal p {
  line-height: 1.55;
}

.narrow {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.button-link {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  font-weight: 600;
}

.button-link:hover {
  background: #f7fafc;
}

.admin-filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.actions-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.error {
  color: #8f1f1f;
}

.success {
  color: #145c31;
}

.docs-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (max-width: 820px) {
  .hero {
    flex-direction: column;
  }

  h1 {
    font-size: 28px;
  }

  .page {
    padding: 16px;
  }
}
