/* =============================================
   AMFE - Join AMFE Page Styles 
   ============================================= */

/* ── BASE (SLIGHTLY TIGHTER DESKTOP LOOK) ── */
.join-wrapper {
  width: 100%;
  max-width: 740px;
  margin: clamp(1.5rem, 5vw, 4rem) auto;
  padding: 0 0 36px;
}

.join-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.85rem;  /* slightly reduced */
  text-align: center;
  margin-bottom: 4px;
  color: var(--text-dark);
}

.join-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

/* Application status entry and lookup */
.join-status-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  margin-bottom: 28px;
  border: 1px solid #d7e7de;
  border-radius: 16px;
  background: #fff;
  color: var(--green-dark);
  text-align: left;
  box-shadow: 0 2px 14px rgba(20, 65, 47, .05);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.join-status-toggle:hover,
.join-status-toggle.is-open {
  border-color: #8ebaa2;
  box-shadow: 0 6px 22px rgba(20, 65, 47, .09);
}

.join-status-toggle:hover { transform: translateY(-1px); }
.join-status-toggle:focus-visible,
.join-status-recovery-toggle:focus-visible {
  outline: 3px solid #8ebaa2;
  outline-offset: 3px;
}

.join-status-toggle-icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e8f3ec;
  font-size: 19px;
}

.join-status-toggle-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.join-status-toggle-copy strong { font-size: 15px; font-weight: 700; }
.join-status-toggle-copy span { color: var(--text-muted); font-size: 13px; line-height: 1.45; }

.join-status-toggle-arrow {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1f6f2;
  font-size: 12px;
}

.join-wrapper .join-status-panel {
  margin-top: -14px;
  margin-bottom: 28px;
  border: 1px solid #e2eae5;
  border-radius: 16px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.join-status-panel h4 { margin-bottom: 6px; }
.join-status-hint { color: var(--text-muted); font-size: 13px; margin-bottom: 22px; }
.join-status-panel .form-label { display: block; font-weight: 600; margin-bottom: 8px; }
.join-status-input { min-height: 48px; }
.join-status-submit { width: 100%; margin-top: 16px; min-height: 45px; font-weight: 600; }
.join-status-feedback { margin: 16px 0 0; }

.join-status-recovery {
  margin-top: 23px;
  padding-top: 20px;
  border-top: 1px solid #e8eeea;
  text-align: center;
}

.join-status-recovery-toggle {
  padding: 0;
  border: 0;
  background: none;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 600;
}

.join-status-recovery-toggle .bi { margin-left: 4px; font-size: 10px; }
.join-status-recovery-form { margin-top: 20px; text-align: left; }
.join-status-recovery-form .btn { width: 100%; margin-top: 12px; }
.join-status-reference-message { margin-top: 12px; color: var(--green-dark); font-size: 13px; }

/* ── STEPPER ── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  transition: all 0.3s;
}

.step-circle.pending {
  background: #e8efea;
  color: var(--text-muted);
}

.step-circle.active,
.step-circle.done {
  background: var(--green-dark);
  color: #fff;
}

.step-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.step-line {
  width: 70px;  /* reduced from 80px */
  height: 2px;
  background: var(--border);
  margin-bottom: 22px;
  transition: background 0.3s;
}

.step-line.done {
  background: var(--green-dark);
}

/* ── FORM CARD ── */
.form-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px 24px; /* slightly tighter */
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.form-card h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 24px;
  color: var(--text-dark);
}

/* ── APPLICATION RECEIPT REFERENCE ── */
.join-reference-card {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid #9fdbe8;
  border-radius: 12px;
  background: #e9f8fb;
  color: #124f5d;
}

.join-reference-card.is-manual {
  border-color: #e6cf87;
  background: #fff8df;
  color: #5d4a12;
}

.join-reference-heading {
  margin-bottom: .6rem;
  font-weight: 700;
}

.join-reference-row {
  display: flex;
  align-items: stretch;
  gap: .6rem;
}

.join-reference-value {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  padding: .7rem .8rem;
  border: 1px solid rgba(18, 79, 93, .2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  color: #174f5b;
  font-size: .94rem;
  overflow-wrap: anywhere;
  user-select: all;
}

.join-reference-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-width: 7rem;
  padding: .65rem .9rem;
  border: 1px solid var(--green-dark);
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  font-weight: 700;
}

.join-reference-copy:hover {
  background: var(--green-dark);
  color: #fff;
}

.join-reference-copy:focus-visible {
  outline: 3px solid rgba(31, 90, 67, .24);
  outline-offset: 2px;
}

