﻿*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-width: 0;
  border-style: solid;
}
body,
input,
select,
textarea,
button,
label,
td,
th,
option {
  font-family: "Noto Sans Devanagari", "Mangal", Arial, sans-serif !important;
  font-size: 14px !important;
}
/* ── TOGGLE PILL (Radio) ── */
.tog {
  display: flex;
  align-items: stretch;
  width: 100%;
  gap: 4px;
  padding: 4px;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  height: 43px;
  box-sizing: border-box;
  background: #eef2f7;
}
.tog label {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #475569;
  transition:
    background 0.15s,
    color 0.15s;
  user-select: none;
}
.tog input[type="radio"] {
  display: none;
}
.tog input[type="radio"]:checked ~ .tl,
.tl.on {
  background: #00487c;
  color: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 72, 124, 0.3);
}
.tl {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 6px;
  transition: all 0.2s;
}
/* Disabled "same address" checkbox pill */
#sameAddrLabel.disabled {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.55);
  cursor: not-allowed;
  opacity: 0.85;
}
/* ── Dropdown chevron icons (replaces native arrow) ── */
#stepForm select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 7px;
  padding-right: 32px !important;
  cursor: pointer;
}
#stepForm select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath fill='none' stroke='%2300487c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 6l4-4 4 4'/%3E%3C/svg%3E");
}
/* ── FAMILY TABLE ── */
.fw {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  margin-top: 8px;
}
.ft {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 940px;
}
.ft th {
  background: #00487c;
  color: #fff;
  padding: 11px 8px;
  border-right: 1px solid #0e6fb7;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}
.ft th:last-child {
  border-right: none;
}
.ft td {
  padding: 11px 8px;
  border-bottom: 1px solid #eef0f2;
  border-right: 1px solid #eef0f2;
  vertical-align: middle;
}
.ft td:last-child {
  border-right: none;
}
.ft tr:last-child td {
  border-bottom: none;
}
.ft input,
.ft select {
  height: 35px !important;
  font-size: 13px !important;
  padding: 4px 7px !important;
  border: 1.5px solid #d0d7de !important;
  border-radius: 5px !important;
  width: 100%;
  font-family: "Noto Sans Devanagari", "Mangal", Arial, sans-serif !important;
}
.ft input:focus,
.ft select:focus {
  border-color: #00487c !important;
  outline: none;
}
.ft input[type="checkbox"] {
  width: 17px !important;
  height: 17px !important;
  padding: 0 !important;
  border: none !important;
  accent-color: #00487c;
}
.ft input.fi-err,
.ft select.fi-err {
  border-color: #e53935 !important;
  background: #fff8f8 !important;
}
/* ── FAMILY GRIDVIEW (consistent with form theme) ── */
.fam-gv {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: #fff;
}
.fam-gv th {
  background: #00487c;
  color: #fff;
  padding: 11px 8px;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  border-right: 1px solid #0e6fb7;
}
.fam-gv th:last-child {
  border-right: none;
}
.fam-gv td {
  padding: 11px 8px;
  border-bottom: 1px solid #eef0f2;
  border-right: 1px solid #eef0f2;
  color: #333;
  vertical-align: middle;
  text-align: center;
}
.fam-gv td:last-child {
  border-right: none;
}
.fam-gv tr:last-child td {
  border-bottom: none;
}
.fam-gv tr:hover td {
  background: #f5f9ff;
}
.fam-empty {
  color: #94a3b8;
  padding: 14px;
  text-align: center;
}
.del-btn {
  color: #e53935;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.del-btn:hover {
  text-decoration: underline;
}
.badge-nom-yes {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 11px;
}
.badge-nom-no {
  background: #f1f5f9;
  color: #64748b;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 11px;
}
.badge-pct {
  background: #fff3e0;
  color: #e65100;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 11px;
}
/* ── Section reset button ── */
.reset-sec-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s;
}
.reset-sec-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}
/* ── DOCUMENT UPLOAD GRID ── */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1200px) {
  .doc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .doc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .doc-grid {
    grid-template-columns: 1fr;
  }
}
.doc-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.doc-item:hover {
  border-color: #90caf9;
  box-shadow: 0 4px 14px rgba(0, 72, 124, 0.08);
}
.doc-item .doc-info {
  width: 100%;
}
.doc-num {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}
.doc-num.req {
  background: #00487c;
  color: #fff;
}
.doc-num.opt {
  background: #e2e8f0;
  color: #64748b;
}
.dt {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
}
.ds {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.5;
}
.doc-fname {
  font-size: 12px;
  color: #2e7d32;
  font-weight: 600;
  word-break: break-all;
}
.doc-uploaded-tag {
  color: #2e7d32;
  font-weight: 700;
}
.doc-upload {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-top: auto;
}
.doc-upload input[type="file"] {
  font-size: 12px;
  max-width: 100%;
}
.eb-box {
  width: 300px;
  height: 400px;
  margin: 0 auto;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}
