/* V005.2: make the /v2/ entry form mirror the approved nhap1 presentation. */
#xem-ngay .astro-form {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 16px 18px !important;
  padding: 30px !important;
  background: #f7fbff !important;
  border: 1px solid #c9deed !important;
  border-radius: 26px !important;
}

#xem-ngay .astro-saved {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr) !important;
  grid-template-rows: auto auto !important;
  gap: 3px 28px !important;
  padding: 18px 20px !important;
  background: #eef8fd !important;
  border: 1px solid #b9d9ec !important;
  border-radius: 16px !important;
  color: #17304b !important;
}

#xem-ngay .astro-saved__head {
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: block !important;
  color: #17304b !important;
}

#xem-ngay .astro-saved__head label {
  display: block !important;
  color: #17304b !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
}

#xem-ngay .astro-saved__head span {
  display: none !important;
}

#xem-ngay .astro-saved__status {
  grid-column: 1 !important;
  grid-row: 2 !important;
  margin: 0 !important;
  color: #647b93 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

#xem-ngay .astro-saved__controls {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
}

#xem-ngay .astro-saved__controls select {
  width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
  border: 1px solid #a9c9de !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #17283e !important;
}

#xem-ngay #delete-saved-profile:disabled {
  display: none !important;
}

#xem-ngay .astro-form > .astro-control:has(#short-name) {
  grid-column: 1 / span 4 !important;
  grid-row: 2 !important;
}

#xem-ngay .astro-form > .astro-control:has(#gender) {
  grid-column: 5 / span 2 !important;
  grid-row: 2 !important;
}

#xem-ngay .astro-form__hint {
  grid-column: 1 / span 4 !important;
  grid-row: 3 !important;
  margin: -10px 2px 0 !important;
  color: #526b84 !important;
  font-size: 12px !important;
}

#xem-ngay .astro-form > .astro-control:has(#birth-day) {
  grid-column: 1 / span 3 !important;
  grid-row: 4 !important;
}

#xem-ngay .astro-form > .astro-control:has(#birth-hour) {
  grid-column: 4 / span 3 !important;
  grid-row: 4 !important;
}

#xem-ngay .astro-form > .astro-control:has(#short-name),
#xem-ngay .astro-form > .astro-control:has(#gender) {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) !important;
  height: 54px !important;
  margin-top: 24px !important;
  padding: 0 !important;
  overflow: visible !important;
  background: #fff !important;
  border: 1px solid #b9d4e6 !important;
  border-radius: 15px !important;
  box-shadow: none !important;
}

#xem-ngay .astro-form > .astro-control:has(#short-name)::before,
#xem-ngay .astro-form > .astro-control:has(#gender)::before {
  position: absolute !important;
  left: 0 !important;
  top: -25px !important;
  color: #314a65 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

#xem-ngay .astro-form > .astro-control:has(#short-name)::before {
  content: "Tên viết tắt *" !important;
}

#xem-ngay .astro-form > .astro-control:has(#gender)::before {
  content: "Giới tính *" !important;
}

#xem-ngay .astro-form > .astro-control:has(#short-name) .astro-control__icon,
#xem-ngay .astro-form > .astro-control:has(#gender) .astro-control__icon {
  display: grid !important;
  place-items: center !important;
  width: 54px !important;
  height: 52px !important;
  background: transparent !important;
  border-right: 1px solid #dbe8f1 !important;
  border-radius: 14px 0 0 14px !important;
  color: #0788bb !important;
}

#xem-ngay .astro-form > .astro-control:has(#short-name) .astro-control__icon svg,
#xem-ngay .astro-form > .astro-control:has(#gender) .astro-control__icon svg {
  display: none !important;
}

#xem-ngay .astro-form > .astro-control:has(#short-name) .astro-control__icon::before {
  content: "Aa" !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

#xem-ngay .astro-form > .astro-control:has(#gender) .astro-control__icon::before {
  content: "\2640\2642" !important;
  font-size: 20px !important;
}

#xem-ngay #short-name,
#xem-ngay #gender {
  height: 52px !important;
  padding: 0 16px !important;
  background: #fff !important;
  border: 0 !important;
  border-radius: 0 14px 14px 0 !important;
  color: #17283e !important;
  font-size: 16px !important;
}

#xem-ngay .astro-form > .astro-control:has(#birth-day),
#xem-ngay .astro-form > .astro-control:has(#birth-hour) {
  position: relative !important;
  min-width: 0 !important;
  height: auto !important;
  margin-top: 18px !important;
  padding: 16px 14px 14px !important;
  overflow: visible !important;
  background: #eef8fd !important;
  border: 1px solid #c0dcec !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}

#xem-ngay .astro-form > .astro-control:has(#birth-day)::before,
#xem-ngay .astro-form > .astro-control:has(#birth-hour)::before {
  position: absolute !important;
  left: 18px !important;
  top: -9px !important;
  padding: 0 5px !important;
  background: #f7fbff !important;
  color: #314a65 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 18px !important;
}

#xem-ngay .astro-form > .astro-control:has(#birth-day)::before {
  content: "Ngày sinh dương lịch *" !important;
}

#xem-ngay .astro-form > .astro-control:has(#birth-hour)::before {
  content: "Giờ phút sinh *" !important;
}

#xem-ngay .astro-form > .astro-control:has(#birth-day) > .astro-control__icon,
#xem-ngay .astro-form > .astro-control:has(#birth-hour) > .astro-control__icon {
  display: none !important;
}

#xem-ngay .astro-control__fields--date,
#xem-ngay .astro-control__fields--time {
  width: 100% !important;
  min-width: 0 !important;
  gap: 10px !important;
}

