/* H MARKET — Premium NRC / Identity fields */
.hm-nrc-field, .hm-dob-field, .hm-nrc-photos, .hm-id-field {
  width: 100%;
  margin: 0 0 16px;
  scroll-margin-bottom: 100px;
}
.hm-nrc-label {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
  letter-spacing: .01em;
}
.hm-req { color: #e11d48; }
.hm-id-sub {
  margin: -4px 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

/* Single-row NRC: 14 / ညတန (နိုင်) 001234 */
.hm-nrc-row {
  display: grid;
  grid-template-columns: minmax(44px, 56px) 10px minmax(56px, 1fr) minmax(64px, 88px) minmax(72px, 1.1fr);
  align-items: stretch;
  gap: 6px;
  width: 100%;
}
.hm-nrc-sep {
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #94a3b8;
  font-size: 14px;
}
.hm-nrc-select,
.hm-nrc-input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 12px;
  padding: 11px 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  outline: none;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
}
.hm-nrc-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 22px;
}
.hm-nrc-select:focus,
.hm-nrc-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.hm-nrc-preview {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  letter-spacing: .02em;
  border: 1px solid #f1f5f9;
}
.hm-nrc-preview.is-ok {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.hm-nrc-error {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 700;
  color: #e11d48;
}

/* Identity type cards */
.hm-id-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
.hm-id-type {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 14px;
  padding: 12px 10px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.hm-id-type .hm-id-ico { font-size: 18px; line-height: 1; }
.hm-id-type strong { font-size: 13px; color: #0f172a; font-weight: 800; }
.hm-id-type small {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
  line-height: 1.35;
}
.hm-id-type.active {
  border-color: #2563eb;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.hm-id-type:hover { border-color: #93c5fd; }
.hm-id-panel { width: 100%; }

/* DOB */
.hm-dob-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

/* Photos */
.hm-nrc-photos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hm-nrc-photo-box {
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  min-height: 110px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.hm-nrc-photo-box img {
  max-width: 100%;
  max-height: 120px;
  border-radius: 10px;
  object-fit: cover;
}

/* Mobile: KEEP single row (compress, do not stack) */
@media (max-width: 560px) {
  .hm-nrc-row {
    grid-template-columns: 48px 8px minmax(0,1.1fr) 72px minmax(0,1.2fr);
    gap: 4px;
  }
  .hm-nrc-select,
  .hm-nrc-input {
    font-size: 12px;
    padding: 10px 4px;
    border-radius: 10px;
  }
  .hm-nrc-select { padding-right: 16px; background-position: right 4px center; }
  .hm-id-type-grid { grid-template-columns: 1fr; }
  .hm-id-type { flex-direction: row; align-items: center; gap: 10px; padding: 12px; }
  .hm-id-type small { flex: 1; }
}

html[data-theme="dark"] .hm-nrc-label { color: #e2e8f0; }
html[data-theme="dark"] .hm-nrc-select,
html[data-theme="dark"] .hm-nrc-input {
  background: #171e2a;
  border-color: #2a3444;
  color: #e8eef8;
}
html[data-theme="dark"] .hm-nrc-preview { background: #121821; color: #9aa6b8; border-color: #1e293b; }
html[data-theme="dark"] .hm-nrc-preview.is-ok { background: #0f1b33; color: #93c5fd; border-color: #1e3a5f; }
html[data-theme="dark"] .hm-id-type { background: #171e2a; border-color: #2a3444; }
html[data-theme="dark"] .hm-id-type strong { color: #e8eef8; }
html[data-theme="dark"] .hm-id-type.active { background: #0f1b33; border-color: #2563eb; }

/* DOB: always 3 equal columns (never use NRC 5-col grid) */
.hm-dob-row.hm-nrc-row,
.hm-dob-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 8px !important;
  align-items: stretch;
}
.hm-dob-row .hm-nrc-select {
  text-align: center;
  padding-right: 22px;
  min-width: 0;
  width: 100%;
}

/* NRC photos side-by-side (desktop + mobile) */
.hm-nrc-photo-grid,
.hm-nrc-photos-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  width: 100%;
}
.hm-nrc-photo-card { min-width: 0; }
.hm-nrc-photo-box {
  width: 100%;
  min-height: 120px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  box-sizing: border-box;
}
.hm-nrc-photo-box img {
  max-width: 100%;
  max-height: 140px;
  border-radius: 10px;
  object-fit: cover;
}
.hm-nrc-photo-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.hm-nrc-photo-act {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.hm-nrc-photo-act.danger { color: #e11d48; border-color: #fecdd3; }

@media (max-width: 560px) {
  .hm-dob-row.hm-nrc-row,
  .hm-dob-row {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 6px !important;
  }
  .hm-nrc-photo-grid,
  .hm-nrc-photos-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}