.eb-video {
  width: 100%;
  display: block;
  object-fit: cover;
  background: #111;
}
.eb-preview {
  display: none;
}
.eb-preview img {
  width: 100%;
  border-radius: 8px;
}
.eb-photo-note {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border: 1px dashed #cdd5e0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 16px;
  font-size: 13px;
  color: #475569;
  text-align: center;
  line-height: 1.7;
}
/* ── Floating progress step bar (top centre) ── */
.stepbar-wrap {
  position: fixed;
  top: 10px;
  left: 0;
  right: 0;
  z-index: 9990;
  display: none; /* hidden => no space captured */
  justify-content: center;
  margin: 0 auto;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-12px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}
.stepbar-wrap.sb-shown {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.stepbar-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 0 8px 24px rgba(0, 72, 124, 0.16);
  pointer-events: auto;
  width: 100%;
  max-width: 640px;
}
.stepbar-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  flex-shrink: 0;
}
.stepbar-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}
.stepbar-lbl {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.stepbar-line {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: #e2e8f0;
  transition: all 0.25s ease;
  min-width: 14px;
}
.stepbar-step.done .stepbar-dot {
  background: #16a34a;
  color: #fff;
  border-color: #15803d;
}
.stepbar-step.done .stepbar-lbl {
  color: #15803d;
}
.stepbar-step.active .stepbar-dot {
  background: #00487c;
  color: #fff;
  border-color: #0e6fb7;
  box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.2);
}
.stepbar-step.active .stepbar-lbl {
  color: #00487c;
}
.stepbar-line.done {
  background: #16a34a;
}
/* ── DOCUMENT PDF PREVIEW ── */
.doc-preview {
  margin-top: 4px;
  width: 100%;
  cursor: pointer;
}
.doc-preview iframe {
  width: 100%;
  height: 90px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  pointer-events: none;
}
.doc-preview-hint {
  font-size: 11px;
  color: #1565c0;
  font-weight: 600;
  margin-top: 4px;
}
/* ── DOCUMENT VIEWER MODAL ── */
#docViewModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 99990;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#docViewModal.open {
  display: flex;
}
.doc-view-box {
  background: #fff;
  border-radius: 14px;
  width: min(92vw, 820px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.doc-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}
.doc-view-frame {
  flex: 1;
  width: 100%;
  border: none;
  min-height: 70vh;
}
/* ── FORM PREVIEW (letter / application document) ── */
#formPreviewModalBody {
  background: #f1f5f9;
}
.pv-doc {
  background: #fff;
  border: 1px solid #dbe1e8;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  padding: 22px 26px;
  max-width: 780px;
  margin: 0 auto;
}
.pv-doc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 2px solid #00487c;
  padding-bottom: 8px;
  margin-bottom: 4px;
}
.pv-doc-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}
.pv-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pv-logo {
  width: 52px;
  height: 52px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.pv-doc-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.pv-photo-box {
  width: 150px;
  height: 200px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f5f9;
}
.pv-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pv-photo-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}
.pv-sec {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #00487c;
  border-bottom: 1.5px solid #e2e8f0;
  padding-bottom: 3px;
}
.pv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 3px 26px;
  margin-top: 5px;
}
.pv-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
.pv-col {
  min-width: 0;
}
.pv-col .pv-sec {
  margin-top: 10px;
}
.pv-col:first-child .pv-sec:first-child {
  margin-top: 0;
}
.pv-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  line-height: 1.55;
}
.pv-lbl {
  color: #64748b;
  font-weight: 600;
  flex-shrink: 0;
}
.pv-lbl::after {
  content: ":";
}
.pv-val {
  color: #0f172a;
  font-weight: 700;
  border-bottom: 1px dotted #cbd5e1;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.pv-member {
  grid-column: 1 / -1;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 4px;
  background: #fcfdff;
}
.pv-member-title {
  font-size: 13px;
  font-weight: 800;
  color: #00487c;
  margin-bottom: 4px;
}
.pv-member .pv-grid {
  margin-top: 2px;
  gap: 4px 26px;
}
.pv-doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eef4fb;
  border: 1px solid #b9d2ea;
  color: #00487c;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  text-decoration: none;
  max-width: 100%;
  word-break: break-all;
  cursor: pointer;
}
.pv-doc-chip:hover {
  background: #e2edf9;
  border-color: #86b3dd;
}
.pv-doc-chip-static {
  background: #f1f5f9;
  border-color: #d7dee7;
  color: #334155;
  cursor: default;
}
/* ── PREVIEW BUTTON (enabled only after self-declaration) ── */
#btnPreview:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #eef2f7 !important;
  border-color: #cbd5e1 !important;
  color: #94a3b8 !important;
}
/* ── SELF DECLARATION ── */
.self-decl-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: #713f12;
  flex-wrap: nowrap;
}
.self-decl-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0;
  vertical-align: middle;
  display: inline-block;
  accent-color: #ca8a04;
}
/* ── FORM PREVIEW MODAL ── */
#formPreviewModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 99991;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#formPreviewModal.open {
  display: flex;
  padding: 0;
}
#formPreviewModal.open .doc-view-box {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
}
#formPreviewModal .pv-doc {
  max-width: none;
}
#formPreviewModal .doc-view-box {
  max-height: 92vh;
}
/* ── VALIDATION ── */
.fi-err {
  border-color: #e53935 !important;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12) !important;
  background: #fff8f8 !important;
}
.v-msg {
  display: block;
  color: #e53935;
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 3px;
}
/* ── OTP DIGIT BOXES (ApplicationUOC-style SweetAlert2 modal) ── */
.otp-slot {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.otp-slot:focus {
  border-color: #00487c;
  box-shadow: 0 0 0 3px rgba(0, 72, 124, 0.2);
}
.swal2-rounded-popup {
  border-radius: 18px;
}
.swal2-title-bold {
  font-weight: 800;
}
/* ── INLINE TOGGLE FOR INPUTS (e.g. Monthly Income Urban/Rural toggle) ── */
.tog-inline {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f1f5f9;
  height: 28px;
  box-sizing: border-box;
  user-select: none;
}
.tog-inline label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  color: #475569;
  border-radius: 4px;
  transition: all 0.15s ease;
  margin: 0;
}
.tog-inline input[type="radio"] {
  display: none;
}
.tog-inline label.on,
.tog-inline input[type="radio"]:checked + span {
  background: #00487c;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 72, 124, 0.25);
}

/* Ensure mobile verify button stays centered inside input regardless of error messages */
#btnShowMobileVerify {
  position: absolute !important;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  height: 30px !important;
  z-index: 10 !important;
  margin: 0 !important;
}

#mobileVerifiedMark {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 10 !important;
  margin: 0 !important;
}
