body {
  background: #f7f7fb;
  padding: 20px;
  color: #222;
  box-sizing: border-box;
  overflow-x: hidden;
  /* ← prevents horizontal scroll */
}

* {
  box-sizing: border-box;
  /* ← fixes ALL children width issues */
}

.form-wrapper {
  max-width: 1000px;
  width: 100%;
  /* ← was missing */
  margin: auto;
  background: #fff;
  padding: 25px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

h1 {
  font-size: 24px;
  margin-bottom: 10px;
  text-align: center;
}

.sub-title {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-bottom: 25px;
}

.section {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
}

.section h2 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #000;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width:768px) {
  .row {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

label {
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

.required {
  color: red;
  font-weight: bold;
}

input,
select,
textarea {
  padding: 11px 12px;
  border: 1px solid #ccc;
  border-radius: 10px;
  outline: none;
  background: #fff;
  font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #000;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.radio-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.radio-group label {
  font-weight: 500;
  display: flex;
  gap: 7px;
  align-items: center;
  cursor: pointer;
}

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

@media (max-width:768px) {
  .checkbox-group {
    grid-template-columns: 1fr;
  }
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.hint {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.hidden {
  display: none;
}

.btn-row {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

button {
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.btn-submit {
  background: #000;
  color: #fff;
}

.btn-reset {
  background: #eaeaea;
  color: #000;
}

.success-msg {
  margin-top: 18px;
  padding: 12px;
  border-radius: 10px;
  background: #e8fff1;
  border: 1px solid #77d99a;
  color: #126b35;
  display: none;
}

.error-msg {
  margin-top: 18px;
  padding: 12px;
  border-radius: 10px;
  background: #ffecec;
  border: 1px solid #ff8d8d;
  color: #8a1515;
  display: none;
}

/* PREMIUM OPTIONS (Checkbox / Radio Card Style) */
.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

@media (max-width:768px) {
  .option-grid {
    grid-template-columns: 1fr;
  }
}

.option-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: 0.25s ease;
}

.option-card:hover {
  border-color: #000;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

/* PREMIUM CHECKBOX (Tick Style) */
.option-card input[type="checkbox"] {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid #bdbdbd;
  background: #fff;
  display: grid;
  place-items: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

/* Tick Icon */
.option-card input[type="checkbox"]::after {
  content: "✓";
  font-size: 14px;
  font-weight: 900;
  color: #fff;

  line-height: 1;
  /*  Important */
  display: flex;
  /*  Important */
  align-items: center;
  /*  Important */
  justify-content: center;
  /*  Important */

  transform: scale(0);
  transition: 0.2s ease;
  margin-top: -7px;
  margin-left: -5px;
}


/* Checked = Black BG + Tick Visible */
.option-card input[type="checkbox"]:checked {
  background: #000;
  border-color: #000;
}

.option-card input[type="checkbox"]:checked::after {
  transform: scale(1);
}

/* PREMIUM: Highlight card when checked */
.option-card:has(input[type="checkbox"]:checked) {
  border-color: #000;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}


.option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.option-text span {
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.option-text small {
  font-size: 12px;
  color: #777;
}


/* PREMIUM UPLOAD BOX */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

@media (max-width:768px) {
  .upload-grid {
    grid-template-columns: 1fr;
  }
}

.upload-box {
  border: 1px dashed #cfcfcf;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  transition: 0.25s ease;
}

.upload-box:hover {
  border-color: #000;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
}

.upload-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #111;
}

.upload-hint {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}

.upload-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.upload-btn {
  position: relative;
  overflow: hidden;
  background: #000;
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s ease;
}

.upload-btn:hover {
  transform: translateY(-1px);
}

.upload-btn input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-name {
  font-size: 12px;
  color: #333;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #eee;
  background: #fafafa;
  flex: 1;
  min-width: 150px;
}

.optional-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #f2f2f2;
  color: #222;
}

/* Declaration checkbox alignment */
.declaration-check {
  display: flex;
  align-items: flex-start;
  /*  Perfect top alignment */
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  line-height: 2.2;
  cursor: pointer;
}

.declaration-check input[type="checkbox"] {
  margin-top: 4px;
  /*  Align with first line */
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* TOPBAR (Logo + Title + Button Row) */
.form-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid #eee;
  margin-bottom: 18px;
}

/* Left Logo */
.topbar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.topbar-logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

/* Center Title */
.topbar-title {
  flex: 1;
  text-align: center;
}

.topbar-title h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.topbar-title .sub-title {
  margin-top: 6px;
  margin-bottom: 0;
}

/* Right Button */
.topbar-home-btn {
  text-decoration: none;
  background: #000;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 400;
  transition: 0.25s ease;
  white-space: nowrap;
}

.topbar-home-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .form-topbar {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .topbar-title {
    order: 2;
  }

  .topbar-logo {
    order: 1;
  }

  .topbar-home-btn {
    order: 3;
    width: 100%;
    text-align: center;
    justify-content: center;
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
    /* ← reduce body padding on mobile */
  }

  .form-wrapper {
    padding: 15px;
    /* ← reduce form padding on mobile */
    border-radius: 10px;
  }

  .section {
    padding: 12px;
  }
}

/*appointment*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background: #f7f7fb;
  padding: 20px;
  color: #222;
}

.form-wrapper {
  max-width: 1000px;
  margin: auto;
  background: #fff;
  padding: 25px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* TOPBAR STYLES */
.form-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid #eee;
  margin-bottom: 18px;
}

.topbar-logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.topbar-title {
  flex: 1;
  text-align: center;
}

.topbar-title h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.sub-title {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-top: 6px;
}

.topbar-home-btn {
  text-decoration: none;
  background: #000;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 400;
  transition: 0.25s ease;
  white-space: nowrap;
}

/* MOBILE VIEW OVERRIDES (Matching Distributor Form) */
@media (max-width: 768px) {
  .form-topbar {
    flex-direction: column;
    gap: 12px;
  }

  .topbar-title {
    order: 2;
    /* Title stays in middle */
  }

  .topbar-home-btn {
    order: 3;
    /* Button goes to bottom */
    width: 100%;
    text-align: center;
    justify-content: center;
    display: inline-flex;
  }

  .topbar-logo {
    order: 1;
    /* Logo at top */
  }
}

.required {
  color: red;
  font-weight: bold;
}

.section {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 768px) {
  .row {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

input,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #ccc;
  border-radius: 10px;
  outline: none;
  font-size: 14px;
}

input:focus,
textarea:focus {
  border-color: #000;
}

.btn-row {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

button {
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.btn-submit {
  background: #000;
  color: #fff;
}

.btn-reset {
  background: #eaeaea;
  color: #000;
}

/* CENTRAL POPUP ONLY */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease-in-out;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-box {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  transform: translateY(20px);
  transition: 0.3s ease-in-out;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.popup-overlay.active .popup-box {
  transform: translateY(0);
}

select {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}


/* Fix the native dropdown option list width */
.field select {
  width: 100% !important;
  box-sizing: border-box !important;
}