:root {
  --teal: #00b8c8;
  --teal-dark: #0093a1;
  --teal-soft: #dff6f8;
  --navy: #1b3a6b;
  --navy-deep: #071526;
  --blue: #2e7ae6;
  --ink: #102033;
  --muted: #5b6b7c;
  --line: #d7e3ea;
  --bg: #eef4f6;
  --white: #ffffff;
  --danger: #c23b4a;
  --ok: #1f8a5b;
  --shadow: 0 18px 50px rgba(7, 21, 38, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Figtree", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(0, 184, 200, 0.12), transparent 28%),
    radial-gradient(circle at 10% 20%, rgba(43, 122, 230, 0.08), transparent 24%),
    var(--bg);
  line-height: 1.5;
}

h1, h2, h3, .brand-word {
  font-family: "Sora", sans-serif;
  letter-spacing: -0.03em;
}

a { color: var(--teal-dark); }
img { max-width: 100%; }

.site-header {
  background: var(--navy-deep);
  color: white;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 4px solid var(--teal);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
}

.brand img {
  height: 46px;
  width: auto;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy small {
  color: rgba(255,255,255,0.68);
  font-size: 12px;
}

.header-nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.header-nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 32px auto 64px;
}

.hero, .card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
  overflow: hidden;
}

.kicker {
  color: var(--teal-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  margin: 0 0 8px;
}

.muted { color: var(--muted); }
.stack { display: grid; gap: 16px; }

.btn, button.btn, input[type="submit"].btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--teal);
  color: var(--navy-deep);
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  text-decoration: none;
  cursor: pointer;
  font-size: 15px;
}

.btn:hover { background: #17c5d4; }
.btn.secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn.navy {
  background: var(--navy);
  color: white;
}

.flash {
  margin: 16px auto;
  width: min(1080px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
}
.flash.success { background: #e7f7ee; color: var(--ok); }
.flash.error { background: #fdecee; color: var(--danger); }
.flash.info { background: var(--teal-soft); color: var(--navy); }

label { display: block; font-weight: 650; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fbfefe;
}
textarea { min-height: 90px; resize: vertical; }
.form-row { margin-bottom: 16px; }
.help { font-size: 13px; color: var(--muted); margin-top: 6px; }
.errors { color: var(--danger); font-size: 13px; margin-top: 6px; }

.progress {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.progress span {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: white;
  color: var(--muted);
  border: 1px solid var(--line);
}
.progress span.active {
  background: var(--teal);
  color: var(--navy-deep);
  border-color: var(--teal);
  font-weight: 700;
}
.progress span.done {
  background: var(--teal-soft);
  color: var(--navy);
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.check-list li {
  background: #f6fbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.check-list label {
  font-weight: 500;
  display: inline;
  margin: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--teal-soft);
  color: var(--navy);
}
.badge.warn { background: #fff4d6; color: #8a5b00; }
.badge.ok { background: #e7f7ee; color: var(--ok); }

.pdf-frame {
  width: 100%;
  min-height: 720px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f4f7f8;
}

.sig-wrap {
  border: 1px dashed var(--navy);
  border-radius: 12px;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(0,184,200,0.08) 36px),
    white;
  overflow: hidden;
}
#signature-pad, .sig-canvas {
  width: 100%;
  height: 180px;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 24px;
}

.copy-box {
  background: #f4fbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

@media (max-width: 800px) {
  .hero, .grid-2 { grid-template-columns: 1fr; }
  .brand-copy { display: none; }
  .site-header { padding: 12px 16px; }
}
