* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #F5F0E8;
  font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif;
  color: #0A0A0A;
}
::placeholder { color: rgba(10, 10, 10, 0.32); }
a { color: #248E1F; text-decoration: none; }
a:hover { color: #1c6f18; }
input, textarea, button { font-family: inherit; }
button { font: inherit; }

@keyframes fpFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.fp-page {
  min-height: 100vh;
  background: #F5F0E8;
  display: flex;
  flex-direction: column;
}

/* Header */
.fp-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  background: #17601C;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  direction: ltr;
}
.fp-logo-pill {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 6px 11px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}
.fp-logo-pill img { display: block; height: 40px; width: auto; }
.fp-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: none;
  border-radius: 999px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  color: #0A0A0A;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}
.fp-lang-btn:hover { background: #EFEDE7; }

/* Layout */
.fp-main {
  display: flex;
  justify-content: center;
  padding: 20px 16px 48px;
}
.fp-container {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
}

.fp-title {
  margin: 0;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.fp-subtitle {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(10, 10, 10, 0.55);
}
.fp-intro { margin: 6px 0 22px; }

.fp-sections { display: flex; flex-direction: column; gap: 24px; }

.fp-label-row { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.fp-label { font-size: 15px; font-weight: 600; }
.fp-required { font-size: 11.5px; font-weight: 600; color: #EC0401; }
.fp-optional { font-size: 11.5px; font-weight: 500; color: rgba(10, 10, 10, 0.42); }
.fp-error { margin: 9px 2px 0; font-size: 13px; font-weight: 500; color: #EC0401; }

/* Category list */
.fp-cat-list { display: flex; flex-direction: column; gap: 10px; }
.fp-cat-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(10, 10, 10, 0.12);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  text-align: start;
}
.fp-cat-btn.selected::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid #248E1F;
  border-radius: 16px;
  background: rgba(36, 142, 31, 0.07);
  pointer-events: none;
}
.fp-cat-icon {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #248E1F;
}
.fp-cat-icon.dark { background: #0A0A0A; }
.fp-cat-label { flex: 1; font-size: 15px; font-weight: 600; text-align: start; z-index: 1; }
.fp-cat-check {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; z-index: 1;
}
.fp-cat-check.on { background: #248E1F; }
.fp-cat-check.off { border: 2px solid rgba(10, 10, 10, 0.16); }

/* Inputs */
.fp-input, .fp-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid rgba(10, 10, 10, 0.14);
  border-radius: 14px;
  background: #fff;
  font-size: 16px;
  color: #0A0A0A;
  outline: none;
}
.fp-textarea { line-height: 1.5; min-height: 132px; resize: vertical; }
.fp-input:focus, .fp-textarea:focus {
  border-color: #248E1F;
  box-shadow: 0 0 0 3px rgba(36, 142, 31, 0.13);
}
.fp-field-note { display: block; font-size: 13px; font-weight: 500; color: rgba(10, 10, 10, 0.55); margin-bottom: 7px; }
.fp-field-note.small { font-size: 13.5px; color: rgba(10, 10, 10, 0.6); }

/* When */
.fp-when-list { display: flex; gap: 8px; }
.fp-when-btn {
  position: relative;
  flex: 1;
  padding: 13px 8px;
  border: 1.5px solid rgba(10, 10, 10, 0.12);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: #0A0A0A;
  line-height: 1.25;
}
.fp-when-btn span { position: relative; z-index: 1; }
.fp-when-btn.selected::after {
  content: '';
  position: absolute; inset: 0;
  border: 2px solid #248E1F; border-radius: 13px;
  background: rgba(36, 142, 31, 0.08);
  pointer-events: none;
}
.fp-conditional { margin-top: 12px; animation: fpFade .25s ease; }

/* Photo */
.fp-photo-hint { margin: 0 0 10px; font-size: 13px; color: rgba(10, 10, 10, 0.5); }
.fp-photo-upload {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 16px;
  border: 1.5px dashed rgba(10, 10, 10, 0.2);
  border-radius: 14px; background: #fff; cursor: pointer;
  font-size: 14.5px; font-weight: 600; color: rgba(10, 10, 10, 0.65);
}
.fp-photo-preview {
  display: flex; align-items: center; gap: 13px;
  width: 100%; padding: 11px 13px;
  border: 1.5px solid rgba(36, 142, 31, 0.35); border-radius: 14px;
  background: rgba(36, 142, 31, 0.06);
  animation: fpFade .25s ease;
}
.fp-photo-preview img { width: 48px; height: 48px; flex: none; border-radius: 10px; object-fit: cover; }
.fp-photo-name { flex: 1; font-size: 14px; font-weight: 500; color: #0A0A0A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-photo-remove {
  flex: none; padding: 7px 12px; border: 1px solid rgba(10, 10, 10, 0.15);
  border-radius: 9px; background: #fff; font-size: 13px; font-weight: 600; color: #0A0A0A; cursor: pointer;
}

/* Contact */
.fp-contact-toggle {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 15px 16px; border: 1.5px solid rgba(10, 10, 10, 0.12);
  border-radius: 14px; background: #fff; cursor: pointer; text-align: start;
}
.fp-contact-toggle span.fp-contact-label { flex: 1; font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.fp-contact-fields { display: flex; flex-direction: column; gap: 14px; padding: 16px 2px 2px; animation: fpFade .25s ease; }

/* Submit */
.fp-submit-wrap { margin-top: 4px; }
.fp-trust { display: flex; align-items: center; justify-content: center; gap: 7px; margin-bottom: 14px; }
.fp-trust span { font-size: 12.5px; color: rgba(10, 10, 10, 0.5); text-align: center; }
.fp-submit-btn, .fp-back-link {
  width: 100%; padding: 17px; border: none; border-radius: 15px;
  background: #248E1F; color: #fff; font-size: 16.5px; font-weight: 700;
  cursor: pointer; box-shadow: 0 2px 10px rgba(36, 142, 31, 0.28);
}
.fp-submit-btn:hover, .fp-back-link:hover { background: #1f7a1a; color: #fff; }
.fp-submit-btn:active { transform: translateY(1px); }
.fp-submit-btn:disabled { opacity: 0.6; cursor: default; box-shadow: none; }
.fp-submit-btn:disabled:hover { background: #248E1F; }
.fp-submit-error { text-align: center; margin-bottom: 12px; }

/* Acknowledgment */
.fp-ack {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 40px 8px 8px; animation: fpFade .4s ease;
}
.fp-ack-icon-outer {
  width: 88px; height: 88px; border-radius: 50%; background: rgba(36, 142, 31, 0.1);
  display: flex; align-items: center; justify-content: center; margin-bottom: 26px;
}
.fp-ack-icon-inner {
  width: 60px; height: 60px; border-radius: 50%; background: #248E1F;
  display: flex; align-items: center; justify-content: center;
}
.fp-ack-title { margin: 0; font-size: 25px; font-weight: 700; }
.fp-ack-body { margin: 12px 0 0; font-size: 15.5px; line-height: 1.6; color: rgba(10, 10, 10, 0.6); max-width: 330px; }
.fp-ref-box {
  margin: 30px 0 0; width: 100%; max-width: 300px; padding: 20px;
  border: 1.5px solid rgba(10, 10, 10, 0.1); border-radius: 18px; background: #fff;
}
.fp-ref-label { font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(10, 10, 10, 0.45); }
.fp-ref-number { margin-top: 6px; font-size: 30px; font-weight: 700; color: #248E1F; letter-spacing: 0.01em; }
.fp-back-link {
  margin-top: 30px; max-width: 300px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; gap: 9px; text-decoration: none;
}
.fp-reset-btn {
  margin-top: 16px; padding: 8px 14px; border: none; background: none;
  font-size: 14.5px; font-weight: 600; color: #248E1F; cursor: pointer;
}