.join-reference-help {
  margin-top: .7rem;
  font-size: .84rem;
  line-height: 1.45;
}

.join-reference-error {
  margin-top: .55rem;
  color: #a32424;
  font-size: .84rem;
  font-weight: 600;
}

.join-verification-panel {
  padding: 1rem 0 0;
}

.join-verification-code {
  max-width: 20rem;
  min-height: 3rem;
  color: var(--text-dark);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .32em;
  text-align: center;
}

.join-verification-code:focus {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 .2rem rgba(31, 90, 67, .14);
}

.form-divider {
  border-color: var(--border);
  margin: 16px 0;
}

/* ── FIELD NOTICE ACTIONS (Account duplicate popup buttons) ── */
.field-notice-content {
  flex: 1;
  min-width: 0;
}

.field-notice-text {
  display: block;
}

.field-notice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.field-notice-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-dark, #1e4d3a);
  color: #fff !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  padding: 6px 13px;
  border-radius: 6px;
  border: 1px solid var(--green-dark, #1e4d3a);
  text-decoration: none !important;
  transition: all 0.15s ease;
  cursor: pointer;
}

.field-notice-btn-primary:hover {
  background: var(--green-mid, #2d6a4f);
  border-color: var(--green-mid, #2d6a4f);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(30, 77, 58, 0.25);
}

.field-notice-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f4f8f5;
  color: var(--green-dark, #1e4d3a) !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  padding: 6px 13px;
  border-radius: 6px;
  border: 1px solid #cce3d5;
  text-decoration: none !important;
  transition: all 0.15s ease;
  cursor: pointer;
}

.field-notice-btn-secondary:hover {
  background: #e3f0e8;
  border-color: #a7cfb7;
  color: var(--green-dark, #1e4d3a) !important;
  transform: translateY(-1px);
}

.field-notice-btn-primary i,
.field-notice-btn-secondary i {
  font-size: 12px;
  line-height: 1;
}

@media (max-width: 480px) {
  .field-notice-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .field-notice-btn-primary,
  .field-notice-btn-secondary {
    justify-content: center;
    width: 100%;
    text-align: center;
  }
}

/* Keep this as a familiar checkbox row. Bootstrap's negative checkbox margin
   and the general mobile input height made it look like a tall empty button. */
.no-email-option {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  min-height: 1.75rem;
  padding-left: 0;
}

.no-email-option .form-check-input {
  float: none;
  flex: 0 0 1.125rem;
  width: 1.125rem;
  height: 1.125rem;
  min-height: 0;
  margin: .125rem 0 0;
  border: 1.5px solid #8b9990;
  border-radius: 4px;
  box-shadow: none;
  cursor: pointer;
}

.no-email-option .form-check-input:checked {
  border-color: var(--green-dark);
  background-color: var(--green-dark);
}

.no-email-option .form-check-input:focus-visible {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(45, 90, 61, .18);
}

.no-email-option .form-check-label {
  margin: 0;
  color: var(--text-dark);
  font-size: .9rem;
  line-height: 1.4;
  cursor: pointer;
}

/* ── MEMBER TYPE ── */
.member-type-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.member-type-btn {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}

.member-type-btn .icon {
  font-size: 20px;
  display: block;
  margin-bottom: 4px;
}

.member-type-btn .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.member-type-btn.selected {
  border-color: var(--green-dark);
  background: #e8f3ec;
}

.member-type-btn.selected .label {
  color: var(--green-dark);
}

.age-eligibility-note {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 18px;
  padding: 11px 14px;
  border: 1px solid #cfe4d7;
  border-radius: 10px;
  background: #f3f9f5;
  color: #335c49;
}

.age-eligibility-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: #dcefe3;
  color: var(--green-dark);
  font-size: 16px;
  line-height: 1;
}

.age-eligibility-icon i {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.age-eligibility-icon i::before {
  vertical-align: 0;
  line-height: 1;
}

.age-eligibility-note > div > strong,
.age-eligibility-note > div > span {
  display: block;
}

.identity-upload-section {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid #dce5df;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdfb 0%, #f6faf7 100%);
}

.identity-upload-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.identity-upload-heading > div {
  display: grid;
  gap: 2px;
}

.identity-upload-heading strong {
  color: var(--text-dark);
  font-size: .94rem;
}

.identity-upload-heading span {
  color: #66736b;
  font-size: .78rem;
}

.identity-upload-limit {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf5f0;
  color: var(--green-dark) !important;
  font-weight: 600;
  white-space: nowrap;
}

.identity-type-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.identity-type-fieldset legend {
  float: none;
  width: auto;
  margin: 0 0 10px;
  color: var(--text-dark);
  font-size: .84rem;
  font-weight: 700;
}

.identity-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
}

.identity-type-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 30px 10px 11px;
  border: 1px solid #d6dfd9;
  border-radius: 10px;
  background: #fff;
  color: #33423a;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .18s;
}

.identity-type-option:hover {
  border-color: #87a993;
  background: #f6faf7;
  transform: translateY(-1px);
}

.identity-type-option:focus-visible {
  outline: 0;
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(45, 90, 61, .14);
}

.identity-type-option > i:first-child {
  flex: 0 0 auto;
  color: #4f735d;
  font-size: 1rem;
}

.identity-type-option > span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.identity-type-option.selected {
  border-color: var(--green-dark);
  background: #eaf5ed;
  color: var(--green-dark);
  box-shadow: inset 0 0 0 1px var(--green-dark);
}

.identity-type-check {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--green-dark);
  font-size: .82rem;
}

