:root {
  --brand: #0d3b66; --brand-dark: #082a4a; --accent: #1d7a8c; --bg: #f4f6f8; --card-bg: #fff;
  --border: #d7dde3; --text: #1c2733; --muted: #5b6b7a; --error: #c1121f; --success: #2e7d32; --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); }
[hidden] { display: none !important; }
main.page, #app { max-width: 640px; margin: 0 auto; padding: 24px 16px 64px; }

.header { text-align: center; margin-bottom: 24px; }
.header h1 { color: var(--brand); font-size: 1.6rem; margin: 0 0 6px; }
.subtitle { color: var(--muted); margin: 0; font-size: .95rem; }
.card { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.notice { background: #eef4f6; border-radius: 8px; padding: 10px 14px; color: var(--muted); font-size: .9rem; margin: 0 0 16px; }

.field { margin-bottom: 16px; }
.field > label, legend { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; padding: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
.help { color: var(--muted); font-size: .85rem; margin: 0 0 6px; }
.req { color: var(--error); }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=password], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: #fff; color: var(--text);
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,122,140,.15); }
.opt { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 6px 0; }
.opt input { width: auto; }

.prefixed { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.prefixed:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,122,140,.15); }
.prefix { display: flex; align-items: center; padding: 0 14px; background: var(--bg); color: var(--muted); font-weight: 600; white-space: nowrap; border-right: 1px solid var(--border); }
.prefixed input, .prefixed input:focus { border: none; border-radius: 0; box-shadow: none; flex: 1; min-width: 0; }

.group-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; background: #fbfcfd; }
.item-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.item-title { font-size: 1.05rem; color: var(--brand); margin: 0; }
.group-item .field:last-child { margin-bottom: 0; }

.btn { display: inline-block; border: none; border-radius: 8px; font: inherit; font-weight: 600; padding: 13px 20px; cursor: pointer; text-align: center; transition: background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { width: 100%; background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn:disabled { background: #93a3b0; cursor: not-allowed; }
.btn-secondary { width: 100%; background: #eef4f6; color: var(--accent); border: 2px dashed var(--accent); margin-bottom: 24px; }
.btn-secondary:hover { background: #e2eef1; }
.btn-remove { background: none; border: none; color: var(--error); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; padding: 4px 6px; }
.btn-remove:hover { text-decoration: underline; }
.submit-row { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); }

.error-text { color: var(--error); font-size: .85rem; margin: 6px 0 0; }
.form-level-error { color: var(--error); background: #fdecec; border: 1px solid #f5c2c2; border-radius: 8px; padding: 12px 14px; margin-top: 16px; font-size: .9rem; }
.has-error > input, .has-error > select, .has-error > textarea, .has-error > .prefixed { border-color: var(--error); }
.turnstile { margin: 12px 0; }

.success { text-align: center; }
.success-icon { width: 56px; height: 56px; border-radius: 50%; background: #e6f4ea; color: var(--success); font-size: 1.8rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.success h2 { color: var(--success); margin: 0 0 8px; }
.success-summary { background: #f6f8fa; border-radius: 8px; padding: 14px 18px; margin: 18px 0; text-align: left; }
.success-summary p { margin: 4px 0; }
.email-warning { color: #8a6d00; background: #fff8e1; border: 1px solid #ffe082; border-radius: 8px; padding: 10px 14px; font-size: .85rem; margin-bottom: 16px; }

@media (max-width: 480px) { .card { padding: 18px; } .header h1 { font-size: 1.35rem; } }