#xem-ngay .astro-control__fields--date {
  display: grid !important;
  grid-template-columns: .8fr .95fr 1.18fr !important;
}

#xem-ngay .astro-control__fields--time {
  display: grid !important;
  grid-template-columns: 1.15fr 1fr !important;
}

#xem-ngay .astro-control__fields--date select,
#xem-ngay .astro-control__fields--time select {
  width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
  padding: 0 14px !important;
  background: #fff !important;
  border: 1px solid #b7d3e4 !important;
  border-radius: 12px !important;
  color: #17283e !important;
  font-size: 16px !important;
}

#xem-ngay .astro-control__fields--date .astro-control__note {
  display: none !important;
}

#xem-ngay .astro-location-title:nth-child(7) {
  grid-column: 1 / -1 !important;
  grid-row: 5 !important;
}

#xem-ngay .astro-form > .astro-control--location:nth-child(8) {
  grid-column: 1 / -1 !important;
  grid-row: 6 !important;
}

#xem-ngay .astro-location-title:nth-child(9) {
  grid-column: 1 / -1 !important;
  grid-row: 7 !important;
}

#xem-ngay .astro-form > .astro-control--location:nth-child(10) {
  grid-column: 1 / -1 !important;
  grid-row: 8 !important;
}

#xem-ngay .astro-location-title {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 2px 0 -3px !important;
  color: #17283e !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}

#xem-ngay .astro-location-title::before {
  flex: 0 0 30px !important;
  display: grid !important;
  place-items: center !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 9px !important;
  background: #ffc54d !important;
  color: #132338 !important;
  font-size: 17px !important;
  font-weight: 900 !important;
}

#xem-ngay .astro-location-title:nth-child(7)::after,
#xem-ngay .astro-location-title:nth-child(9)::after {
  margin-left: auto !important;
  color: #159a50 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#xem-ngay .astro-location-title:nth-child(7)::after {
  content: "Dữ liệu tọa độ thật" !important;
}

#xem-ngay .astro-location-title:nth-child(9)::after {
  content: "Trên 6 tháng" !important;
}

#xem-ngay .astro-form > .astro-control--location {
  display: block !important;
  height: auto !important;
  padding: 16px !important;
  background: #eef8fd !important;
  border: 1px solid #b9d9ec !important;
  border-radius: 18px !important;
  box-shadow: none !important;
}

#xem-ngay .astro-control--location > .astro-control__icon {
  display: none !important;
}

#xem-ngay .tuvi5s-location-picker {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr) !important;
  gap: 9px 12px !important;
  width: 100% !important;
  padding-top: 24px !important;
}

#xem-ngay .tuvi5s-location-picker::before,
#xem-ngay .tuvi5s-location-picker::after {
  position: absolute !important;
  top: 0 !important;
  color: #314a65 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#xem-ngay .tuvi5s-location-picker::before {
  left: 0 !important;
  content: "Quốc gia" !important;
}

#xem-ngay .tuvi5s-location-picker::after {
  left: calc(39% + 4px) !important;
  content: "Tỉnh / bang / vùng" !important;
}

#xem-ngay .tuvi5s-location-picker > select {
  width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
  padding: 0 14px !important;
  background: #fff !important;
  border: 1px solid #b7d3e4 !important;
  border-radius: 12px !important;
  color: #17283e !important;
  font-size: 16px !important;
}

#xem-ngay .tuvi5s-location-coordinate,
#xem-ngay .tuvi5s-coordinate-toggle,
#xem-ngay .tuvi5s-coordinate-panel {
  grid-column: 1 / -1 !important;
}

#xem-ngay .tuvi5s-location-coordinate {
  margin: 0 4px !important;
  color: #54718d !important;
  font-size: 12px !important;
}

#xem-ngay .tuvi5s-coordinate-toggle {
  width: 100% !important;
  margin-top: 2px !important;
  padding: 9px 0 0 !important;
  text-align: left !important;
  border-top: 1px solid #c9deeb !important;
}

#xem-ngay .astro-save-option {
  grid-column: 1 / -1 !important;
  grid-row: 9 !important;
}

#xem-ngay .astro-form__pending {
  grid-column: 1 / -1 !important;
  grid-row: 10 !important;
}

#xem-ngay .astro-form__actions {
  grid-column: 1 / -1 !important;
  grid-row: 11 !important;
}

@media (max-width: 760px) {
  #xem-ngay .astro-form {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    padding: 18px 14px !important;
  }

  #xem-ngay .astro-form > .astro-saved,
  #xem-ngay .astro-form > .astro-control,
  #xem-ngay .astro-form > .astro-form__hint,
  #xem-ngay .astro-form > .astro-location-title,
  #xem-ngay .astro-form > .astro-save-option,
  #xem-ngay .astro-form > .astro-form__pending,
  #xem-ngay .astro-form > .astro-form__actions {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  #xem-ngay .astro-saved {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  #xem-ngay .astro-saved__head,
  #xem-ngay .astro-saved__status,
  #xem-ngay .astro-saved__controls {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  #xem-ngay .astro-location-title {
    align-items: flex-start !important;
    font-size: 15px !important;
  }

  #xem-ngay .astro-location-title::after {
    display: none !important;
  }

  #xem-ngay .tuvi5s-location-picker {
    grid-template-columns: minmax(0, 1fr) !important;
    padding-top: 22px !important;
  }

  #xem-ngay .tuvi5s-location-picker::after {
    display: none !important;
  }
}

@media (max-width: 430px) {
  #xem-ngay .astro-control__fields--date {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #xem-ngay #birth-year {
    grid-column: 1 / -1 !important;
  }
}