.identity-document-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #dce5df;
}

.identity-document-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.identity-document-summary > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  background: #dfefe4;
  color: var(--green-dark);
  font-size: 1.1rem;
}

.identity-document-summary strong,
.identity-document-summary span {
  display: block;
}

.identity-capture-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 13px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #edf5f0;
  color: #365c43;
  font-size: .73rem;
  line-height: 1.4;
}

.identity-capture-tip i { flex: 0 0 auto; margin-top: 1px; color: var(--green-dark); }

.identity-handoff-launch { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; margin: 0 0 13px; padding: 10px 12px; border: 1px solid #9ab4a3; border-radius: 9px; background: #fff; color: var(--green-dark); font-size: .78rem; font-weight: 750; }
.identity-handoff-modal { position: fixed; inset: 0; z-index: 2500; display: grid; place-items: center; padding: 20px; background: rgba(5,20,12,.72); }
.identity-handoff-dialog { width: min(430px, 100%); padding: 24px; border-radius: 16px; background: #fff; text-align: center; box-shadow: 0 22px 60px rgba(0,0,0,.28); }
.identity-handoff-dialog img { width: 240px; max-width: 100%; margin: 12px auto; }
.identity-handoff-dialog h3 { margin: 0 0 6px; font-size: 1.1rem; }
.identity-handoff-dialog p { margin: 0; color: #66736a; font-size: .8rem; }
.identity-handoff-status { margin: 10px 0; color: var(--green-dark); font-size: .78rem; font-weight: 700; }
.identity-handoff-close { padding: 8px 16px; border: 1px solid #a9b8ae; border-radius: 8px; background: #fff; color: #34463a; }

.handoff-phone-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: #eef5f0; }
.handoff-phone-card { width: min(460px, 100%); padding: 26px 20px; border-radius: 18px; background: #fff; box-shadow: 0 14px 40px rgba(20,65,38,.12); }
.handoff-phone-logo { color: var(--green-dark); font-weight: 900; }
.handoff-phone-card h1 { margin: 16px 0 6px; font-size: 1.45rem; }
.handoff-phone-card p { color: #637168; font-size: .88rem; }
.handoff-phone-card label { display: block; margin: 16px 0 6px; font-size: .82rem; font-weight: 750; }
.handoff-phone-card input { display: block; width: 100%; padding: 12px; border: 1px solid #b8c7bd; border-radius: 9px; }
.handoff-phone-card button { width: 100%; margin: 20px 0 12px; padding: 12px; border: 0; border-radius: 9px; background: var(--green-dark); color: #fff; font-weight: 800; }
.handoff-phone-card small { color: #718077; }
.handoff-phone-error { display: block; margin-top: 5px; color: #b42318; font-size: .74rem; }
.handoff-phone-success { display: block; margin-top: 22px; color: #168447; font-size: 3rem; }

@media (max-width: 768px), (pointer: coarse) { .identity-handoff-launch { display: none; } }

.identity-document-summary strong {
  color: var(--text-dark);
  font-size: .86rem;
}

.identity-document-summary span {
  margin-top: 1px;
  color: #6b786f;
  font-size: .76rem;
}

.identity-upload-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 11px;
  align-items: center;
  min-height: 128px;
  padding: 14px;
  border: 1.5px dashed #aebdb3;
  border-radius: 12px;
  background: #fff;
  transition: border-color .2s, background .2s, box-shadow .2s;
}

.identity-upload-card:hover,
.identity-upload-card:focus-within {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(45, 90, 61, .1);
}

.identity-upload-card.has-file {
  border-style: solid;
  border-color: #8db49c;
  background: #f2f8f4;
}

.identity-upload-card.quality-rejected {
  border-style: solid;
  border-color: #dc6b6b;
  background: #fff7f7;
}

.identity-upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  grid-row: 1;
  border-radius: 11px;
  background: #edf5f0;
  color: var(--green-dark);
  font-size: 1.25rem;
}

.identity-upload-card.has-file .identity-upload-icon {
  background: var(--green-dark);
  color: #fff;
}

.identity-upload-copy {
  min-width: 0;
}

.identity-upload-label {
  color: var(--text-dark);
  font-size: .84rem;
  font-weight: 700;
}

.identity-upload-filename {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #6c776f;
  font-size: .76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-upload-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  margin-top: 13px;
}

.identity-quality-result {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-start;
  gap: 7px;
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.35;
}

.identity-quality-result i,
.identity-quality-result .spinner-border { flex: 0 0 auto; margin-top: 1px; }
.identity-quality-result.is-passed { background: #e3f3e8; color: #1b6338; }
.identity-quality-result.is-manual { background: #fff5d8; color: #7a5700; }
.identity-quality-result.is-checking { background: #edf3ef; color: #496354; }
.identity-quality-result.is-rejected { background: #fde8e8; color: #a52020; }

.identity-upload-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  flex: 1;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #aac0b1;
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  font-size: .76rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}

.identity-upload-action.native-camera {
  display: none;
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
}

@media (max-width: 768px), (pointer: coarse) {
  .identity-upload-action.native-camera { display: inline-flex; }
}

.identity-upload-action:hover {
  border-color: var(--green-mid);
  background: var(--green-mid);
  color: #fff;
}

.identity-upload-card input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Full-screen, permission-based ID camera. */
.id-camera-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  background: #08110c;
  color: #fff;
}

.id-camera-topbar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) 18px 14px;
  background: #10281b;
}

.id-camera-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
}

.id-camera-topbar strong,
.id-camera-topbar span {
  display: block;
}

.id-camera-topbar strong { font-size: .95rem; }
.id-camera-topbar div > span { margin-top: 2px; color: #c5d4ca; font-size: .75rem; }

.id-camera-side {
  padding: 5px 9px;
  border-radius: 999px;
  background: #dff1e5;
  color: #174f31;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.id-camera-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #030604;
}

.id-camera-stage video,
.id-camera-stage > img {
  width: 100%;
  height: 100%;
}

.id-camera-stage video { object-fit: cover; }
.id-camera-stage > img { object-fit: contain; background: #101612; }

.id-camera-quality-warning {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid #f3a6a6;
  border-radius: 10px;
  background: rgba(93, 16, 16, .94);
  color: #fff;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .28);
}

.id-camera-quality-warning > i { color: #ffd37a; font-size: 1.15rem; }
.id-camera-quality-warning strong,
.id-camera-quality-warning span { display: block; }
.id-camera-quality-warning strong { font-size: .82rem; }
.id-camera-quality-warning span { margin-top: 2px; color: #ffe5e5; font-size: .76rem; line-height: 1.4; }

.id-camera-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(82vw, 590px);
  aspect-ratio: 1.586 / 1;
  border: 2px solid rgba(255,255,255,.95);
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.52);
  transform: translate(-50%, -50%);
}

.id-camera-guide.is-document {
  width: min(76vw, 520px);
  aspect-ratio: 1.42 / 1;
  border-radius: 10px;
}

.id-camera-guide .corner {
  position: absolute;
  width: 32px;
  height: 32px;
  border-color: #7de3a1;
}

.id-camera-guide .top-left { top: -3px; left: -3px; border-top: 5px solid; border-left: 5px solid; border-radius: 17px 0 0; }
.id-camera-guide .top-right { top: -3px; right: -3px; border-top: 5px solid; border-right: 5px solid; border-radius: 0 17px 0 0; }
.id-camera-guide .bottom-left { bottom: -3px; left: -3px; border-bottom: 5px solid; border-left: 5px solid; border-radius: 0 0 0 17px; }
.id-camera-guide .bottom-right { right: -3px; bottom: -3px; border-right: 5px solid; border-bottom: 5px solid; border-radius: 0 0 17px; }

.id-camera-guide-label {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(8,17,12,.82);
  color: #fff;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(-50%);
}

.id-camera-loading,
.id-camera-error {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #08110c;
}

.id-camera-error {
  flex-direction: column;
  padding: 30px;
  overflow-y: auto;
  text-align: center;
}

.id-camera-error > i { font-size: 2.3rem; color: #9db2a4; }
.id-camera-error span { max-width: 440px; color: #c5d4ca; font-size: .84rem; }
.id-camera-permission-steps { width: min(100%, 470px); padding: 12px 14px; border: 1px solid rgba(242,214,143,.45); border-radius: 10px; background: rgba(242,214,143,.08); color: #f8e5b1; text-align: left; }
.id-camera-permission-steps strong { display: block; font-size: .78rem; }
.id-camera-permission-steps ol { margin: 7px 0; padding-left: 20px; }
.id-camera-permission-steps li { margin: 3px 0; font-size: .74rem; line-height: 1.35; }
.id-camera-permission-steps small { display: block; color: #d7e2da; font-size: .7rem; line-height: 1.35; }
.id-camera-error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 8px; }
.id-camera-error button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 0; border-radius: 8px; background: #fff; color: #174f31; font-weight: 700; }
.id-camera-error button.retry { border: 1px solid rgba(255,255,255,.55); background: transparent; color: #fff; }

.id-camera-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 96px;
  padding: 14px 18px max(14px, env(safe-area-inset-bottom));
  background: #10281b;
}

.id-camera-shutter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  padding: 5px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: transparent;
}

.id-camera-shutter span { width: 48px; height: 48px; border-radius: 50%; background: #fff; }
.id-camera-shutter:disabled { opacity: .4; }

.id-camera-secondary,
.id-camera-use {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 132px;
  padding: 11px 16px;
  border-radius: 9px;
  font-size: .84rem;
  font-weight: 700;
}

.id-camera-secondary { border: 1px solid rgba(255,255,255,.45); background: transparent; color: #fff; }
.id-camera-use { border: 1px solid #dff1e5; background: #dff1e5; color: #174f31; }
.id-camera-secondary:disabled,
.id-camera-use:disabled { cursor: wait; opacity: .65; }

.age-eligibility-note > div > strong {
  margin-bottom: 1px;
  color: var(--green-dark);
  font-size: 13px;
  line-height: 1.35;
}

.age-eligibility-note > div > span {
  font-size: 13px;
  line-height: 1.45;
}

/* ── SUB SECTIONS ── */
.sub-section {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 18px;
}

.sub-section-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.sub-section-title.farmer {
  color: var(--green-dark);
}

.sub-section-title.entrepreneur {
  color: #8b4513;
}

/* ── NOTICE BOX ── */
.notice-box {
  background: #fffbeb;
  border: 1.5px solid #f5d76e;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}

.notice-box .icon {
  font-size: 18px;
  flex-shrink: 0;
}

.notice-box .text strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #7a5c00;
}

.notice-box .text span {
  font-size: 12px;
  color: #9a7a20;
}

/* ── DATA PRIVACY CONSENT ── */
.consent-box {
  background: #f4f7f5;
  border: 1.5px solid #d7e3da;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 24px;
}

.consent-text {
  font-size: 12px;
  color: #5a6b60;
  line-height: 1.5;
  margin: 0 0 10px;
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #2f3d34;
  cursor: pointer;
}

.consent-check input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #4a7c5e;
  cursor: pointer;
}

/* ── BUTTONS ── */
.btn-prev {
  background: #fff;
  color: var(--text-dark);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-prev:hover {
  border-color: var(--green-dark);
  color: var(--green-dark);
}

.btn-next {
  background: var(--green-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-next:hover {
  background: var(--green-mid);
}

.btn-prev {
  text-align: center;
}

/* ── STEP PANELS ── */
.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

/* ── RESPONSIVE FIX ── */

/* TABLET */
@media (max-width: 768px) {
  .join-wrapper {
    max-width: 640px;
    margin-block: 1.75rem;
  }

  .form-card {
    padding: 28px 22px;
  }

  .step-line {
    width: 55px;
  }

  .member-type-row {
    flex-direction: column;
  }

  .app-status {
    padding: 16px 18px;
  }

  .join-reference-row {
    flex-direction: column;
  }

  .join-reference-copy {
    width: 100%;
  }

  .join-verification-code {
    max-width: none;
  }
}

/* MOBILE */
@media (max-width: 576px) {

  .join-wrapper {
    margin: 1.25rem auto;
    padding: 0 0 1.5rem;
  }

  .join-title {
    font-size: clamp(1.45rem, 7vw, 1.6rem);
  }

  .join-subtitle { margin-bottom: 1.25rem; }

  .join-status-toggle { padding: 13px 14px; gap: 11px; }
  .join-status-toggle-icon { width: 40px; height: 40px; }
  .join-wrapper .join-status-panel { padding: 20px 16px; }

  .stepper {
    display: grid;
    grid-template-columns: max-content minmax(1rem, 1fr) max-content minmax(1rem, 1fr) max-content;
    width: 100%;
    gap: .5rem;
    margin-bottom: 1.5rem;
  }

  .step-line {
    width: 100%;
    min-width: 0;
  }

  .form-card {
    padding: 1.25rem 1rem;
    border-radius: 14px;
  }

  .form-card h4 { font-size: 1.2rem; margin-bottom: 1.25rem; }

  .identity-upload-section { padding: 15px; }
  .identity-upload-heading { display: grid; gap: 8px; }
  .identity-upload-limit { width: fit-content; }
  .identity-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .identity-type-option { min-width: 0; min-height: 58px; padding: 10px 25px 10px 9px; gap: 7px; font-size: .72rem; }
  .identity-upload-actions { flex-direction: column; }
  .identity-upload-action { width: 100%; }
  .id-camera-topbar { grid-template-columns: 40px minmax(0, 1fr); padding-inline: 12px; }
  .id-camera-side { display: none !important; }
  .id-camera-topbar strong { font-size: .84rem; }
  .id-camera-guide { width: 88vw; border-radius: 13px; }
  .id-camera-guide.is-document { width: 88vw; }
  .id-camera-actions { min-height: 88px; }

  .member-type-row {
    flex-direction: column;
  }

  .age-eligibility-note {
    align-items: flex-start;
    padding: 10px 12px;
  }

  .btn-prev,
  .btn-next {
    width: 48%;
    font-size: 13px;
    padding: 10px 12px;
  }

  .d-flex.justify-content-between {
    gap: 10px;
  }

  .app-status {
    padding: 16px 14px;
    margin-bottom: 20px;
  }

  .app-status-head {
    font-size: 15px;
  }

  .app-status-body {
    font-size: 13px;
  }

  .app-status-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .app-status-actions .btn-next {
    width: 100%;
    text-align: center;
  }

  .app-status-actions .app-status-refresh {
    text-align: center;
  }
}

@media (max-width: 359.98px) {
  .stepper { gap: .3rem; }
  .step-circle { width: 1.8rem; height: 1.8rem; border-radius: .5rem; font-size: .7rem; }
  .step-label { max-width: 4.2rem; font-size: .58rem; text-align: center; white-space: normal; line-height: 1.15; }
  .step-line { width: 1rem; margin-bottom: 1.4rem; }
  .form-card { padding-inline: .75rem; }
}

@media (max-width: 767.98px) {
  .join-wrapper input:not([type="checkbox"]):not([type="radio"]),
  .join-wrapper select,
  .join-wrapper textarea,
  .join-wrapper button { min-height: 2.75rem; font-size: 1rem; }

  .no-email-option .form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    min-height: 0;
  }

  .no-email-option .form-check-label {
    font-size: .875rem;
  }
}

@media (max-width: 420px) {
  .step-label {
    max-width: 4.75rem;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }

  .btn-prev,
  .btn-next {
    min-width: 0;
    padding-inline: .75rem;
  }
}

/* ── APPLICATION STATUS BANNER ── */
.app-status {
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 24px;
  border: 1.5px solid transparent;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}

.app-status-head {
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  line-height: 1.3;
}

.app-status-head .bi {
  font-size: 20px;
}

.app-status-body {
  font-size: 14px;
  margin: 10px 0 0;
  line-height: 1.55;
}

.app-status-meta {
  font-size: 13px;
  opacity: 0.75;
  margin-top: 6px;
}

.app-status-reason {
  font-size: 13px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 10px;
}

.app-status-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.app-status-refresh {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin: 0;
  opacity: 0.7;
  color: inherit;
}
.app-status-refresh:hover { opacity: 1; }

/* Pending — amber */
.app-status-pending {
  background: #fff8e1;
  border-color: #f0c14b;
  color: #8a6d12;
}

/* Approved — green */
.app-status-approved {
  background: #e8f4ec;
  border-color: #2d5a3d;
  color: #1e3d29;
}

/* Rejected — red */
.app-status-rejected {
  background: #fdecea;
  border-color: #e0816f;
  color: #9b2c1a;
}
