:root { font-family: system-ui, Arial, sans-serif; }

body { margin: 0; background: #f6f7fb; }

.wrap { max-width: 980px; margin: 0 auto; padding: 24px; }

.card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 8px 22px rgba(0,0,0,.06);
  margin-bottom: 16px;
}

h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 0 0 10px; }

label { display:block; font-size: 13px; margin: 10px 0 6px; color: #333; }

input, select, textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7dbe7;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

textarea { min-height: 110px; resize: vertical; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display:grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.btns { display:flex; gap: 10px; margin-top: 14px; }
button { border: 0; border-radius: 10px; padding: 10px 14px; cursor:pointer; font-weight: 600; }
.primary { background: #2b5cff; color: white; }
.ghost { background: #eef2ff; color: #1f2a44; }

.muted { color:#6b7280; font-size: 13px; }

.stepper { display:flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 18px; }
.pill { padding: 6px 10px; border-radius: 6px; background:#eef2ff; font-size: 12px; }
.pill.active { background:#2b5cff; color:#fff; }

.hidden {
  display: none !important;
}

.ok { color: #0f7b3e; font-weight: 600; }
.err { color: #b42318; font-weight: 600; }

.hp { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }

.backlink { margin-top: 10px; }

.status { margin-top: 10px; }

.consentRow {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
}

.consentRow input[type="checkbox"]{
  width: auto;
  margin-top: 3px;
}

/* =========================
   Professional form controls
   ========================= */

/* Slightly nicer page rhythm */
.wrap { padding: 28px 24px; }
.card { border: 1px solid rgba(15, 23, 42, 0.06); }

/* Typography tweaks */
h1 { font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: 16px; line-height: 1.4; margin-top: 6px; }
label { font-size: 13px; font-weight: 600; color: #0f172a; }

/* Inputs */
input, select, textarea {
  width: 100%;
  box-sizing: border-box;

  border: 1px solid #cbd5e1;          /* slate-300 */
  border-radius: 6px;

  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.4;
  color: #0f172a;
  background: #fff;

  transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
  opacity: 1;        /* Chrome */
  font-weight: 500;
}


input, select, textarea{
  font-family: inherit;
}

/* Focus ring */
input:focus, select:focus, textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* Hover */
input:hover, select:hover, textarea:hover {
  border-color: #94a3b8; /* slate-400 */
}

/* Textarea improvements */
textarea {
  min-height: 130px;
  resize: vertical;
}

/* File input (modern-ish) */
input[type="file"]{
  padding: 10px 12px;
}
input[type="file"]::file-selector-button {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 600;
  margin-right: 10px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
input[type="file"]::file-selector-button:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}


/* Show invalid styling only after user attempts to proceed */
form.was-submitted input:invalid,
form.was-submitted select:invalid,
form.was-submitted textarea:invalid{
  border-color: #fca5a5; /* red-300 */
}

form.was-submitted input:invalid:focus,
form.was-submitted select:invalid:focus,
form.was-submitted textarea:invalid:focus{
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}


/* =========================
   Navigation buttons (match navbar Back button)
   ========================= */

.btns{
  display: flex;
  gap: 12px;
  margin-top: 20px;
  align-items: center;
  justify-content: space-between;
}

.btns button{
  appearance: none;
  -webkit-appearance: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 16px;      /* like px-4 py-2 */
  min-height: 44px;        /* stronger height */
  min-width: 120px;        /* prevents tiny buttons */

  border-radius: 8px;      /* rounded-lg feel */
  border: 1px solid transparent;

  font-size: 14px;
  font-weight: 600;
  line-height: 1;

  cursor: pointer;
  user-select: none;

  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}

/* focus like Tailwind ring */
.btns button:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

/* Ghost = like navbar Back button */
.btns .ghost{
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;        /* border-slate-300 */
}
.btns .ghost:hover{
  background: #f8fafc;          /* hover:bg-slate-50 */
  border-color: #94a3b8;
}
.btns .ghost:active{
  transform: translateY(1px);
}

/* Primary = strong CTA */
.btns .primary{
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.btns .primary:hover{
  background: #1d4ed8;
  border-color: #1d4ed8;
}
.btns .primary:active{
  transform: translateY(1px);
}

/* Disabled */
.btns button:disabled{
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

/* Mobile: full width buttons */
@media (max-width: 720px){
  .btns{
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .btns button{
    width: 100%;
    min-width: 0;
  }
}


/* Step pills nicer */
.pill{
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-weight: 600;
}
.pill.active{
  background: #2563eb;
  color: #fff;
  border-color: rgba(255,255,255,0.25);
}

/* Status messages */
.status{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.ok{ color: #166534; }   /* green-800 */
.err{ color: #991b1b; }  /* red-800 */

/* Consent row spacing */
.consentRow{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 12px 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 6px;
}
.consentRow input[type="checkbox"]{
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

/* Mobile stacking */
@media (max-width: 720px){
  .row{ grid-template-columns: 1fr; }
  .row3{ grid-template-columns: 1fr; }
  .btns{ flex-direction: column; align-items: stretch; }
  button{ width: 100%; }
}

select:invalid { color: #94a3b8; }  /* grey when still on "Select…" */
select:valid { color: #0f172a; }
