:root {
  --primary: #3866b8;
  --primary-dark: #2c529a;
  --title: #2f5fb3;
  --text: #1a1f2e;
  --label: #2b3445;
  --muted: #6b7280;
  --border: #d8dce5;
  --error: #c53030;
  --success: #2f855a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #f7f8fc 0%, #eef1f8 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 16px 60px;
}
.brand { text-align: center; max-width: 680px; margin-bottom: 32px; }
.brand img { width: 72px; height: auto; margin-bottom: 12px; }
.brand h1 { font-size: 36px; font-weight: 800; color: var(--title); letter-spacing: -0.5px; }
.divider { width: 56px; height: 4px; border-radius: 2px; background: var(--primary); margin: 16px auto 0; }

.card {
  width: 100%;
  max-width: 680px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e6e9f0;
  box-shadow: 0 12px 40px rgba(30, 50, 100, 0.08);
  overflow: hidden;
}
.card-bar { height: 5px; background: linear-gradient(90deg, #2f5fb3, #5a8be0, #2f5fb3); }
.card-body { padding: 40px 44px 36px; }
.card h2 { text-align: center; font-size: 28px; font-weight: 800; }
.card .sub { text-align: center; color: var(--muted); margin: 10px auto 32px; font-size: 15px; line-height: 1.6; max-width: 480px; }

.section-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--primary); margin: 8px 0 16px; padding-bottom: 8px; border-bottom: 1px solid #eef0f4;
}
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.full { grid-column: 1 / -1; }

.field { margin-bottom: 20px; }
label { display: block; font-weight: 700; font-size: 14px; color: var(--label); margin-bottom: 8px; }
label .req { color: var(--error); margin-left: 2px; }
input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(56, 102, 184, 0.15); }
.field.invalid input { border-color: var(--error); }
.err { display: none; color: var(--error); font-size: 13px; margin-top: 6px; }
.field.invalid .err { display: block; }

.consent {
  display: flex; gap: 12px; align-items: flex-start;
  background: #f6f8fc; border: 1px solid #e6e9f0; border-radius: 10px;
  padding: 16px 18px; margin: 8px 0 6px;
}
.consent input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }
.consent label { font-weight: 400; font-size: 14px; line-height: 1.55; color: var(--label); margin: 0; cursor: pointer; }
.consent a { color: var(--primary); font-weight: 700; text-decoration: none; }
.consent a:hover { text-decoration: underline; }
.consent-err { display: none; color: var(--error); font-size: 13px; margin-bottom: 10px; }
.consent-err.show { display: block; }

.btn {width: 100%;margin-top: 18px;padding: 16px;font-size: 16px;font-weight: 700;color: #fff;background: var(--primary);border: none;border-radius: 10px;cursor: pointer;box-shadow: 0 6px 16px rgba(56, 102, 184, 0.25);transition: background .2s, transform .1s;}
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled,.btn:disabled:hover {background: #a9b8d6;box-shadow: none;cursor: not-allowed;transform: none;}
.submit-hint {margin-top: 14px;font-size: 13px;color: var(--muted);text-align: center;line-height: 1.5;}
.submit-hint[hidden] {display: none;}
.back {margin-top: 26px; padding-top: 20px; border-top: 1px solid #eef0f4;text-align: center; font-size: 15px; color: var(--muted);}
.back a { color: var(--primary); font-weight: 700; text-decoration: none; }
.back a:hover { text-decoration: underline; }

/* ---------- Pop-up ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(15, 25, 50, 0.55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
  z-index: 100;
}
.overlay.show { opacity: 1; visibility: visible; }
.modal {
  width: 100%; max-width: 480px;
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 25, 50, 0.3);
  transform: translateY(16px) scale(.97);
  transition: transform .25s;
  text-align: center;
}
.overlay.show .modal { transform: none; }
.modal-body { padding: 40px 36px 34px; }
.check {
  width: 72px; height: 72px; border-radius: 50%;
  background: #e8f5ee; color: var(--success);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
}
.modal h3 { font-size: 24px; font-weight: 800; margin-bottom: 14px; }
.modal p { font-size: 15px; line-height: 1.65; color: #4a5263; margin-bottom: 12px; }
.modal .note { font-size: 13px; color: var(--muted); }
.modal .btn { margin-top: 20px; }

@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .card-body { padding: 30px 22px 28px; }
  .brand h1 { font-size: 30px; }
  .modal-body { padding: 32px 22px 26px; }
}
